code logs -> 2013 -> Wed, 09 Jan 2013< code.20130108.log - code.20130110.log >
--- Log opened Wed Jan 09 00:00:54 2013
00:07 You're now known as TheWatcher[T-2]
00:12 You're now known as TheWatcher[zZzZ]
00:12 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
00:12 mode/#code [+o himi] by ChanServ
00:43 thalass_ [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code
01:40 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
01:48 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
01:48 mode/#code [+o himi] by ChanServ
02:10 syksleep is now known as Syk
02:18
<@Rhamphoryncus>
Anybody built a low profile computer before?
02:19 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Client closed the connection]
02:19 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [Ping timeout: 121 seconds]
02:20
<&ToxicFrog>
No, but I'd like to at some point
02:20
<&ToxicFrog>
For now I'm just re-using old laptops~
02:21
<@Rhamphoryncus>
Right now I have one linux box. I'd like to get a second (compact) linux box, repurpose this one as a windows gaming box, and get a KVM switch
02:22
<&Derakon>
If you have more money than time, you could get a Mac Mini and overwrite the OS.
02:22
<@Rhamphoryncus>
Nope, trying to be cost effective
02:22
<&Derakon>
Or I'm sure there are generic prebuilts that would achieve a similarly small form factor.
02:22
<@Reiv>
Low profiles are good, just beware the Two Banes Of Their Existance:
02:22
<@Reiv>
Size of graphics card, and Heat.
02:22
<@Rhamphoryncus>
At the moment I'm debating a graphics card though...
02:22
<@Reiv>
Also Heat.
02:22
<@Reiv>
And Heat.
02:22
<@Reiv>
Just be careful not to forget Heat.
02:23
<&ToxicFrog>
Rhamphoryncus: what's the use case here?
02:23 * Reiv coughs.
02:23
<@Rhamphoryncus>
Vastly cheaper without a real graphics card
02:23
<@Rhamphoryncus>
ToxicFrog: programming, an IRC bot, server for a few things
02:23
<&ToxicFrog>
Aah, so VM or dual boot is not a viable option
02:23
<@Rhamphoryncus>
Nope
02:24
<&ToxicFrog>
You could use an rPi~
02:24
<&ToxicFrog>
As a practical matter you don't actually need a KVM switch, just ssh into it from the windows machine
02:25
<@Reiv>
Server is about the only thing there that discourages 'ancient laptop' configuration.
02:25
<@Rhamphoryncus>
May also use it for banking and such things that *should* be done securely
02:25
<&ToxicFrog>
Reiv: not really. Old laptops make pretty nice servers, depending.
02:27
<@Reiv>
Depending on what it is they're serving?
02:28
<@Rhamphoryncus>
Don't have one available.
02:28
<@Reiv>
They tend to be trivially cheap.
02:28 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
02:28 mode/#code [+o himi] by ChanServ
02:28
<@Reiv>
Vastly more affordable than building a microbox, at that.
02:29
<&ToxicFrog>
Reiv: quite. In particular, for stuff requiring heavy computing power or lots of space they are a losing proposition.
02:30
<@Reiv>
Yeah
02:30
<@Reiv>
I guess when I think 'server' these days I think 'fileserver'
02:31
<@Rhamphoryncus>
Compared to, say, this? http://www.memoryexpress.com/Products/MX41897
02:32
<@Reiv>
That has a 1 in the front of it, so the answer is 'yes'
02:32
<@Rhamphoryncus>
eh?
02:32
<@Reiv>
Seriously, I have found 'old laptops' can go for like fifty bucks. Twenty if you don't mind working on crap.
02:33 Xires [xires@Nightstar-c54fd8cd.feedthetrolls.net] has joined #code
02:33
<@Rhamphoryncus>
Perhaps
02:34
< Xires>
<3 "Rants and monologues are encouraged"
02:34
<~Vornicus>
Well? Get to it! :P
02:34
<@Rhamphoryncus>
Hmm nope, no cheap laptops on craigslist
02:35
<@Reiv>
Unusual.
02:35
< Xires>
I tire of the people these days thinking that they need only look up some quick tutorial to learn a language. Particularly those who also seem to believe that there is no reason to learn a language like C.
02:35
<@Reiv>
I don't need a tutorial
02:35
<@Reiv>
I have Vorn!
02:36
<@Reiv>
HEY VORN
02:36
< Xires>
As well as those who can't seem to understand that there's more to C++ than classes.
02:36
<~Vornicus>
Heh
02:36
<@Reiv>
TAECH ME PYTHON
02:36
< Xires>
Or those who feel that FORTRAN is dead.
02:36
<~Vornicus>
Actually I learned to program period from the Python tutorial...
02:36
<@Reiv>
... AND ALSO HOW TO SPELL
02:36
<~Vornicus>
I actually thought that one was intentional
02:36
<@Rhamphoryncus>
Xires: if only...
02:36
< Xires>
And, of course, those who love Python.
02:36
<@Reiv>
Nope!
02:36
<&Derakon>
How to Python:
02:37
<&Derakon>
print "Hello, world!"
02:37
<&Derakon>
Done.
02:37
<@Reiv>
Fantastic
02:37 thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code
02:37
< Xires>
import language_that_permits_better_artistic_style
02:38
<~Vornicus>
"better artistic style"? is that your name for buffer overruns now?
02:38
<~Vornicus>
:D
02:38
<&Derakon>
No, he wants to whang everything onto the same line so he can pretend he's "leet".
02:38
< Xires>
no, rather for something that doesn't restrict my coding style
02:38
< Xires>
or whichever style I would prefer
02:39
<~Vornicus>
Der: you obviously haven't seen my list comprehensions
02:39
< Xires>
an entire program on a single line is kinda ridiculous..C != JS
02:39
<~Vornicus>
You could do it in C.
02:39
<@Rhamphoryncus>
Xires: funny thing about coding style. Most of it has no value
02:39
< Xires>
if you can get around pissing off the preprocessor, yeah
02:40
<&ToxicFrog>
Xires: speaking as someone who has to work with biologists and physicists, I wish FORTRAN was dead~
02:40
< Xires>
ToxicFrog; understood..I can't really blame you, I don't care for it, personally, but it has its uses
02:41
< Xires>
there are reasons that jet fighters are not coded in C
02:41
<&Derakon>
Also speaking as someone who has to work with biologists, I love that Python forces them to have at least a bare minimum of proper styling.
02:41
<&Derakon>
Their code would be entirely unreadable without it, as opposed to merely mostly unreadable.
02:41
< Xires>
the language should not force style upon the coder
02:41
< Xires>
granted, that's just my opinion, but it's something I firmly believe
02:42
< Xires>
one should teach better coding style rather than just altering a language to give the programmer no other choice
02:42
<&ToxicFrog>
Xires: last I checked Ada was beating out Fortran for avionics stuff by a wide margin due in large part to its borderline-psychopathically strict compiler
02:42
<~Vornicus>
Xires: I'm sorry you haven't found a language you like.
02:42
< Xires>
structured code is preferred to a quick script which holds true to a unified style but otherwise is inefficient and potentially quite buggy
02:42
< Xires>
Vornicus; I've found quite a few over the past 2.5 decades..Python isn't one of them
02:42
<@Namegduf>
What standard of "should" are we working with here?
02:43
<@Namegduf>
It doesn't seem to be consequentialist
02:43
<&Derakon>
Vorn's point is that every language forces style on the coder at some level.
02:43
<&ToxicFrog>
That said, I'm kind of terrified that there exist standards for coding automotive applications in C.
02:43
<&ToxicFrog>
And that they require SPOR.
02:43
<@Reiv>
I'm off to write the next Call of Duty Future Black Soldier Ops Warrior VII: Blood, Boobs & Bombs
02:43
< Xires>
ToxicFrog; Ada95 had popular usage but FORTRAN still runs the majority of the US Naval jets
02:43
<@Reiv>
Cheers, Derakon. I'll keep you in mind if I hit any snags.
02:43
< Xires>
brb;
02:43
<@Namegduf>
In Python's case it's more a question of whether they should have to modify their tidy language concept to support arbitrary coding style.
02:44
<&Derakon>
Reiv: sure thing. :)
02:44
<@Namegduf>
I mean, they can't at zero-cost just say it is okay.
02:44
<&ToxicFrog>
IMO, no, because then you have to find another way of getting the compiler to enforce indentation on the frosh
02:45
<@Rhamphoryncus>
I've seen some horrors inflicted within python as-is x_x
02:45
<&Derakon>
I bet I've seen worse.
02:45
<@Reiv>
Xires: A point on coding style: Having a language that demands a certain coding style is, in fact, merely a particuarly strict form of 'teach them correct coding style'.
02:45
<@Rhamphoryncus>
I bet you've seen a couple orders of magnitude *more*
02:45
<&Derakon>
Chained imports via "from foo import *" and then locally renaming one of the imports, for example.
02:45
<@Reiv>
It also has the benefit in large operations that everyone can reach each others code.
02:46
<@Reiv>
... well. /helps/ everyone have a /shot/ at it~
02:46
<@Rhamphoryncus>
Derakon: for foo in [[someexpression]]:
02:46 * Reiv has someone at work who means well, but whose understanding of SQL table aliases to be "Rename all the tables to each other then proceed while wondering why everyone elses heads break"
02:46
<@Rhamphoryncus>
(because functional is THAT awesome!)
02:46
<&Derakon>
So that some code does (and I'm not making this up) "from Priithon.all import X; X.v()" and you go to all.py to find "import usefulX2 as X" and you go to usefulX2 to find it does "from vviewer import *; ...v = vviewer.view".
02:47
<&Derakon>
Rhamph: iterating over a list comp?
02:48
<@Rhamphoryncus>
Derakon: no. Hrm, actually, the inner list might've been a list comp.. I can't recall now. The real point is that the end result was just a single value. Equivalent to foo = someexpression
02:48
<&Derakon>
Oh, I see.
02:49
<&Derakon>
E.g. "for foo in [2 + 3]"
02:49
<@Rhamphoryncus>
yup
02:49
<@Rhamphoryncus>
But spread over 3 or 4 lines
02:50
<@Rhamphoryncus>
From a former friend of mine. Former in that I stopped talking to them after learning they inflicted that on their coworkers on a regular basis, and believed it was vastly superior to doing it pythonically
02:51
<&Derakon>
Seems like if you really want that you should be able to do "with foo as 2+3: ..." except that's a syntax error.
02:52
<&ToxicFrog>
Why is it?
02:52
<&Derakon>
"Can't assign to operator", it says. *shrug*
02:52
<@Rhamphoryncus>
No no, it's pointless. All they need is foo = 2+3. There is no subtle lifetime control involved, just idealism
02:52
<@Rhamphoryncus>
Derakon: you'd actually want "with 2+3 as foo:", but that'd be an error anyway
02:53
<&Derakon>
I contend my chained * imports are worse anyway~
02:56
<@Rhamphoryncus>
Kind of like arguing who's bullet wound is worse
02:57
<&Derakon>
Heh.
02:58
<@Reiv>
Just mind dieties with sickles, lest they murder you via castration.
03:12
<~Vornicus>
that's just silly
03:14
<@Reiv>
Hey, it totally happened!
03:14
<~Vornicus>
Actually there is a surprising amount of leeway in Python's coding style. It's just that many of the things where style enters into other langauges just plain doesn't exist.
03:14
<@Reiv>
In greece, of course. Where else?
03:14
<@Reiv>
Vorn: ?
03:15
<~Vornicus>
one of the perennial arguments in C for instance is bracket placement
03:19
< Xires>
sorry, took longer than I'd originally thought
03:21
< Xires>
Vornicus; and that argument is..?
03:21
<@Reiv>
Do the curly brackets go on a line by themselves or not.
03:21
<@Reiv>
Hell, I've not written C in a decade and I know /that/ one~
03:22
< Xires>
Reiv; 'curly brackets' are also known as 'braces'
03:22
< Xires>
just thought you might like to know
03:23
< Xires>
personally, I prefer opening braces to NOT sit on a line by themselves
03:25
< Xires>
code 'folding' editors tend to render lines better when the opening braces are not by themselves
03:26
< Xires>
it wastes fewer bytes(which is often not negligible) for additional newlines, indentation spacing/tabs, etc.
03:27
<@Reiv>
Xires: I'm aware of what they're called. ;)
03:28 thalass_ [thalass@Nightstar-724ec5eb.bigpond.net.au] has quit [[NS] Quit: Leaving]
03:28
<~Vornicus>
(if you're arguing about number of bytes in a text file there's something wrong)
03:28
< Xires>
Reiv; sorry, just trying to be informative..I spend a lot of time with people who don't know all the English terms for things
03:29
< Xires>
Vornicus; why do you say that?
03:29
<@Reiv>
(Small note: I am technically savvy, if not a guru of code. I tend to insert rather dry humour, and the occasional snark, but am generally harmless. Also noteworthy is that I kinda founded this channel, and Vorn & I are Old Comrades, at least in the internet sense. This may clear up some confusions going forward.)
03:30
< Xires>
Reiv; understood
03:30
<@Reiv>
(Including HEY VORN TEACH ME PYTHON, etc~)
03:31
<@Reiv>
(Which in retrospect may have been a bit less obvious than hoped if you don't know my sense of humor.)
03:31
<@Reiv>
... speaking of, a quick but simple one
03:31
< Xires>
I came here not to troll but to both listen & share with a new group of coders
03:31
<@Reiv>
HEY VORN
03:31
<@Reiv>
What's the average of 2d6, drop lowest?
03:32
<~Vornicus>
So you roll two six sided dice and take the larger of the two
03:32
< Xires>
I would've picked up on it eventually, but I do appreciate the foreshadowing
03:32
<@Reiv>
Right.
03:32
< Xires>
4
03:33
<@Reiv>
Xires: Then you're most welcome. This channel was pretty much explicitly set up so that coders - who were previously spread across multiple channels on this network, and had an occasional tendancy in several of said channels to overwhelm conversation with their programming topics/assistance/etc - to have a common ground.
03:33
< Xires>
most excellent, ty for the welcome
03:34
<@Reiv>
Hell, it was founded because a friend of mine needed help with Python, and I knew Vorn knew Python, but they didn't share any channels between them...
03:34
<~Vornicus>
(1 + 3*2 + 5*3 + 7*4 + 9*5 +11*6) / 36 = (1 + 6 + 15 + 28 + 45 + 66) / 36 = 161/36 = 4 17/36 ~= 4.4722
03:34
< Xires>
I may be a bit 'elitist' at times, but generally for either good reason or because I'm an old man set in my ways
03:34
<~Vornicus>
I presume you wanted the mean.
03:34
<~Vornicus>
The mode is 6, the median is 5.
03:35
< Xires>
:-\
03:35
< Xires>
that seemed overly complicated
03:35
<@Reiv>
... and of course within five minutes of my registering the place, ToxicFrog came screaming in like a meteor from orbit, because he saw the registration with his Godpowerz(tm) and approved of the idea like a kid does candy
03:36
<@Reiv>
Aaand it's kinda grown from there~
03:36
<~Vornicus>
Xires: sometimes I get asked to do math. Occasionally I can do that math mostly in my head
03:37
< Xires>
Vornicus; I once was very similar..then I decided to give up on highschool
03:37
<@Reiv>
Our rules are simple: Play nice. Try to keep off-topic stuff down when it may be distracting. And we give everyone we recognised a gun in here because some of us have nukes, so it's an efficient way to deal with troublemakers. ;)
03:37
<@Reiv>
Xires: Vorn is a Math Guy(tm).
03:37
< Xires>
recently(past 5 years or so) I have realized how exactly that 'use it or lose it' concept works
03:37 * Vornicus is aiming at a phd in the stuff...
03:38
<@Reiv>
(He seems to mostly use it helping me figure out probability curves.)
03:38
<@Reiv>
:P
03:38
< Xires>
useful
03:38 * Reiv is a Game Guy.
03:38
<@Reiv>
By our powers combined, we are Captain Too Many Projects!
03:38
< Xires>
yeah, I'm waiting on a player to show up to start a game
03:39 thalass_ [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code
03:39 * ToxicFrog is currently an Embedded Systems Guy but will hopefully be leaving that behind within a month
03:39
<~Vornicus>
jesus christ do we have too many projects
03:39
<&ToxicFrog>
Who in this channel doesn't?
03:39
<~Vornicus>
well point.
03:40
< Xires>
ToxicFrog; Linux-based embedded systems or no?
03:41
<&ToxicFrog>
Smaller than that. IMAP-based reconfigurable image processors.
03:41
< Xires>
understood
03:41
<&ToxicFrog>
(and before that it was much bigger than that, but a custom, distantly Thoth-derived OS)
03:42
<~Vornicus>
...you say Thoth-derived and my mind turns to something considerably more fictional than you mean.
03:42
< Xires>
gotcha
03:42 * Xires eyes his Thoth tarot deck
03:42
<~Vornicus>
Vash is picking at my typing.
03:43
<&ToxicFrog>
Yeah I mean Thoth the shared-memory message-passing OS
03:43
< Xires>
ToxicFrog; I've played around a little bit with some embedded stuff on Geode processors, some ATOM based boards, a little TRON VLSI and TI's Chronos
03:43
<&ToxicFrog>
I don't think CacheOS had any code in common with it by the time I got involved, but it used to, and the inspiration was still pretty obvious
03:44
< Xires>
not enough time to dive in as deeply as I'd like
03:44
< Xires>
I may have questions, if you don't mind lending some advice
03:45
<&ToxicFrog>
Sure, but I'm not sure how much help I'll be; I haven't worked on any of those platforms.
03:47
< Xires>
I'm sure it'll be easier than explaining rudimentary algebra to a NASA engineer
03:47
< Xires>
umm..wrong input box..sorry
03:49
<~Vornicus>
Having worked with aerospace engineers, that's not saying much~
03:49
< Xires>
yeah, one of my current students is an aerospace engineering graduate
03:50
< Xires>
it's kinda funny how easy calculus is for him but he sometimes forgets simple things
03:50
<&ToxicFrog>
What do you teach?
03:52
< Xires>
programming, administration, networking, basic technical crap, security auditing, etc.
03:52
< Xires>
anything that I know adequately
03:53
< Xires>
hoping to get a double-masters in CS && CE to accompany a bachelor's in education(with minor in psychology)
03:58 thalass_ is now known as Thalass|lunchymunchy
03:59
< Xires>
other than that, my 'day' job(as in all-fsckin'-day) is as a security systems engineer for a company that produces middleware security products to protect banks, manufacturing plants, etc. so I mostly tend to code in C & ASM
04:00
< Xires>
sometimes a little Perl & shell script(bourne shell)
04:00
< Xires>
perl aka awk++
04:02
<&ToxicFrog>
Fun times
04:03
< Xires>
ci
04:03
< Xires>
I first gained an interesting in Python in the 90's when I was desperately seeking something to replace Perl
04:03
<&ToxicFrog>
My current day job - such as it is - is as an MSc.CS student, working on message-passing parallel programming on cache-acoherent embedded architectures (aka. porting a cluster computing API to the IMAP5 architecture)
04:04
<&ToxicFrog>
Before that I was doing CacheOS work, meaning mostly C++ and a bit of x86 asm. Driver development, mostly
04:04
< Xires>
<3 MPI
04:04
<&ToxicFrog>
And I will be so glad when I'm done and can work in HLLs again.
04:04
<&ToxicFrog>
This is actually Pilot, a greatly simplified API implemented on top of MPI
04:06
<&ToxicFrog>
The IMAP5 port keeps the API, but uses the vendor libraries rather than porting MPI to an embedded image processor.
04:09
< Xires>
ToxicFrog; http://youtu.be/H6EEFJk6q3Q - awesome, if you haven't seen it yet
04:13 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:14 Thalass|lunchymunchy is now known as Thalass|NB
04:16 Kindamoody[zZz] is now known as Kindamoody
04:18 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [NickServ (GHOST command used by Derakon_)]
04:18 Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
04:18 Derakon_ is now known as Derakon
04:18 mode/#code [+ao Derakon Derakon] by ChanServ
04:23 Nemu_ [NeophoxProd@Nightstar-2fe52f34.asahi-net.or.jp] has joined #code
04:23 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
04:24 Nemu [NeophoxProd@Nightstar-5af926d1.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
04:26 Maze is now known as EvilDarkLord
04:26
<&ToxicFrog>
...staying up until 2am to watch an introduction to pthreads (which I already know) does not strike me as fun.
04:28
< Xires>
ToxicFrog; the architecture is far more interesting..you can ignore the pthreads stuff
04:28
< Xires>
it goes over how multitasking & threading works at a hardware level
04:28
< Xon>
ooh that does sound interesting
04:29
< Xires>
design factors & decisions made through the years to support multicore/manycore programming
04:29
< Xon>
Xires, tho on modern x86 processes it does get quite murky on what is being executed 'now'
04:29
<&ToxicFrog>
On which architecture(s)? It's not clear from the description, and I'm not going to turn the sound on.
04:30
< Xon>
processors*
04:31
< Xires>
primarily x86 thought I think there may be some mention of others
04:31
< Xires>
s/thought/though/
04:32
< Xon>
parallelism is Really Hard tho, most people ignore it for good reason
04:32
< Xires>
but in some cases it's also really necessary
04:33
< Xon>
yeah
04:33
<&McMartin>
Superscalar is pretty madhouse
04:33
<&McMartin>
But parallelism has its place.
04:34
<&McMartin>
I'm not totally convinced threads do, but parallelism does~
04:34
< Xon>
it is kinda sad tho how many uninformed think it's a small jump.It's a massive leap in complexity and if stuff really goes wrong stupidly hard to trouble shoot without throwing insane amounts of hours at it
04:34
<&McMartin>
There are a tiny, tiny handful of places where threads make things actually simpler
04:34
<&McMartin>
And those are the only places I like to use them.
04:34
<&McMartin>
(The big one being "one thread handles interaction with the OS's event stream, the other one does all the work)
04:35
<&McMartin>
(and maybe a third for audio decoding in advance or something")
04:35
< Xon>
blocking IO in the UI thread always is frustrating :(
04:36
< Xires>
dunno about the audio decoding thing..I find them to be marginally useful for queue monitors to promote cache prefetch between networked streams
04:36
< Xires>
particularly useful for providing 'cloud' services
04:36
< Xires>
add in 0mq and it's pretty wonderful
04:36 * McMartin nods
04:37
<&McMartin>
My understanding is that threaded service systems do not scale as well as poll/select so you'll have to abandon threads eventually
04:37
<&ToxicFrog>
McMartin: "one thread handles each socket" can make things a lot simpler conceptually for some networked stuff.
04:37
<&McMartin>
Also, ha ha ha ha ha ha
04:37
<&ToxicFrog>
Although in practice you don't actually need concurrency for that, you can get away with coroutines and select()
04:37 * McMartin nods
04:37
<&McMartin>
I consider coroutines to be parallelism, conceptually, even if in practice they aren't.
04:37
<&ToxicFrog>
(also, threaded systems can scale well, cf. CacheOS)
04:37
<&McMartin>
I was laughing at this line about an old instruction in Commodore BASIC:
04:38
<&McMartin>
"Technically speaking, the WAIT statement reads the status of memory location ADDR, exclusive-ORs it with TRIG, then ANDs the result with MASK, repeating these steps until a nonzero result is obtained."
04:38
<&ToxicFrog>
(OTOH, CacheOS was written from the kernel up to be very fast even when running hundreds of thousands of threads)
04:38
<&McMartin>
"Practically speaking, few human minds can follow such logic, let alone comprehend its effect on their programs."
04:39
< Xires>
<ToxicFrog> Although in practice you don't actually need concurrency for that, you can get away with coroutines and select()
04:39
< Xires>
whilst I don't care for select(), I can definitely agree w/ coroutines being quite useful in such a situation
04:40
< Xires>
provided you don't have a broken implementation
04:40
<&ToxicFrog>
"provided it actually works properly" is implicit in most such statements~
04:41
< Xires>
yeah, the implementation that I got stuck w/ @ work doesn't
04:41
<&ToxicFrog>
joy
04:41
< Xires>
but they won't let me recode it because "it's not cost effective"
04:41
< Xires>
so..6 months of bandaid patches is better than 2 months of coding it correctly :-\
04:41
<&ToxicFrog>
...but it doesn't work
04:41
<&ToxicFrog>
argh
04:42
< Xires>
yeah, that's why I don't get management decisions
04:42
< Xires>
'business sense' doesn't make any
04:42
<&ToxicFrog>
Eat their hearts. It is the only way
04:43
<&ToxicFrog>
McMartin: the main reason I draw a distinction there is that coroutines, local-memory concurrency, and shared-memory concurrency all have different traps.
04:43 * McMartin nods
04:43
<&McMartin>
Shared-memory concurrency that involves anything less structured than message passing sets off four or five alarm bells for me.
04:44
<&McMartin>
And I'm one of the 0.5% of programmers with significant concurrency experience. >_<
04:44
<&ToxicFrog>
Conceptually they're all "parallelism", but there is still enough of a conceptual difference between them that I don't feel comfortable categorizing them all as the same thing.
04:44
<&ToxicFrog>
And yeah, my approach to shared-memory concurrency is "use that as an optimization to implement message passing, treat as local memory thereafter"
04:44
<&ToxicFrog>
Also, 0.5%? It's seriously that small?
04:45
<&McMartin>
... That's one in two hundred programmers.
04:45
<&McMartin>
I think I may be highballing it.
04:45
<&ToxicFrog>
(also, what's the cutoff for "significant" here)
04:46
<&McMartin>
"Actually results in a net productivity gain when deployed"
04:46
<@himi>
Also, what's the definition of 'programmer' you're using?
04:46
< Xon>
<McMartin> My understanding is that threaded service systems do not scale as well as poll/select so you'll have to abandon threads eventually
04:46
< Xon>
there is a reason Windows has had IO completion ports since Windows NT
04:46
<&McMartin>
himi: scripters count.
04:46
<&McMartin>
So it's a pretty broad net, yes
04:46
< Xon>
it basicly shits all over pure blocking threads and traditional poll/select
04:46
<@himi>
Oh, almost certainly lowballing it, then
04:47
<@himi>
I'd be surprised if more than a couple of percent of programmers regularly using system-level languages (C/C++/etc) had significant experience of concurrency
04:48
<&McMartin>
At this juncture, I'd trust high-powered middleware writers (who will probably be using Java or C#) over C/C++ systems-level guys.
04:48
<@himi>
I know /I/ don't - all the kernel coding I did was run on uniprocessor systems and never got any use on multiprocessor
04:48
<&ToxicFrog>
"regularly using system-level languages" restricts it a lot, and in particular excludes Erlang, Scala, and Clojure (heavy parallel programming culture) and Lua (coroutine use is common)
04:48
< Xires>
bah
04:49
< Xon>
I prefer to use gc'ed langauges if I'm writing user-code with threads. makes memory management a /lot/ saner
04:49
< Xires>
I'm one of those system-level guys :-\
04:49
<@himi>
TF: I'd have thought Erlang is a system level language
04:50
<@Rhamphoryncus>
There's a pretty big difference between the concept of threading and how threading is implemented in mainstream languages
04:51
<@Rhamphoryncus>
The C stack is pretty heavy. Until 64-bit you couldn't even get C threading to scale up due to address space limitations
04:51
<@himi>
Lua is a scripting language - I haven't used it so I don't know what it's like
04:52
<&ToxicFrog>
himi: it's a functional, garbage collected, bytecode-interpreted language without pointers or other arbitrary memory access
04:52
<&ToxicFrog>
That does not say "system level" to me
04:52
<@himi>
Erlang?
04:52
<&ToxicFrog>
Yes.
04:53
<&McMartin>
Clojure is a tricky case because while it has heavy parallel programming, it's also heavily *immutable*
04:53
<&McMartin>
I'm not even sure how to classify it by your tripartite system~
04:53
<@Rhamphoryncus>
himi: erlang is a phone exchange language. Despite the proponents I haven't seen a way to adopt it for *general* use
04:53
<@himi>
My understanding is that it was designed to do system level stuff
04:53
<&ToxicFrog>
Nope.
04:53 * himi shrugs
04:53
<@himi>
I'll shut up now, then
04:53
<&ToxicFrog>
It was designed to run phone exchanges and support zero-downtime in-place software upgrades.
04:54
<@Rhamphoryncus>
It's good at doing very small, independent operations
04:54
< Xon>
ToxicFrog, yeah. telephone systems are big on zero-downtime
04:54
<@Rhamphoryncus>
You wouldn't use it to build a large library with a lot of sequential operations
04:54
<@himi>
Yeah, and I thought that involved pretty low-level work, equivalent to writing an OS or something not far short of that
04:56
<@himi>
If it's designed for low level work, then exactly how it achieves that design goal isn't important, I'd have thought
04:57
<@Rhamphoryncus>
low-level vs high-level as a categorization falls about at this point. They're very broad strokes. Not useful for nitpicking :)
04:57
<@himi>
eh
04:58
<@himi>
How close are you to directly controlling the hardware?
04:58
<@Rhamphoryncus>
erlang has more overhead than C, but the abstractions make it vastly easier for certain tasks, and higher performance unless you put a *ton* of effort in
04:59
<@Rhamphoryncus>
Just like python can for a different set of tasks
04:59
< Xires>
erlang can indeed make things much easier for certain tasks..certain parts of AppLogic are using it because of this
04:59
<&ToxicFrog>
himi: quite far away. That's the key difference in my mind.
05:00
<&ToxicFrog>
Erlang might be running on either an Actual OS, or the VM might be the OS on some dedicated switching hardware somewhere, but in either case it's designed for high performance and reliability but not hardware-level control
05:00
<&ToxicFrog>
You could not, for example, implement a device driver in it
05:00
<@himi>
Okay then
05:01
<@Rhamphoryncus>
Really, you can't do hardware-level control of threading unless you're writing your own kernel. Otherwise most of what you're doing is dependent on the kernel APIs
05:02
<@himi>
I guess the question is, how many real world applications actually make use of concurrency?
05:03
< Xon>
at a guess; most word processes, spreadsheets, browsers, etc
05:03
<@himi>
If you're operating at the kernel level you don't have any option, but in application space how often do people write concurrent code?
05:03
<@himi>
xon: You think?
05:03
<@Rhamphoryncus>
"Some". We lack an general purpose languages that are good at it, so...
05:03
<@himi>
I know for a long long time Firefox was pretty much single-threaded
05:04
<@Rhamphoryncus>
IME it still is :P
05:04
<@Rhamphoryncus>
A good chunk of that might be due to the filesystem.. yay design fail.
05:05
<@Rhamphoryncus>
(that's kernel design fail, not firefox)
05:05
<&ToxicFrog>
himi: rather a lot of games these days.
05:05
<&ToxicFrog>
Anything intended for porting to (or from) a console, especially.
05:05 * Vornicus pokes at his art list which has just vastly expanded
05:06
<@Rhamphoryncus>
Yeah, if only to put sound in a separate thread
05:06
<~Vornicus>
if I wasn't building City On The Hill requirements in my head I could outsource this.
05:06
<@himi>
TF: yeah, and what percentage of programmers out there are game programmers?
05:07
< Xon>
himi, my idle copy of ms word has 12 threads, IE w/ 4 tabs ~130 threads, chrome has 66. outlook is idling at 25
05:07
<@himi>
The vast majority do in-house business coding, last I heard
05:07
<~Vornicus>
that's still true.
05:08
<&ToxicFrog>
Oh hey here's an easy check. Threaded stuff running on Durandal: damn near everything, but notably Steam, Opera, Winamp, dropbox, X11, notepad++, and explorer
05:08
<@himi>
Xon: yeah, and those are apps that have many many years of dedicated work going towards making them work on modern systems
05:08
< Xon>
notepad only has 1 thread
05:08
< Xon>
=)
05:08
<@himi>
They're /not/ stuff that the bulk of programmers would expect to work on
05:09
<&ToxicFrog>
cmd.exe is also singlethreaded. That appears to be the only singlethreaded program currently running.
05:09
< Xon>
any .NET application has multipule threads by default due to the GC running in another thread, and the thread pool which is functioanllyl for free
05:10
< Xon>
and using multipule threads in .net is very easy with all the async stuff
05:10
<~Vornicus>
Where did all these X people come from?
05:10
<&ToxicFrog>
On Thoth, every Chrome subprocess is itself multithreaded, xchat appears to have one thread per socket, claws has a bunch, lots of the "background" desktop environment stuff is multithreaded...
05:11
<&ToxicFrog>
It's easier to find threaded programs that non-threaded.
05:11
<&ToxicFrog>
Of course, in some, perhaps most, cases these threads are handled by libraries and not explicitly managed by the application programmer.
05:12 Nemu_ [NeophoxProd@Nightstar-2fe52f34.asahi-net.or.jp] has quit [Connection reset by peer]
05:13 Nemu [NeophoxProd@Nightstar-a3dbf2b5.asahi-net.or.jp] has joined #code
05:13
<@himi>
This is a valid point - I just checked and Python GTK+ app I wrote shows up as having three threads, which I had no idea about until just now
05:13
<@himi>
I wouldn't consider that concurrent programming - dunno about you guys
05:15
<@Rhamphoryncus>
separating sound from the rest of the program is concurrency, having a separate thread to handle each socket is parallelism, but it really is very limited
05:15
<@Rhamphoryncus>
Conceptually they should be using tens of thousands of threads for all sorts of different things
05:16
< Xires>
too many threads is a bad idea
05:16
< Xires>
very bad idea
05:16
< Xires>
performance-wise
05:16
<@Rhamphoryncus>
Xires: in implementation, not in concept
05:17
<@himi>
Threads doing nicely separate tasks is certainly at the low end of complexity, concurrency wise
05:17
<&ToxicFrog>
Xires: that is an implementation detail. A Sapphire cache under load will be running tens to hundreds of thousands of threads.
05:17
<@himi>
It also lends itself to some variety of message-passing
05:17 * himi tries to refer back to McMartin's original point . . .
05:18
<&ToxicFrog>
However, it also has sixteen cores and can context switch in ~4 instructions and message pass + context switch in 6.
05:18
<&ToxicFrog>
(and the threads are heavily network-bound)
05:19
<@Rhamphoryncus>
In C you need a stack of around a meg, one allocated per thread, and likely an assortment of other state holders. An efficient thread implementation would likely be a few hundred bytes, with the rest on the heap as needed
05:20
< Xon>
yeah, on 32bit x86 you can onyl have ~2000 threads or so with the default stackside before you run out of virtual address space
05:20
< Xon>
stacksize*
05:20
<@Rhamphoryncus>
(could be less than a few hundred if the language can have a larger atomicity)
05:21
<@Rhamphoryncus>
The kernel threading API isn't designed for such cheap threads
05:22
< Xon>
that and untill recently, linux kernel could only do 1 context switch at a time
05:22
<@Rhamphoryncus>
Which is why N:M threading gets reinvented (map a large number of user threads onto a small number of kernel threads), even though 1:1 is better within its design scope
05:23
< Xon>
co-operative multithreading tends to suck unless the code is really well written =p
05:24
<@Rhamphoryncus>
Xon: that's another language design issue. In this day and age (heh) it's obvious that you need to isolate errors such as hangs to a small part of the system, but actually doing that in a language...
05:25
< Xon>
well, that is what kernel threads are for
05:26
< Xon>
also, a lot of code assumes the current stack isn't going to migrate to a new thread. some code breaks /horribly/ if you expose it to those conditions
05:26
<@Rhamphoryncus>
My ideal language would let you isolate sections of the program, and enforce it, allowing them to be forcibly killed as needed. Basically reimplementing the kernel's process isolate
05:27
<@Rhamphoryncus>
Xon: yup, that's how C is implemented
05:28
<@Rhamphoryncus>
(technically there's enough abstraction in the C specs that you only need the pointers to remain valid, which I think means the integer values you can convert them to and from as well, but you can't do any better than a 64-bit address space with virtual memory)
05:29
< Xon>
OS-level per thread storage also breaks assuptions too\
05:30
<@Rhamphoryncus>
To be really pedantic having threading at all violates the C specs :)
05:30
<~Vornicus>
Okay. Current art todo list. big versions of each planet; a backing image for the planet info ui; selection reticle and crosshairs
05:32
<@Rhamphoryncus>
Thus Beohm's "Threads Cannot be Implemented as a Library" paper.
05:35
< Xon>
yeah
05:35
< Xon>
not baking threading into the language in C was rather horrible
05:38
<@Rhamphoryncus>
Only one of the flaws of C
05:39
<@Rhamphoryncus>
The C++ revisions on it make it better.. while retaining the essential crappiness heh
05:40
<@himi>
I'm pretty sure threading wasn't much thought of when C was originally designed
05:41
<@Rhamphoryncus>
Considering they started developing in 1969...
05:41 * Vornicus isn't even sure what he wants the reticle to look like.
05:42
<~Vornicus>
Big planet images are another matter.
05:42
<@Rhamphoryncus>
Vornicus: http://conorlastowka.com/wp-content/uploads/2010/06/calvin1.jpg
05:43
< Xires>
Rhamphoryncus; +1
05:44
<~Vornicus>
Rham: ...yeah, no.
05:59
< Xon>
<Rhamphoryncus> Only one of the flaws of C
05:59
< Xon>
strings are fun!
05:59
< Xon>
"fun"
06:08
<@Rhamphoryncus>
You can almost argue that only the parser knows of strings, not the underlying language
06:13
<@himi>
The language is definitely very much 'chunks of memory' oriented, rather than oriented towards logical objects
06:13
<@Rhamphoryncus>
Yet technically is objects :)
06:14
<@Rhamphoryncus>
Fun fact: you can't implement your own malloc without violating the specs either
06:16 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
06:16 mode/#code [+ao Derakon Derakon] by ChanServ
06:16
<~Vornicus>
??
06:18
<@Rhamphoryncus>
You can tell C that a chunk of memory is now an object but you cannot tell it that chunk is no longer an object
06:18
<~Vornicus>
aha
06:19
<@Rhamphoryncus>
If you implemented a large program in a single file, with your own heap, depending on inlining and other optimizations you could access memory that was already "freed"
06:20
<@Rhamphoryncus>
Of course there's a lot of practical barriers to that
06:21
<@Rhamphoryncus>
Such as the lack of inter-file optimizations.. oh hey, we're getting link-time-optimizations now XD
06:21
<@RStamer>
<McMartin> "Technically speaking, the WAIT statement reads the status of memory location ADDR, exclusive-ORs it with TRIG, then ANDs the result with MASK, repeating these steps until a nonzero result is obtained." <-- wouldn't that only loop a few times?
06:22
<&McMartin>
No, because the memory is not modified by these operations; the computation takes place in the accumulator.
06:22
<&McMartin>
Also, if you were to set MASK to zero, the entire system will hardlock~
06:23 ErikMesoy|sleep is now known as ErikMesoy
06:25
<@RStamer>
So one of those steps causes it to return zero often?
06:26
<@RStamer>
s/causes it to return/returns/
06:26
<&McMartin>
Having the last step be "AND 0" makes it return 0 100% of the time, yes.
06:26
<&McMartin>
What it's *for* is putting a watch on bits in volatile memory.
06:32
< Xires>
mm, this place officially seems cozy
06:33
<&McMartin>
(One can use WAIT 53260,16,16 for instance to wait until the bit associated with the joystick port 2 fire button was released)
06:34
<@RStamer>
Ah
06:34
<@RStamer>
Interesting
06:34 Derakon is now known as Derakon[AFK]
06:34
<&McMartin>
Basically, WAIT A, B, C is "halt the non-volatile parts of the system until PEEK(A) AND C = B)
06:35
<&McMartin>
Er, AND B = C.
06:52 Kindamoody is now known as Kindamoody|afk
08:20 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Client closed the connection]
09:08
<~Vornicus>
oh look, time to upgrade the Klotski solver.
09:08 Kindamoody|afk is now known as Kindamoody
09:16 You're now known as TheWatcher
09:36 Kindamoody is now known as Kindamoody|out
09:38
<@Tarinaky>
Where in the nine hells is this minus sign coming from!
09:41
<@Tarinaky>
I'm trying to integrate |sin x| from -pi to pi. I'm getting -4 instead of 4.
09:41
<@Tarinaky>
And I cannot, for the life of me, figure out why.
09:42
<@Tarinaky>
If you integrate sin you get /minus/ cos.
09:42
<@Tarinaky>
:/
09:43
<@Tarinaky>
And wolfram alpha won't give me the step by step solution for it.
09:44
<~Vornicus>
what are you asking of wolfram alpha?
09:44
<@Tarinaky>
integrate sin x
09:45
<~Vornicus>
yeah there's no steps for that, it's straight off the basic table.
09:45
<~Vornicus>
Okay, so |sin x| from -pi to pi.
09:45
<~Vornicus>
piecewise, you have: -sin x from -pi to 0, and sin x from 0 to pi
09:45
<@Tarinaky>
Right, so you get twice the integral from 0 to pi.
09:46
<~Vornicus>
okay, integral from 0 to pi of sin x is...
09:46
<@Tarinaky>
- cos x
09:46
<~Vornicus>
okay, so -cos(pi) is...
09:47
<@Tarinaky>
Oh. 1.
09:47
<@Tarinaky>
For some reason I thought it was -1. >.<
09:48
<~Vornicus>
and -cos(0) is...
09:48
<@Tarinaky>
I think I'm a lost cause >.<
09:48
<~Vornicus>
dropped signs are a very very common error.
09:49
<@Tarinaky>
I still can't do the integral of sin x cos nx thing.
09:49
<@Tarinaky>
Which is annyoing because it's always a question :/
09:49
<~Vornicus>
What's wrong?
09:49
<~Vornicus>
(assume n isn't 1, because you do indeed get special-cased there)
09:51
<@Tarinaky>
The 'what's wrong' is I'm a fucking idiot who can't seem to do math when it actually matters.
09:54
<@Tarinaky>
I can barely get through one question in 2 hours, never mind the paper :/
10:00
<~Vornicus>
okay. fixing klotski. step 1: change "occupied" to do a bunch of calculations from a pile of tuples instead of doing its own rectangle crunching.
10:01
<~Vornicus>
step 2: change "available moves" so that it does the same thing, and also searches each piece's full current move space.
10:03
<~Vornicus>
Tarinaky: it sounds to me like you're psyching yourself out a lot.
10:09
<@Tarinaky>
I can't seem to get my head around how to expand out the ratio after I've integrated it :/
10:09
<@Tarinaky>
I have...
10:09
<@Tarinaky>
\frac{cos(n-1)x}{n-1} - \frac{cos(n+1)x}{n+1}
10:10
<@Tarinaky>
I can form the denominator fine, that's n^2-1
10:10
<@Tarinaky>
But I can't get my head around the numerator :/
10:12
<~Vornicus>
it's (n+1)cos((n-1)x)-(n-1)cos((n+1)x)
10:12
<@Tarinaky>
That doesn't match what I'm trying to mangle it into as part of the question :/
10:13
<@Tarinaky>
I'm supposed to end up with a fourier series with 4/pi \sigma \frac{1}{4n^2-1} cos 2nx in the fourier series.
10:14
<~Vornicus>
step 3: change the boundary system from a simple rectangle to another pile of tuples.
10:14
<~Vornicus>
Step 2 actually I think I can get rid of that copypasta now.
10:17 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
10:48
<~Vornicus>
okay, step 1 done.
10:52 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
11:01
<~Vornicus>
oh cool, that does kill the copypasta. Now I'm kind of impressed, this got a lot simpler.
11:02 * TheWatcher arghs, flails at this auth code
11:10 * Vornicus uses set.isdisjoint(otherset) for the first time.
11:13
<@TheWatcher>
Multiple potential authentication methods, some of which require two-stage user activation while others don't, some of which support password reset while others don't... bleegh
11:14
<~Vornicus>
...and it runs the first time, and is correct. Victory!
11:14
<@TheWatcher>
\o/
11:15
<@Tarinaky>
"Suppose that the sequence (a_n) satisfies a_n != -1 for each n in N.
11:15
<@Tarinaky>
Prove that if \sigma a_n is absolutely convergent then \sigma \frac{a_n^2}{1+a_n) is absolutely convergent"
11:15
<~Vornicus>
(a little slower. but it gets the Layton move count correct, and I can now give it arbitrarily-shaped objects and boundaries)
11:15
<@Tarinaky>
I have... no idea what to start with there :/
11:17
<~Vornicus>
(True Klotski can be solved in 81 moves, where 1 move counts any sequence of steps made by the same block continuously)
11:20 * Vornicus now prepares to write the klotski problem he has been given so the program can understand it.
11:21
<~Vornicus>
I don't know about that one.
11:28
<~Vornicus>
Tarinaky: a_n^2/(1+a_n), now that I think on it, is In General close to a_n
11:28
<~Vornicus>
being a_n - 1 + 1/(a_n + 1)
11:30
<~Vornicus>
That may help you.
11:30
<~Vornicus>
Screw data entry, I'm going to sleep.
11:31
<@TheWatcher>
Nivorn
11:32 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has quit [[NS] Quit: ]
12:13 iospace is now known as iobleh
12:53 Nemu [NeophoxProd@Nightstar-a3dbf2b5.asahi-net.or.jp] has quit [Connection reset by peer]
12:55 Nemu [NeophoxProd@Nightstar-c5a5a5aa.asahi-net.or.jp] has joined #code
12:55 iobleh is now known as io|bleh
13:41 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds]
14:37 * TheWatcher finishes the reworking of this auth system. Has no idea if it'll actually /work/ but will find that out shortly...
15:02 ErikMesoy [Erik@A08927.B4421D.FE7332.A86588] has quit [Ping timeout: 121 seconds]
15:02 ErikMesoy [Erik@Nightstar-be32adc8.80-203-17.nextgentel.com] has joined #code
15:07
<@io|bleh>
https://twitter.com/DEVOPS_BORAT
15:19
<@RStamer>
I can't tell if I should take that seriously or not
15:20
<@TheWatcher>
It is a spoof, mostly.
15:20
<@TheWatcher>
(sometimes it is entirely too true...)
15:23
<@gnolam>
"You can download our code from the URL supplied. Good luck downloading the only postdoc who can get it to run, though"
15:24 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
15:24
<@froztbyte>
haha
16:09 Thalass|NB [thalass@Nightstar-724ec5eb.bigpond.net.au] has quit [Ping timeout: 121 seconds]
16:23 Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
16:27 Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
16:27 mode/#code [+o Courage] by ChanServ
16:34 Syk is now known as syksleep
16:39 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds]
17:00 RStamer is now known as ems
17:00 ems is now known as rms
17:19 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
17:56
<@Rhamphoryncus>
Bah, form letter responses, and from mojang no less
17:59
< RichyB>
They have like a million customers and fewer than 50 employees, don't htey?
17:59 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: >:3 This is BunThulhu. Copy him into your quit message to help him take over the Internet.]
18:01
<@Rhamphoryncus>
No idea how much they have in customer service
18:02
<@Rhamphoryncus>
It's just so typical though. It's a bug in their system, not something on my end
18:13 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
18:13 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
18:13 mode/#code [+ao Derakon Derakon] by ChanServ
18:22 Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
18:25 Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
18:25 mode/#code [+o Courage] by ChanServ
18:31 gnolam [lenin@Nightstar-bb103c17.cust.bredbandsbolaget.se] has quit [[NS] Quit: Reboot]
18:36 gnolam [lenin@Nightstar-bb103c17.cust.bredbandsbolaget.se] has joined #code
18:36 mode/#code [+o gnolam] by ChanServ
18:38 Kindamoody|out is now known as Kindamoody
18:47
<@gnolam>
https://twitter.com/oooarrr/status/288014002884337664
19:16 Kindamoody is now known as Kindamoody[zZz]
19:35
<@Alek>
"Life is like a folder chmod 111, you never know what it contains."
19:44
<@gnolam>
http://www.theverge.com/2013/1/8/3850056/qualcomms-insane-ces-2013-keynote-pictu res-tweets
19:46 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has joined #code
19:46 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:22
<@Alek>
http://notalwaysworking.com/know-it-all-boss/28151
20:32
<@Courage>
How many OCR programmers does it take to change a lightbulb?
20:33
<@Courage>
Tuuo - oria to saur it, on0 to sand it Io yiin lnoice
20:34
<@Azash>
Haha
20:34 * Alek slow claps.
20:41 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [Ping timeout: 121 seconds]
20:43 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
21:34 * Vornicus dataentries dataentries dataentries
21:42
<~Vornicus>
This problem takes 2 1/2 times as long for my solver to do, but the resulting move list is much shorter.
21:50
<~Vornicus>
(it goes through 2 1/2 times as many states too, so)
22:24 ErikMesoy is now known as ErikMesoy|sleep
22:34 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
22:39 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has quit [[NS] Quit: ]
22:57 Nemu [NeophoxProd@Nightstar-c5a5a5aa.asahi-net.or.jp] has quit [Connection reset by peer]
22:58 Nemu [NeophoxProd@Nightstar-14757de1.asahi-net.or.jp] has joined #code
23:03
< mac>
any one here ever worked in applescript?
23:11 Thalass|NB [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code
23:13
<@simon`>
hmm... let's say I want to write the shortest brainfuck program for printing either one unicode character or a series of 8-bit characters in a row.
23:14
<@simon`>
I think this relates to Kolmogorov complexity
23:17
<@simon`>
i.e. there is no deterministic way to achieve the smallest program for a given output.
23:19
<@simon`>
but I can settle with less if I find a good heuristic that works e.g. for some patterns of printable ASCII.
23:20
<@simon`>
I don't know if any of you have tried to write as small as possible brainfuck programs that print various strings
23:22
<@simon`>
but my experience is that you get into a bunch of patterns if either the letters are very close to each other (e.g. <5 apart), in which case they can be mutated without much cost, or farther apart, in which case it would have been better to create a copy of it that can be destroyed
23:23
<@simon`>
(e.g. if I should write AZA, I would prefer to 1) build A, 2) copy A into Z, 3) use A again, rather than 1) build A, 2) increase A to Z, 3) decrease Z into A.)
23:25 * ToxicFrog eyes the iPod Nano 6G
23:25
<&ToxicFrog>
Wow, this thing is useless
23:25
<@simon`>
so a heuristic I'm trying to express is one that predicts that I might want some number of copies available based on how many occurences of letters that are far apart
23:25
<@simon`>
(I'm just ranting if that's okay.)
23:25 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:25
<@simon`>
(or, I know it is. the topic encourages it!)
23:26
<@simon`>
but it gets more complicated than that, since I don't just want to limit myself from looking at adjacent letters and determining if a large difference warrants an extra copy.
23:28
<@simon`>
e.g. AZAZAZAZ... should, with a simple immediate-neighbour-difference heuristic determine that I need n/2 copies even though there is a much smaller program that can settle with just two cells built in some smart way.
23:29
<@simon`>
so I've run into something that according to my intuition is uncomputable.
23:30
<@simon`>
so I'll settle with less and limit my heuristic to /something/ that detects how many cells I need and how I should build them
23:32
<@simon`>
err... maybe I should start with a simple heuristic: I'll build the entire string in memory and then loop it. I'll find the average ASCII number of the string, a, create that many copies of floor(a) and adjust each of these up and down.
23:35
<@simon`>
if I can somehow divide those cells into groups of similar characters (I don't care about the order) and treat these groups differently based on how close they are, to begin with, I only have to write one generating program for each group, adjust them minimally and print them in the right order (either by generating them in the right place or by iterating through them -- this is a separate and less problematic part)
23:35
<&McMartin>
Is there some reason it's in Brainfuck?
23:36
<@simon`>
McMartin, yes, it's funny to write on blackboards and it provides some kind of easy metric where I don't feel I have to abuse my namespace by giving functions single digits, since that abuse has already been performed at the language design.
23:39
<@simon`>
McMartin, hmm... I think if I did it in another language, and the purpose would be to generate small strings, I would compete very much between being able to truncate simple things like "print" compared to the limited benefit of computing a string rather than simply writing it using a plain string literal.
23:40
<@simon`>
McMartin, i.e., computing and printing many ASCII characters takes several Brainfuck instructions but very few in any language with string literals, and the benefit of writing a generating function that isn't simply the string literal only shows itself as the string grows above something slightly larger than what I'd want to write on a blackboard for people to decipher.
23:41
<&McMartin>
Aha
23:42
<@simon`>
so yeah... I don't know if it's the exact same heuristics one would come up with if one had higher-level constructs available and the strings were longer...
23:42
<@simon`>
I'd probably come up with entirely different ways. e.g. trigonometric functions that approximate the result and then a short program that adjusts it.
23:43
<@simon`>
but in brainfuck, I suspect writing a trigonometric function would probably be an overhead that only paid off on larger inputs than "Hello".
23:50
<@simon`>
McMartin, also, it seems that writing short strings in any (perhaps any one) language quickly becomes a feat of abusing the language constructs that apply most well to the problem, whereas if using brainfuck, the language constructs themselves don't really contribute much, and the tricks are more general heuristics because all you do is loop and assign.
23:52
<@simon`>
I wonder if, when restricting oneself to generating English sentences of some approximate length, the best heuristics also include statistical analysis of the English language.
23:52
<&McMartin>
Mmm, chatbots
23:52
<@simon`>
heh
23:52
<@simon`>
have you written one before?
23:53
<@simon`>
I once put an Eggdrop plug-in using a Markov model onto Bitlbee / MSN chat and friend-requested my sister. I left it there for two weeks where all it did was talk and learn from her friends. the output was horrible, but so was their language.
23:54
<@simon`>
i.e. I had spent three ours teaching it to say proper things and it only failed on a few overloaded words
23:55
<@simon`>
and when I got back it was full of shouting, emoticons and insults.
23:57
<&McMartin>
I've made the occasional dissociated press system but no true chatbots.
23:58 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: This computer has gone to sleep]
--- Log closed Thu Jan 10 00:00:10 2013
code logs -> 2013 -> Wed, 09 Jan 2013< code.20130108.log - code.20130110.log >

[ Latest log file ]