--- Log opened Thu Dec 08 00:00:09 2016 |
00:07 | <&McMartin> | Oh hey, there's a numbered bug and probabe cause for it: https://news.ycombinator.com/item?id=12633395 |
00:07 | <@simon_> | in python, I've got this method: |
00:08 | <@simon_> | def intersperse(sequence, delimiter): |
00:08 | <@simon_> | """intersperse([a,b,c,d], x) = [a,x,b,x,c,x,d]""" |
00:08 | <@simon_> | it = iter(sequence) |
00:08 | <@simon_> | yield next(it) |
00:08 | <@simon_> | for x in it: |
00:08 | <@simon_> | yield delimiter |
00:08 | <@simon_> | yield x |
00:09 | <@simon_> | I'd like to use it to make another method, prependEach([a,b,c,d], x) = [x,a,x,b,x,c,x,d]. |
00:10 | <@simon_> | somehow, 'def prependEach(sequence, delimiter): yield delimiter ; return intersperse(sequence, delimiter)' doesn't work |
00:10 | <@simon_> | I know there's a combinator, itertools.chain, but then I'd have to define a generator that yielded just one value. |
00:12 | <@simon_> | is there another neat way, I wonder, to make a python generator from a single 'yield' and an existing generator, without adding yet another loop? I guess I could do: return [delimiter] + list(intersperse(sequence, delimiter)) and accept that it returns a list rather than a generator. |
00:12 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code |
00:12 | | mode/#code [+o himi] by ChanServ |
00:16 | <~Vornicus> | yield delimiter; for x in intersperse(...): yield x |
00:16 | <~Vornicus> | THough I remember reading a PEP that let you do this |
00:18 | <@simon_> | that lets me do it without the for? |
00:18 | <@Azash> | McMartin: I want to imagine the bug number is iterative |
00:18 | <@simon_> | I guess I'm stubborn by wanting a declarative solution to it. |
00:18 | <~Vornicus> | aha |
00:19 | <~Vornicus> | https://www.python.org/dev/peps/pep-0380/ |
00:19 | <@simon_> | def intersperse(sequence, delimiter): |
00:19 | <@simon_> | """intersperse([a,b,c,d], x) = [a,x,b,x,c,x,d]""" |
00:19 | <@simon_> | it = iter(sequence) |
00:19 | <@simon_> | yield next(it) |
00:19 | <@simon_> | for x in it: |
00:19 | <@simon_> | yield delimiter |
00:19 | <@simon_> | yield x |
00:19 | <@simon_> | def intersperse(sequence, delimiter): |
00:19 | <@simon_> | """intersperse([a,b,c,d], x) = [a,x,b,x,c,x,d]""" |
00:19 | <@simon_> | it = iter(sequence) |
00:19 | <@simon_> | yield next(it) |
00:19 | <@simon_> | for x in it: |
00:19 | <@simon_> | yield delimiter |
00:19 | <@simon_> | yield x |
00:19 | <@simon_> | sorry! |
00:19 | <@simon_> | bad keyboard! bad keyboard! |
00:19 | <&McMartin> | pwnt |
00:19 | <~Vornicus> | yield from intersperse(seq, del) |
00:20 | <~Vornicus> | Works in 3.3+ |
00:21 | <@simon_> | Vornicus, that is so awesome. thank you! |
00:22 | <@simon_> | Azash, irssi 0.8.17 |
00:22 | <@simon_> | Azash, my laptop is an X1 Carbon and I haven't figured out entirely how the trackpad works yet. |
00:28 | <@Azash> | simon_: /set paste_verify_line_count 1 |
00:28 | <@Azash> | /save |
00:30 | <@Azash> | /server purge is also a good command to remember |
00:42 | <@simon_> | I'll lower it to 3. :) it used to be 5. |
00:45 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed] |
04:29 | | Derakon[AFK] is now known as Derakon |
05:12 | | Derakon is now known as Derakon[AFK] |
05:15 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
05:17 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds] |
05:36 | <&McMartin> | Holy crap |
05:36 | | * McMartin gets Pulse Width Modulation to work on the PC Speaker |
05:36 | <&McMartin> | That is *implausibly* good on DOSBox. |
05:49 | <&McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/retro/pcspeakr.zip |
05:55 | <&McMartin> | I have also just tested it on real hardware. |
05:55 | <&McMartin> | It really is that insanely good. |
05:55 | <&McMartin> | Holy cheese. |
06:00 | <&McMartin> | Also, OSDev is kind of full of shit with their sample code and I'm considering registering just to Show Them All |
06:18 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
06:18 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
06:24 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
07:36 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code |
07:36 | | mode/#code [+o himi] by ChanServ |
07:40 | | Ryzer [none@Nightstar-ccb.ec4.125.50.IP] has joined #code |
08:05 | | Ryzer [none@Nightstar-ccb.ec4.125.50.IP] has quit [Ping timeout: 121 seconds] |
08:14 | | celticminstrel [celticminst@Nightstar-h4m24u.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
08:39 | | Kindamoody[zZz] is now known as Kindamoody |
08:56 | <&McMartin> | I'll still need to do proper writeups and explanations, but the code is posted. https://github.com/michaelcmartin/bumbershoot/tree/master/dos/sound |
09:36 | | Kindamoody is now known as Kindamoody|afk |
11:59 | | catadroid [catalyst@Nightstar-u9cio4.dab.02.net] has joined #code |
12:05 | < catadroid> | I have implementation ideas. I have an idea how to implement it. I'm stuck at work writing python :< |
12:06 | < catadroid> | I have language* |
12:06 | < catadroid> | Ideas |
12:06 | < catadroid> | I'm bad at English |
12:06 | | * catadroid burns everything and starts again |
12:06 | < catadroid> | I've got the evaluation strategy on paper and I want to code it but I can't because I'm stuck at work doing things that aren't inventing new languages. |
12:11 | | * VirusJTG hands cata a pint |
13:01 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
13:01 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
13:23 | <@TheWatcher> | I should probably link this in here, I guess |
13:23 | <@TheWatcher> | This is interesting, and kinda terrifying: https://www.nngroup.com/articles/computer-skill-levels/ |
13:32 | <@Tamber> | *grimace* |
13:33 | <@Tamber> | I wonder how many of that "Can't use computers" section were the "Won't, so can't!" type |
13:36 | <@TheWatcher> | I was kinda shocked by Japan's stats for that |
13:51 | | celticminstrel [celticminst@Nightstar-h4m24u.dsl.bell.ca] has joined #code |
13:51 | | mode/#code [+o celticminstrel] by ChanServ |
14:18 | < catadroid> | I showed my mathematical colleague my ideas and he said he found them genuinely interesting |
14:18 | | * catadroid blinks |
14:18 | < catadroid> | It would take a while to write them in here :< |
14:25 | <@simon_> | catadroid, the programming language ideas? |
14:25 | <@simon_> | catadroid, sounds awesome. I never have any genuine PL ideas, and I always want to make compilers. |
14:26 | <@simon_> | catadroid, so I indulge in stuff like metaphor-oriented programming (http://bunny.xeny.net/linked/Homespring-Proposed-Language-Standard.pdf ) |
14:29 | | * Vornicus wrote a programming language once! |
14:29 | <@celticminstrel> | Oh? |
14:30 | <@simon_> | I only wrote a bunch of compilers as a TA. but they were either "Pascal-like", "C-like", "ML-like". only interesting compilers I wrote were for reversible languages, and that's even more obscure than most PL paradigms that are trying to be obscure. |
14:31 | <~Vornicus> | It was, uh, way before i knew what was interesting about different programming languages. |
14:32 | <@simon_> | hehe |
14:33 | <@simon_> | I did a few of those... like stupid syntax for generic, imperative languages :P |
14:33 | <~Vornicus> | It extended the ternary operator: an if statement was foo??bar();baz():quux();quuux(). |
14:33 | <@simon_> | how would that work? |
14:34 | <@simon_> | https://en.wikipedia.org/wiki/COMEFROM |
14:35 | <~Vornicus> | that's the same as if(foo) {bar(); baz();} else {quux(); quuux();} |
14:35 | <~Vornicus> | then it had while which worked the same way except it was @ instead |
14:35 | <@simon_> | ah. |
14:36 | <~Vornicus> | (the '.' is part of the thing there) |
14:37 | <~Vornicus> | the other interesting thing about it was that 'd' and 'D' were operators; it was designed for a dicebot. |
14:37 | <@simon_> | does anyone here know if there exists an APL that uses Unicode instead of its own weird charset and font? |
14:37 | <~Vornicus> | The terp stopped working around the release of python 2.2 because I had created things called True and False |
16:16 | | catadroid` [catalyst@Nightstar-1m93is.dab.02.net] has joined #code |
16:19 | | catadroid [catalyst@Nightstar-u9cio4.dab.02.net] has quit [Ping timeout: 121 seconds] |
16:29 | | catadroid` is now known as catadroid |
16:44 | | gnolam [quassel@Nightstar-lhk.n94.131.88.IP] has joined #code |
16:44 | | mode/#code [+o gnolam] by ChanServ |
17:16 | <@Azash> | http://shivankaul.com/blog/2016/12/07/clean-your-desk-yet-another-amazon-intervi ew-experience.html |
17:29 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
17:29 | | mode/#code [+o Emmy] by ChanServ |
17:34 | <@celticminstrel> | o.o |
17:38 | | Kindamoody|afk is now known as Kindamoody |
17:59 | < catadroid> | Yup, I just wrote a function that recursively calculates the length of a sequence using only maps if symbols and substitution lookup as an eval mechanism |
17:59 | < catadroid> | I feel badass |
17:59 | < catadroid> | Maps of symbols* |
17:59 | < catadroid> | (a symbol is also a sequence defined as a map) |
18:00 | | * McMartin reads the article about user sophistication |
18:01 | <&McMartin> | Unlike Tamber, *I* wonder how many of the people would be unable to perform those tasks given a sheet of records and a telephone. |
18:01 | <@Tamber> | ...that is also highly possible. |
18:10 | <~Vornicus> | are you suggesting that it would be similar, or that phones are easier or possibly harder? |
18:12 | <&McMartin> | I'm suggesting merely that the ability to perform light clerical tasks was not measured at all. |
18:12 | <~Vornicus> | ah, well |
18:12 | <&McMartin> | With an implication that some of the lowest levels indeed might be similar. |
18:13 | <&McMartin> | "Here's all the office mail of the last week *stack of paper* Schedule a meeting in a room when it's free at a time that all participants can make" |
18:28 | <@ErikMesoy> | And I have an acquaintance who worried that this is a marker on the path dumbing down and removing level 2-ish *interfaces* for users until there's very little between FaceApple Bright Shiny Buttons and writing your own data manager. |
18:30 | <&McMartin> | This is also known as "automating away clerical jobs" >_> |
18:30 | | * catadroid twirls |
18:30 | < catadroid> | I feel all powerful |
18:31 | <&McMartin> | ErikMesoy: I think it would be interesting to actually grade historical stuff on that scale |
18:31 | <&[R]> | To be fair, if people didn't annoy us enough to replace them with incredibly small shell scripts, then this wouldn't be a problem. |
18:31 | <&McMartin> | There's a whole lot of differences, on multiple axes, between Ruby on Rails and HyperCard. |
18:32 | | Ryzer [none@Nightstar-ccb.ec4.125.50.IP] has joined #code |
18:32 | <@ErikMesoy> | McMartin: Yeah, I don't really have a good vocabulary for talking about it |
18:32 | | Ryzer [none@Nightstar-ccb.ec4.125.50.IP] has quit [[NS] Quit: ] |
18:32 | <&McMartin> | [R]: To also be fair, anyone who thinks secretarial work can be automated away trivially has never seen a really good secretary/admin assistant at work |
18:33 | | * [R] was mostly joking |
18:33 | <&McMartin> | Because the true meeting-organization task is actually not as in this case... |
18:33 | <&[R]> | Yeah, good admin assistants are amazing though |
18:34 | <&McMartin> | ... it's 'here are 12 people who want to have a meeting and who *claim* that their schedules all conflict. Make that stop being true without them noticing and then schedule the meeting." |
18:35 | <@ErikMesoy> | But I have the intuition that there can and should exist some kind of interface that is optional and... how do I put this |
18:36 | <&McMartin> | Doesn't require deep knowledge of this system's internals and quirks? |
18:36 | <@ErikMesoy> | its features and powers should be level 3+, something like a "VHLL" for what it binds to a single button or chord, but still more discoverable and intuitive than a stdlib. |
18:36 | <&McMartin> | Mmm |
18:37 | <@ErikMesoy> | And requiring much less input than writing any code. |
18:37 | <&McMartin> | I think that's all at level 3 levels there. |
18:37 | <&McMartin> | I agree that being scriptable is not a replacement for being batteries included. |
18:37 | <&McMartin> | But it seems like the essence of level 3 tasks here is "If I run this program, I will be able to find out the information I need to give to this other program" |
18:38 | <@ErikMesoy> | Mmhm. |
18:39 | <&McMartin> | My intuition is that lacking the ability to make that leap would inhibit you more broadly. |
18:40 | | Kindamoody is now known as Kindamoody[zZz] |
18:41 | <~Vornicus> | (giving a secretary a decent automation tool makes that secretary more frighteningly good at what they do) |
18:42 | <&McMartin> | (Yes) |
19:18 | | Alek [Alek@Nightstar-cltq0r.il.comcast.net] has quit [Ping timeout: 121 seconds] |
19:22 | | Alek [Alek@Nightstar-cltq0r.il.comcast.net] has joined #code |
19:22 | | mode/#code [+o Alek] by ChanServ |
19:30 | | catadroid` [catalyst@Nightstar-1m93is.dab.02.net] has joined #code |
19:30 | | catadroid [catalyst@Nightstar-1m93is.dab.02.net] has quit [The TLS connection was non-properly terminated.] |
19:40 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
19:42 | | gnolam [quassel@Nightstar-lhk.n94.131.88.IP] has quit [[NS] Quit: Gone] |
19:44 | | catadroid` [catalyst@Nightstar-1m93is.dab.02.net] has quit [Ping timeout: 121 seconds] |
19:56 | | [R] [rstamer@genoce.org] has quit [Operation timed out] |
19:56 | | [R] [rstamer@Nightstar-d7h8ki.org] has joined #code |
19:56 | | mode/#code [+ao [R] [R]] by ChanServ |
20:10 | <&jerith> | A proper secretary is not a person who takes dictation and replies to the boring email. |
20:12 | <&jerith> | A proper secretary is the kind of person who causes "minister of foreign affairs" to be called "secretary of state". |
20:12 | <@Tamber> | A keeper of secrets, one might say? |
20:21 | <&jerith> | That's part of it. |
20:22 | <~Vornicus> | (is it just me or do programmers tend to hold secretaries in high regard) |
20:23 | <&jerith> | I think all right-thinking people do. |
20:23 | <&McMartin> | Ops wrangles the silicon, admin assistants wrangle the carbon |
20:24 | <&jerith> | Is "admin assistant" a job title for a modern secretary? |
20:24 | <&jerith> | Because if so, I don't like it. |
20:24 | <&jerith> | (I see an admin assistant as someone who just handles the paperwork, etc.) |
20:25 | <&jerith> | It's really the "assistant" bit that I object to. |
20:26 | <&McMartin> | jerith: Hrm. I'm used to it meaning "wrangles the carbon" but not, for instance, "keeps the notes" |
20:26 | <&jerith> | Probably just a cultural difference, then. |
20:26 | <@Tamber> | Vornicus, that's because secretaries actually run the place~ |
20:27 | <&McMartin> | When I was an upperclassman, I belonged to an organization that included both a Recording Secretary and a Corresponding Secretary, both of which took notes and handled paperwork, respectively. |
20:27 | <&McMartin> | But they didn't actually keep everyone pointed in the right direction and they didn't have any responsibilities to keep stuff running smoothly. |
20:27 | <&McMartin> | "Admin assistant" is the title where "actually running the place" is the official job. |
20:27 | <&McMartin> | But in the, well, administrative sense |
20:28 | <&McMartin> | Making sure the janitors show up, etc. would be "office manager" |
20:28 | <&jerith> | Here, an admin assistant is usually someone who *should* be running the place, but lacks the authority to do so. |
20:28 | <&McMartin> | By that do you mean "underappreciated" or "executes policy but doesn't set it" |
20:29 | <&McMartin> | The latter is also true here |
20:29 | <&McMartin> | ... and that's not a terribly unusual dichotomy, tbh? |
20:31 | <&jerith> | I mean more "expected to do these things, but seen as unimportant and therefore ignored by many of the people who need to be herded". |
20:32 | <&McMartin> | Ah, I see |
20:32 | <&McMartin> | Yeah, this is a cultural difference, then. |
20:33 | <&McMartin> | Here the "assistant" part does or at least can instead restrict itself to "executes policy, doesn't set it" |
20:33 | <&McMartin> | Which usually means "whining and wheedling will get you nowhere" |
20:33 | <&jerith> | Or maybe it's just that I've mostly seen that job title in dysfunctional organisations. |
20:33 | <&McMartin> | Which may add to the mystique, actually~ |
20:33 | <&McMartin> | When the silicon complains, *we* have to bend~ |
20:34 | <&jerith> | I bend to the complaining silicon far more than I'd like. |
20:35 | <&jerith> | But at least I have a vast body of evidence that my systems can limp along and provide *some* service at least even in the most hostile of environments. |
20:46 | | Kindamoody[zZz] is now known as Kindamoody |
21:02 | | gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code |
21:02 | | mode/#code [+o gnolam] by ChanServ |
22:04 | | Alek [Alek@Nightstar-cltq0r.il.comcast.net] has quit [Ping timeout: 121 seconds] |
22:07 | | Alek [Alek@Nightstar-cltq0r.il.comcast.net] has joined #code |
22:07 | | mode/#code [+o Alek] by ChanServ |
22:10 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
23:00 | | Kindamoody is now known as Kindamoody[zZz] |
23:47 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code |
23:48 | | mode/#code [+o himi] by ChanServ |
--- Log closed Fri Dec 09 00:00:10 2016 |