<<Prev Next>> Scroll to Bottom
Stuff goes here
L1[00:04:34] <Mimiru> well.. I'm trying to reproduce it here... and it won't happen now
L2[00:04:55] <Mimiru> when I first loaded up the world, the computer was broken
L3[00:05:04] <Mimiru> but now it wont break again lol
L4[00:06:29] <payonel> hmm, mind sending me the server log? might have something
L5[00:07:16] <Mimiru> well, I'm pretty sure it was from when it was on Lizzy's server
L6[00:07:31] <Mimiru> and I don't have those logs, AMP put them outside the main dir
L7[00:07:37] <payonel> i see
L8[00:08:41] <Mimiru> but I remember watching the console back then, and seeing nothing.
L9[00:08:46] <Mimiru> I actually found the logs
L10[00:10:04] <Mimiru> https://drive.pc-logix.com/index.php/s/yYbkctinWsH88K4 Lots of them there
L11[00:25:11] <payonel> Izaya: https://oc.cil.li/index.php?/topic/1753-ngsh-an-experimental-remote-shell-bridge-between-oc-and-unix-like-oses/
L12[00:42:49] <payonel> Mimiru: wow, i checked all of those logs somewhat carefully and found nothing of note
L13[01:10:08] <Izaya> https://i.redd.it/xisncgrza0v11.jpg
L14[01:28:03] ⇦ Quits: jrddunbr (jrddunbr!~jared@2600-6c65-7004-0100-d405-5e98-8fa8-3e45.dhcp6.chtrptr.net) (Ping timeout: 190 seconds)
L15[01:28:14] ⇨ Joins: jrddunbr (jrddunbr!~jared@2600-6c65-7004-0100-d405-5e98-8fa8-3e45.dhcp6.chtrptr.net)
L16[02:16:47] <Forecaster> there's more beyond, beyond the beyond, obviously
L17[06:25:37] ⇨ Joins: Vexatos (Vexatos!~Vexatos@p200300C107205E017B09AC31049C5B22.dip0.t-ipconnect.de)
L18[06:25:37] zsh sets mode: +v on Vexatos
L19[06:59:04] <Kodos> No more chili before bed for me
L20[07:01:50] ⇨ Joins: polyzium (polyzium!~polyzium@89.207.223.202)
L21[07:27:07] <polyzium> payonel, what's up man
L22[07:27:26] <polyzium> You said you wanted to merge my tty fixes right?
L23[08:19:20] ⇦ Quits: Renari (Renari!~Renari@70.15.18.61.res-cmts.sm.ptd.net) (Ping timeout: 200 seconds)
L24[08:23:05] ⇨ Joins: Renari (Renari!~Renari@70.15.18.61.res-cmts.sm.ptd.net)
L25[08:41:33] ⇨ Joins: samu02 (samu02!webchat@146-241-36-96.dyn.eolo.it)
L26[09:08:20] <polyzium> Ran the latest dev build, apparently the reverse video is fixed but not backspace
L27[09:36:42] ⇨ Joins: OmegaRogue (OmegaRogue!~OmegaRogu@x2f7ff86.dyn.telefonica.de)
L28[09:39:41] <Forecaster> https://twitter.com/FluffSociety/status/1056591447233908739?s=19
L29[09:43:10] ⇦ Quits: OmegaRogue (OmegaRogue!~OmegaRogu@x2f7ff86.dyn.telefonica.de) (Remote host closed the connection)
L30[09:51:03] ⇨ Joins: feldim2425_ (feldim2425_!~feldim242@93-82-138-153.adsl.highway.telekom.at)
L31[09:52:13] ⇦ Quits: feldim2425 (feldim2425!~feldim242@93-82-157-252.adsl.highway.telekom.at) (Ping timeout: 190 seconds)
L32[09:52:14] *** feldim2425_ is now known as feldim2425
L33[10:00:20] <Forecaster> Amanda, payonel: ^
L34[10:00:24] <Forecaster> cat.
L35[10:01:24] <polyzium> I'm afraid payonel is off
L36[10:02:29] <AmandaC> HOW VERY DARE YOU INTERRUPT MY-- Ooo kitty! ?
L37[10:30:33] ⇦ Quits: Icedream (Icedream!~icedream@212.83.173.97) (Ping timeout: 190 seconds)
L38[10:31:17] ⇨ Joins: Thutmose (Thutmose!~Patrick@host-69-59-79-181.nctv.com)
L39[10:47:19] ⇨ Joins: Icedream (Icedream!~icedream@212.83.173.97)
L40[10:59:57] <Temia> Cat? ' u'
L41[11:00:14] ⇨ Joins: baschdel (baschdel!~baschdel@2a01:5c0:e090:ca91:9809:c242:f038:6cd)
L42[11:18:16] <Compu> AmandaC: https://media.discordapp.net/attachments/454546225153441792/476908564103954452/20180808_202402.jpg https://cdn.discordapp.com/attachments/454546225153441792/476908869998739471/20180808_202513.jpg
L43[11:49:35] <asie> best pony
L44[11:49:51] <AmandaC> That's a cat, silly asie
L45[11:50:01] <asie> no not that one
L46[11:50:10] <asie> besides if elon musk can get away with calling a wolfgirl a catgirl
L47[11:50:14] <asie> i can get away with calling a cat a pony
L48[11:50:17] <asie> duh
L49[12:00:45] <Skye> awugirl
L50[12:10:03] <Compu> it's my mom's cat enjoying my fluttershy scarf
L51[12:12:10] ⇦ Quits: MajGenRelativity (MajGenRelativity!~MajGenRel@c-73-123-203-209.hsd1.ma.comcast.net) (Read error: -0x1: UNKNOWN ERROR CODE (0001))
L52[12:12:30] ⇨ Joins: MajGenRelativity (MajGenRelativity!~MajGenRel@c-73-123-203-209.hsd1.ma.comcast.net)
L53[12:21:56] ⇦ Quits: samu02 (samu02!webchat@146-241-36-96.dyn.eolo.it) (Quit: webchat.esper.net)
L54[12:24:11] <Lizzy> Mimiru, your key is still valid on that server :) you just need to do the knock sequence first
L55[12:43:47] <Forecaster> Ah, coming home to the sound of a child screaming
L56[12:43:54] <Forecaster> Lovely
L57[12:48:08] <Forecaster> At least it's not mine
L58[12:51:35] <AmandaC> you have a children?
L59[12:57:53] <Forecaster> Nope
L60[13:00:44] <payonel> polyzium: o/
L61[13:00:52] <polyzium> Ay
L62[13:01:07] ⇨ Joins: Inari (Inari!~Pinkishu@p5DEC6768.dip0.t-ipconnect.de)
L63[13:01:24] <polyzium> Looks like you did a lot of work on VT100, ncurses apps are more or less stable now
L64[13:03:11] <Skye> ncurses? OC?!
L65[13:03:20] <asie> remote
L66[13:03:55] <polyzium> Remotely done
L67[13:04:04] <Inari> Anyone else in here develop a habit of cleating the clipboard regularily (or often also after pasting what you wanted to paste) (i.e. copy a single letter to replace what was in it before)
L68[13:04:13] <payonel> polyzium: i dont think there are any changes you made that i won't incorporate
L69[13:04:46] <payonel> but it would be good to be on the same page as to what those changes are, that is all
L70[13:04:47] * Inari pets AmandaC to increase shareholder value
L71[13:05:06] <Vexatos> Inari, I actually have a clipboard history ,-,
L72[13:05:11] <payonel> just wanted to make sure i get them all
L73[13:06:01] * AmandaC looks at Inari, wondering how that works
L74[13:06:18] <payonel> polyzium: i'll make a github issue and list the things you've added/changed, i'll ping you in github (you have a profile there?) and you can verify i've covered the basis
L75[13:06:24] <polyzium> payonel, right now I fixed Shift In, \r and \b
L76[13:06:27] <payonel> i'll link a PR to it as well
L77[13:06:37] <polyzium> About reverse video, you did it on your own
L78[13:06:47] <payonel> any other vt100 changes besides that?
L79[13:07:02] <polyzium> I plan to fix some
L80[13:07:03] <Inari> http://avsport.org/microcomm/admin/busplan.pdf
L81[13:07:12] <polyzium> but they aren't interpreted atm
L82[13:07:46] <polyzium> for example \ec or \e[R
L83[13:08:03] <polyzium> or \e[?2004h which can be ignored
L84[13:08:33] <polyzium> payonel, should I fetch your recent tty libs first?
L85[13:08:47] <polyzium> Also yes I have a github account
L86[13:09:21] <payonel> working off of latest is always recommended ;)
L87[13:09:30] <payonel> openos is identical between mc versions, btw
L88[13:09:39] <polyzium> Ikr
L89[13:09:43] <polyzium> Lemme do that
L90[13:09:46] <payonel> i.e "latest" oc for MC x.y is the same
L91[13:09:53] <payonel> i'll be adding your tty changes, too
L92[13:10:04] <payonel> the \b, \r, probably shift in too
L93[13:10:17] <payonel> i dont care anymore about non unix line endings
L94[13:10:23] <payonel> as far as tty is concerned
L95[13:10:47] <polyzium> Alright then
L96[13:10:59] <polyzium> I can take my reverse video fix off the shelf
L97[13:11:51] <AmandaC> Inari: ah
L98[13:11:59] <Inari> AmandaC: :D
L99[13:12:07] <Inari> AmandaC: I found the audiobook version of that hugely amusing
L100[13:14:13] <Inari> http://www.jacopocolo.com/hexclock/
L101[13:14:48] <polyzium> payonel, https://github.com/polyzium my github profile
L102[13:46:06] <Kodos> Dis the steam autumn sale start today
L103[13:50:26] <Temia> squonk
L104[13:53:08] <Kodos> %tonk
L105[13:53:09] <MichiBot> I'm sorry Kodos, you were not able to beat asie's record of 3 weeks, 6 days, 15 hours, 4 minutes and 38 seconds this time.
L106[13:53:10] <MichiBot> 1 week, 1 day, 6 hours, 40 minutes and 13 seconds were wasted!
L107[13:53:18] <Inari> Lame
L108[13:53:31] <asie> you expected MGR, but it was I, asie!
L109[13:53:36] <asie> with the tonk I scored for minitel
L110[13:55:39] <AmandaC> asie: stop harassing the Jostar family!
L111[13:55:42] <Compu> asie https://derpicdn.net/img/2015/10/20/1006367/full.png
L112[13:55:47] <MGR> k
L113[13:55:59] <asie> that's not best pony
L114[14:01:15] <Mettaton_Fab> Marco Reps does thing
L115[14:06:34] <payonel> polyzium: i'm not fully in support of ignoring unsupported codes, Shift In being one
L116[14:06:42] <payonel> polyzium: how many others might there be?
L117[14:06:59] <payonel> i'm partially in support, i'm just thinking about our approach
L118[14:07:16] <payonel> it makes sense to ignore it, but i also don't want to bloat the tty code
L119[14:07:38] <payonel> one single if check is not "bloat", but....it's always something i consider with any change
L120[14:08:23] <polyzium> Well I want to support the escape codes that I usually see
L121[14:08:26] <payonel> and reverse video was the only change? but your link had an update for vt100 as well as the core/full_vt
L122[14:08:43] <polyzium> To VT100 itself? Yes it was
L123[14:08:57] <payonel> well adding escape code support is just adding rules to the vt100 engine, which is fine
L124[14:09:03] <polyzium> But right now I want to expand it
L125[14:09:08] <polyzium> Also are they regex based?
L126[14:09:24] <payonel> yes
L127[14:09:35] <payonel> i can help you write the rules, if you have new rules
L128[14:09:57] <polyzium> That would be appreciated since I don't usually do regex stuff
L129[14:10:27] <AmandaC> regex is easy! Just grab your goat to sacrafice....
L130[14:10:35] <polyzium> XD
L131[14:10:44] <AmandaC> make sure it's a pure-blooded virgin goat, ofc
L132[14:11:06] <polyzium> You reminded me of installing Linux on a dead badger
L133[14:11:22] <payonel> well, and my vt100 rules engine has a special concise nature to it, it hides its complexity
L134[14:11:37] <payonel> polyzium: https://github.com/MightyPirates/OpenComputers/issues/2971
L135[14:11:38] <MichiBot> Title: tty updates | Posted by: payonel | Posted: Mon Oct 29 14:09:57 CDT 2018 | Status: open
L136[14:12:15] <payonel> we can add to that ticket things you care about
L137[14:12:17] <polyzium> Thanks
L138[14:12:32] <payonel> but as for shift in, is that the only tty code you expect?
L139[14:12:40] <polyzium> So do I need to make a pull request or something
L140[14:12:42] <payonel> escape codes being separate
L141[14:12:59] <payonel> no need, i plan to
L142[14:13:17] <polyzium> I saw it in a lot of ncurses apps
L143[14:13:36] <polyzium> So I guess yes, together with \b, \r, etc
L144[14:15:22] <AmandaC> %choose ? or ? or ☢️ or meh
L145[14:15:23] <MichiBot> AmandaC: One the one hand, there's ? but then there's also meh
L146[14:15:32] <AmandaC> right, space weed it is
L147[14:21:51] <polyzium> payonel, what do the arguments inside the function correspond to?
L148[14:22:20] <polyzium> I guess separate regexes in strings?
L149[14:22:28] <payonel> polyzium: the captures
L150[14:22:51] <payonel> AmandaC: does stationeers have video surveillance now!?!?!!!??
L151[14:23:04] <polyzium> Uh sorry I didn't get you there
L152[14:23:22] <payonel> you're asking about (for example) this: rules[{"%[", "[%d;]*", "m"}] = function(window, _, number_text) ...
L153[14:23:24] <payonel> right?
L154[14:23:24] <AmandaC> payonel: video surveillance?
L155[14:23:27] <polyzium> Yes
L156[14:23:42] <payonel> the first param is the tty.window, always
L157[14:23:50] <polyzium> Yeah I noticed that
L158[14:23:54] <payonel> then then next n params correspond to the rule pattern cpatures
L159[14:24:06] <payonel> so: {"%[", "[%d;]*", "m"}
L160[14:24:21] <payonel> so function(window, a, b, c)
L161[14:24:26] <payonel> a=="[" always
L162[14:24:43] <payonel> e.g. b == "1919;"
L163[14:24:46] <payonel> and c == "m"
L164[14:25:15] <polyzium> So 3 regexes are 3 function args
L165[14:25:17] <polyzium> the last ones
L166[14:25:31] <payonel> yes
L167[14:26:08] <payonel> AmandaC: from screenshots, from saddamo de beers: https://cdn.discordapp.com/attachments/277623217701781505/506292582205227028/Screenshot_-_29.10.2018__2_26_42.jpg
L168[14:26:52] <AmandaC> payonel: oh, those are in the game, but not accessible without a mod. They're not enabled with recipies by default because they're buggy in multiplayer in ways that aren't really feasible to fix
L169[14:27:13] <payonel> hrm
L170[14:27:18] <payonel> well, i never did play mp anyways
L171[14:27:21] <payonel> but they look neat
L172[14:31:34] <payonel> polyzium: btw, you are free to append rules
L173[14:31:49] <payonel> it's not an official api only because i haven't documented it
L174[14:32:00] <payonel> but its api to me because i do plan on keeping it exactly as it is
L175[14:32:06] <polyzium> That's what I'm doing
L176[14:32:20] <payonel> well, i mean (and maybe you are already doing this)
L177[14:32:27] <payonel> without modifying core/full_vt.lua
L178[14:32:43] <polyzium> Oh crap
L179[14:32:54] <payonel> you can just take require("vt100"), and vt100.rules[...] = ...
L180[14:32:59] <payonel> to add rules
L181[14:33:15] <payonel> you could do that right in your own programs
L182[14:33:17] <polyzium> Oh so I can just use my own rule file?
L183[14:33:22] <payonel> yes
L184[14:33:38] <polyzium> Alright then
L185[14:33:38] <payonel> you just require "vt100" and add to the rules
L186[14:33:58] <polyzium> Yeah
L187[14:34:18] <polyzium> Anyway so the only changes need to be pushed are the control character changes
L188[14:34:29] <polyzium> If I see more I'll let you know
L189[14:34:39] <payonel> \r, \b, and shift in?
L190[14:34:44] <polyzium> Yeah, for now
L191[14:38:08] <polyzium> payonel, do I need to upload the merged file into the issue's attachments?
L192[14:38:24] <payonel> which file is merged? tty?
L193[14:38:35] <polyzium> Yes
L194[14:38:47] <payonel> sure, for ref, but the changes are simple and i'm fine
L195[14:38:47] <polyzium> VT100 can be ignored since you can make your own rules
L196[14:38:59] <payonel> right, though i am interested in the rules you add
L197[14:39:17] <payonel> if they makes for prosperity, i might like to add them
L198[14:39:33] <polyzium> For now I'm trying to implement \ec and \e[2004[hl]
L199[14:39:49] <polyzium> \e[?2004[hl] made a typo
L200[14:41:14] <payonel> is that a literal ?
L201[14:41:34] <polyzium> Yes it is
L202[14:41:41] <payonel> you want the rules to remain "valid" while incomplete, btw
L203[14:41:57] <payonel> is there another number in that set?
L204[14:42:06] <payonel> like, \e[?1234...
L205[14:42:10] <payonel> followed by anything else?
L206[14:42:27] <polyzium> \e[?1002l
L207[14:42:30] <polyzium> and similar
L208[14:42:45] <polyzium> Actually when tmux exists, it prints this
L209[14:43:36] <polyzium> \e[?25h\e[?0c\e[?1000l\e[?1002l\e[?1006l\e[?1005l
L210[14:43:51] <polyzium> Also what about the cursor?
L211[14:45:10] <polyzium> Another weird escape sequence by zsh
L212[14:45:21] <polyzium> \e[A\e[A
L213[14:45:45] <payonel> so currently, nowrap is defined by: {"%[", "%?", "7", "[hl]"}
L214[14:46:04] <payonel> so if you are defining number groups, you might interfere with that
L215[14:46:13] <payonel> that means ...
L216[14:46:37] <payonel> { "%[", "%?", "%d+", "[hl]" }
L217[14:46:50] <payonel> isn't really valid for your new rules, because that would grab the nowrap
L218[14:47:16] <payonel> unless you chose to juse reimplement nowrap
L219[14:47:19] <payonel> just*
L220[14:47:43] <polyzium> Yeah I would reimplement nowrap
L221[14:48:11] <payonel> another option is to be explicit (e.g.): { "%[", "%?", "2", "0", "0", "4", "[hl]" }
L222[14:48:14] <polyzium> However may I do it like so? rules[{"%[", "%?", "2004", "[hl]"}]
L223[14:48:29] <payonel> yeah, the reason "2004" doesn't really work is because if you write:
L224[14:48:33] <polyzium> Oh god
L225[14:48:47] <payonel> io.write("\27[?20", "04h")
L226[14:48:59] <payonel> then the rule fails
L227[14:49:11] <polyzium> Oh so each character must be registered
L228[14:49:13] <polyzium> Okay then
L229[14:49:22] <payonel> each ... smallest writable piece
L230[14:49:33] <payonel> if you know 2004 won't be split, you can match for it
L231[14:50:06] <payonel> but a rule must be a "potential" while it is incomplete
L232[14:50:39] <polyzium> Alright, gotcha
L233[14:51:15] <polyzium> So apparently github doesn't like lua files
L234[14:51:18] <polyzium> Uploading to gist
L235[14:51:27] <payonel> i have gist lua files
L236[14:52:22] <payonel> e.g. https://gist.github.com/payonel/b6ce73c42ddf168cb59b77dad8689941
L237[14:53:18] <polyzium> https://gist.github.com/polyzium/712ee9011012176d13d3881e6344a34b
L238[14:53:49] <payonel> and what do you mean by "This can be easily exploited"
L239[14:53:56] <payonel> by "exploit" do you mean "take advantage of" ?
L240[14:54:23] <polyzium> Probably
L241[14:54:27] <polyzium> That feels out of place
L242[14:54:30] <payonel> probably?!
L243[14:54:33] <payonel> didn't you write it? :)
L244[14:54:43] <polyzium> Yes I did
L245[14:54:52] <payonel> haha, ok :/
L246[14:55:15] <polyzium> I wrote "this can be easily exploited" because I remember someone made a sandbox for applications and it had the exact same problem
L247[14:55:19] <polyzium> \r making a newline
L248[14:55:48] <polyzium> And this sandbox would pipe the process's output into discord
L249[14:58:09] <Mimiru> @Lizzy, I got in without knocking.. forgot to
L250[14:58:48] <Lizzy> oh... then i haven't yet set it up on that server... oh well
L251[14:59:02] <polyzium> Brb
L252[15:10:08] <polyzium> Back
L253[15:31:38] ⇦ Quits: baschdel (baschdel!~baschdel@2a01:5c0:e090:ca91:9809:c242:f038:6cd) (Ping timeout: 200 seconds)
L254[15:33:29] <polyzium> payonel, what about the blinking cursor?
L255[15:35:13] <payonel> do you know where the cursor should be?
L256[15:35:46] <polyzium> After the last written text
L257[15:35:57] <payonel> and do always want it to blink?
L258[15:36:03] <payonel> or stop blinking after a time?
L259[15:36:16] <polyzium> There's an escape sequence to disable blinking cursor
L260[15:36:53] <payonel> yes, a solid cursor
L261[15:37:00] <payonel> sorry, what i meant was...hide the cursor
L262[15:37:17] <payonel> or what i was wanting to ask ...
L263[15:37:19] <payonel> :/
L264[15:37:25] <polyzium> You can hide it with an escape sequence
L265[15:37:32] <polyzium> Otherwise, it will always blink
L266[15:40:19] <payonel> well, the goal/plan for the cursor lib is to provide a medium mode for tty
L267[15:40:31] <payonel> but that's not now, nor this month or even before end of year
L268[15:40:42] <payonel> but that would give you a high level ability to do all of that
L269[15:41:22] <payonel> but for now, you can do the blinking yourself:
L270[15:41:23] <payonel> https://github.com/MightyPirates/OpenComputers/blob/master-MC1.7.10/src/main/resources/assets/opencomputers/loot/openos/lib/core/cursor.lua#L245
L271[15:41:39] <payonel> those 4 lines are how you should use the cursor library to blink
L272[15:41:44] ⇨ Joins: decivex (decivex!~decivex@5249D9EA.cm-4-2d.dynamic.ziggo.nl)
L273[15:41:44] <payonel> while also grabbing events
L274[15:43:00] <payonel> to create a cursor: local cursor = require("core/cursor").new()
L275[15:45:04] <polyzium> Alright
L276[15:45:10] <polyzium> I'll do VT100 rules first
L277[15:45:12] <polyzium> then this
L278[15:48:26] <payonel> polyzium: btw, the cursor blinks to the stream it is reading from, that is, io.stdin
L279[15:48:31] <payonel> it doesn't echo to io.stdout
L280[15:48:57] <polyzium> My program is reading from the socket
L281[15:49:02] <polyzium> completely raw data
L282[15:49:18] <payonel> but are you assigning stdin to that socket?
L283[15:49:25] <polyzium> Or wait you mean user input
L284[15:49:32] <payonel> no, i literally mean stdin
L285[15:49:44] <polyzium> Well IIRC I didn't put anything to handle stdin
L286[15:49:44] <payonel> which may or may not be a tty input
L287[15:50:03] <payonel> then no, your stdin is still your parent stdin, which is likely tty stdin
L288[15:50:14] <payonel> and thus, your blinking will blink to tty
L289[15:51:02] <polyzium> So umm
L290[15:51:16] <polyzium> Since my program takes imput from the keyboard directly
L291[15:51:20] <polyzium> there is no blinking
L292[15:51:29] <polyzium> input* I can't type
L293[15:51:32] <payonel> you're pulling key events, right?
L294[15:51:36] <polyzium> Yes, right
L295[15:51:40] <payonel> two things
L296[15:51:54] <payonel> 1. do you know what i mean by "medium" mode? basically a raw mode? i plan to add that to tty
L297[15:52:26] <polyzium> No, I don't understand what do you mean by medium mode
L298[15:52:28] <payonel> it would let you read from stdin in a "real" life like way, getting key codes in a standard input way
L299[15:52:38] <payonel> it's how real software works that read all key codes
L300[15:52:53] <polyzium> Oh
L301[15:52:58] <payonel> for openos, it would be an abstraction on top of key events
L302[15:53:00] <polyzium> That's a nice addition to have
L303[15:53:06] <payonel> so you could io.read
L304[15:53:14] <payonel> it'll come...one day
L305[15:53:18] <polyzium> Will it be stdin based?
L306[15:53:22] <payonel> then you wouldn't need to know about key_down, etc
L307[15:53:24] <payonel> yes
L308[15:53:36] <polyzium> Alrighty
L309[15:53:42] <payonel> but, that's for another time
L310[15:53:42] <polyzium> And the 2nd?
L311[15:53:59] <payonel> i've spent considerable time on the architecture of tty and cursor to let me get to that point, eventually
L312[15:54:20] <payonel> so yeah, you're not blinking because youre below the tty layer on your reads
L313[15:54:26] <payonel> your pulling key events, thus no blinking
L314[15:54:38] <payonel> the shell blinks when it io.read's from tty
L315[15:54:40] <payonel> you're not
L316[15:54:55] <payonel> so you can fake that with the cursor code i linked above
L317[15:55:04] <polyzium> Can you fake stdin to take key events
L318[15:55:12] <polyzium> that's what I was thinking
L319[15:55:27] <payonel> the code i linked you has the blink code around the key event pull
L320[15:55:30] <payonel> just like you would need
L321[15:55:57] <payonel> again, this: https://github.com/MightyPirates/OpenComputers/blob/master-MC1.7.10/src/main/resources/assets/opencomputers/loot/openos/lib/core/cursor.lua#L245
L322[15:58:16] <polyzium> Lemme go ahead and test this
L323[15:58:34] <payonel> also - i noticed in your code a comment about coroutine.yield
L324[15:58:50] <payonel> i can explain that if you're curious
L325[15:58:56] <polyzium> Yeah, a friend of mine said put that in otherwise it would crash
L326[15:59:21] <polyzium> If I do, it won't crash but it will be slower
L327[15:59:22] <payonel> the core rule is that your machine needs to yield once every 5 seconds
L328[15:59:44] <payonel> but there are 2 ways to yield
L329[16:00:14] <payonel> 1. you can coroutine.yield from the kernel (of the lua runtime you have)
L330[16:00:22] <payonel> or 2. you can computer.pullSignal
L331[16:00:50] <payonel> now, computer.pullSignal() --[[ no args ]]-- will block until there is an event
L332[16:01:04] <payonel> which is the same behavior as option 1, kernel coroutine.yield
L333[16:01:13] ⇦ Quits: decivex (decivex!~decivex@5249D9EA.cm-4-2d.dynamic.ziggo.nl) (Read error: Connection reset by peer)
L334[16:01:44] <payonel> but computer.pullSignal is a special "system" yield, it side steps coroutines, and yields your system, regardless of where you call it from†
L335[16:02:08] <payonel> † openos threads are each their own "system"
L336[16:02:37] <payonel> more about computer.pullSignal: event.pull, os.sleep, etc....all technically call computer.pullSignal
L337[16:03:01] <payonel> if you are pulling for the next key event, <caps> you are already yielding your system </caps>
L338[16:03:20] <Izaya> caps
L339[16:03:28] * payonel caps Izaya
L340[16:03:37] <Izaya> tfw
L341[16:04:14] <polyzium> does event.pull yield too?
L342[16:04:29] <payonel> event.pull calls computer.pullSignal, which "magically" yields your system
L343[16:04:38] <polyzium> Oh alright
L344[16:04:40] <payonel> satisfying the yield requirement via method 2
L345[16:05:06] <payonel> i don't recommend any program use coroutine.yield() for getting the next machine signal
L346[16:05:13] <payonel> it'll work for scripts run on the shell
L347[16:05:28] <payonel> but once you move that code to a user-defined coroutine, it'll not work the same
L348[16:05:45] <payonel> everything in openos is written such that coroutine.yield() in user space behaves the same
L349[16:06:04] <payonel> but once the user makes their own coroutines, yield() means something contextually different
L350[16:06:41] <payonel> you want to just "yield once", use computer.pullSignal(0)
L351[16:06:50] <payonel> if you want to yield until the next event, computer.pullSignal()
L352[16:06:58] <payonel> btw, event.pull is just as valid
L353[16:07:10] <polyzium> I don't want to wait for the next event
L354[16:07:14] <payonel> most people use event, and i recommend it, because it has convenience methods
L355[16:07:24] <polyzium> Since I tried to do duplex communication
L356[16:07:39] <payonel> polyzium: then just call event.pull(0)
L357[16:07:42] <polyzium> I ended up alternating between key events and socket read
L358[16:07:48] <polyzium> That's what I did.
L359[16:07:50] <payonel> you can also use threads
L360[16:07:54] <polyzium> alt rate is 0
L361[16:08:14] <payonel> you could run a thread whose sole job is to read key events (and blink the cursor)
L362[16:08:20] <payonel> and another thread that just reads the socket
L363[16:08:56] <polyzium> I'll have to implement that
L364[16:09:00] <payonel> though, the socket read probably isn't a system yielding operation, and thus could manifest as a system blocking thread (my threads are not preemptive)
L365[16:09:15] <payonel> so even in your socket read thread, you'll want a event.pull(0)
L366[16:09:17] <payonel> just to play nice
L367[16:09:35] <polyzium> But I'd probably end up rewriting the infrastructure
L368[16:09:41] <polyzium> Idk, I'll see
L369[16:09:44] <payonel> note that machine signals are duplicated/shared among threads, so in your socket read thread you can toss away the return of event.pull(0)
L370[16:10:04] <polyzium> It would slow down the socket reader too
L371[16:10:18] <payonel> you could check uptime, and yield less often
L372[16:10:22] <payonel> wait
L373[16:10:31] <payonel> the socket read, doesn't it have a signal?
L374[16:10:35] <payonel> when data is ready?
L375[16:10:44] <payonel> i have very little experience with the internet component, sorry
L376[16:10:44] <polyzium> I use the internet component directly
L377[16:10:53] <payonel> yes, but doesn't it generate signals?
L378[16:10:59] <polyzium> the internet library wrapper is too much of a hassle
L379[16:11:02] <polyzium> It doesn't
L380[16:12:31] <polyzium> With the internet library I couldn't differentiate connected vs disconnected
L381[16:12:55] <polyzium> Actually no data vs connected vs disconnected
L382[16:13:12] <polyzium> Wtf am I saying
L383[16:13:29] <polyzium> 0:13 AM here, I probably should go to sleep
L384[16:13:43] <polyzium> but first I'll do blinking test
L385[16:14:21] <payonel> polyzium: i haven't played with the internet component much (i know a lot about very specific things in oc, and very little about other areas)
L386[16:16:06] <polyzium> OK anyways if the internet lib has signals I need to use those which is one thing
L387[16:16:51] <polyzium> But I also need to distinguish no data vs disconnected status
L388[16:16:58] <polyzium> which is another thing
L389[16:17:29] <polyzium> with the internet component, it's straightforward, if read returns an empty string that means it's connected
L390[16:17:35] <payonel> polyzium: i'd have to play with the component but it looks like you can read from the socket until ""
L391[16:17:40] <payonel> and then pull("internet_ready")
L392[16:17:46] <polyzium> If it returns nil then it is disconnected
L393[16:17:56] <payonel> yes, nil being -1 from the socket read
L394[16:18:13] <polyzium> Idk what has changed
L395[16:18:21] <polyzium> I may have a look at it once again
L396[16:18:24] <payonel> but it looks like we run a socket select after every read
L397[16:18:37] <payonel> and then we signal "internet_ready" when the socket changes
L398[16:18:46] <payonel> meaning, you could read until "", then pull
L399[16:19:04] <payonel> am i making sense?
L400[16:19:14] <polyzium> Kind of
L401[16:19:20] <polyzium> My head is boiling rn
L402[16:19:25] <payonel> haha, sorry
L403[16:19:35] <polyzium> So if we read until
L404[16:19:46] <polyzium> Wait wtf why should we read an empty string
L405[16:20:02] <payonel> my point is, i believe you can make your socket code signal based, respond to events
L406[16:20:11] <polyzium> Yeah
L407[16:20:14] <polyzium> But
L408[16:20:24] <payonel> and then you have no need to pull(0) for yield's stake
L409[16:21:06] <polyzium> Do we need to read the socket and pull in a loop
L410[16:21:24] <polyzium> so if it is no longer an empty string it's connected
L411[16:22:07] <polyzium> I don't like to yield too much because for performance's sake
L412[16:22:23] <polyzium> I remember asie said OC will have a huge performance improvement
L413[16:22:29] <polyzium> IIRC
L414[16:23:16] <payonel> right, i'm trying to show you how to not yield too much
L415[16:23:24] <payonel> function read_current() local buf = {} while true do local chunk = socket:read(1024) if not chunk then return nil elseif chunk == "" then break buf[#buf+1]=chunk end return table.concat(buf) end
L416[16:23:41] <payonel> perhaps i should have gisted that or something
L417[16:23:54] <payonel> also, missing an end
L418[16:23:56] <payonel> meh
L419[16:24:08] <payonel> so that'll read until ""
L420[16:24:36] <payonel> local data = read_current() -- then use data, or break if nil, followed by ....
L421[16:24:55] <payonel> event.pull("internet_ready") -- then loop back up to local data = read_current()
L422[16:27:11] <payonel> polyzium: this was my thinking: https://hastebin.com/epujujopad.rb
L423[16:27:58] <payonel> will that work? no idea. not tested, and not experienced with internet card
L424[16:28:26] <payonel> also, it should probably do more error handling, and socket closing, etc
L425[16:28:58] <polyzium> Socket closing? My server doesn't close the socket if you exist the shell
L426[16:29:07] <polyzium> instead it outputs an exit keyword
L427[16:29:11] <polyzium> \r\nexit\r\n
L428[16:29:32] <polyzium> Or well
L429[16:29:42] <polyzium> If you mean to disallocate the socket then yes
L430[16:30:00] <polyzium> I'll try
L431[16:30:30] <polyzium> Did you use the internet library here?
L432[16:30:35] <payonel> no
L433[16:30:46] <polyzium> because socket:readd
L434[16:31:00] <payonel> isnt that the name of the method?
L435[16:31:13] <payonel> on the socket you get back from component.internet.open/connect
L436[16:31:33] <payonel> connect
L437[16:31:34] <polyzium> when using internet it's socket.read()
L438[16:31:36] <payonel> returns a tcp socket
L439[16:31:38] <polyzium> the component
L440[16:31:47] <payonel> oh, it's a user data, sure
L441[16:31:49] <payonel> so just .read
L442[16:32:16] <payonel> i forget sometimes that our userdata packs unique methods, not lua-style member methods
L443[16:32:27] <payonel> so, you just call socket.read
L444[16:32:37] <polyzium> local sock = inet.connect(args[1],args[2])
L445[16:32:50] <polyzium> local inet = component.internet
L446[16:32:55] <payonel> mmhmm
L447[16:33:00] <polyzium> So yeah I used connect
L448[16:33:07] <polyzium> Hence I wrote buffers suck
L449[16:33:20] <polyzium> because the internet library didn't satisfy me for some reason
L450[16:33:38] <payonel> uh huh
L451[16:38:32] ⇦ Quits: Vexatos (Vexatos!~Vexatos@p200300C107205E017B09AC31049C5B22.dip0.t-ipconnect.de) (Remote host closed the connection)
L452[16:39:01] ⇨ Joins: Vexatos (Vexatos!~Vexatos@p200300C107205E017B09AC31049C5B22.dip0.t-ipconnect.de)
L453[16:39:01] zsh sets mode: +v on Vexatos
L454[16:40:05] <polyzium> Ok so I'll try modifying my client with your implementation
L455[16:41:31] ⇦ Quits: Icedream (Icedream!~icedream@212.83.173.97) (Ping timeout: 202 seconds)
L456[16:43:41] ⇨ Joins: Icedream (Icedream!~icedream@212.83.173.97)
L457[16:55:55] ⇦ Quits: Inari (Inari!~Pinkishu@p5DEC6768.dip0.t-ipconnect.de) (Quit: 'As long as you get the point, it doesnt mattress.')
L458[17:09:21] <polyzium> payonel, Alright I feel very tired, I'll test the socket thing tomorrow.
L459[17:09:32] <payonel> goodnight
L460[17:09:34] <polyzium> Cya
L461[17:09:38] <payonel> thanks for helping the community so much
L462[17:09:46] <polyzium> And you for tricks and tips
L463[17:09:58] <payonel> openos is really just a bag of tricks
L464[17:10:06] <polyzium> Xd it is
L465[17:10:21] <polyzium> Considering VT100 emulation in Lua
L466[17:10:36] <polyzium> Anyway I'm off
L467[17:10:55] ⇦ Quits: polyzium (polyzium!~polyzium@89.207.223.202) (Remote host closed the connection)
L468[17:46:21] ⇦ Quits: tiin57 (tiin57!~tiin57@2600:3c03::f03c:91ff:feb4:1a5c) (Quit: ZNC 1.6.5+deb1 - http://znc.in)
L469[17:46:44] ⇨ Joins: tiin57 (tiin57!~tiin57@li1264-151.members.linode.com)
L470[18:00:46] ⇦ Quits: tiin57 (tiin57!~tiin57@li1264-151.members.linode.com) (Quit: ZNC 1.7.1 - https://znc.in)
L471[18:01:11] ⇨ Joins: tiin57 (tiin57!~tiin57@li1264-151.members.linode.com)
L472[18:12:20] ⇦ Quits: Vexatos (Vexatos!~Vexatos@p200300C107205E017B09AC31049C5B22.dip0.t-ipconnect.de) (Quit: Insert quantum chemistry joke here)
L473[18:42:13] ⇦ Quits: feldim2425 (feldim2425!~feldim242@93-82-138-153.adsl.highway.telekom.at) (Ping timeout: 190 seconds)
L474[18:58:53] ⇨ Joins: feldim2425 (feldim2425!~feldim242@2002:b2bf:b7cd:0:12f1:9505:2fd5:56ec)
L475[19:32:54] ⇦ Quits: feldim2425 (feldim2425!~feldim242@2002:b2bf:b7cd:0:12f1:9505:2fd5:56ec) (Ping timeout: 200 seconds)
L476[19:40:45] <AmandaC> %choose ? or no
L477[19:40:46] <MichiBot> AmandaC: If I had a gold nugget for every time someone asked me about ?
L478[19:48:17] ⇨ Joins: feldim2425 (feldim2425!~feldim242@178-191-178-177.adsl.highway.telekom.at)
L479[20:12:48] <Wuerfel_21> So i did a music thing and now i need to post it everywhere because it took me some 3 days to make: https://youtu.be/L1fOYSJyTu0
L480[20:12:48] <MichiBot> RETRONITUS: Alice in Wonderland (from Touhou 5: Mystic Square) | length: 3m 18s | Likes: 0 Dislikes: 0 Views: 0 | by Wuerfel21 | Published On 30/10/2018
L481[20:14:08] <Wuerfel_21> Hmm, thinking about it, i think the playroutine could be partially ported to the Computronics sound card
L482[20:14:57] <Wuerfel_21> Altough i don't think it supports stuff like modulating sawtooths
L483[20:33:20] <EcmaXp (SkyBox)> good work
L484[20:41:51] <Wuerfel_21> thancc
L485[21:05:27] <Kodos> Oh, neat, Horizons is 12 bucks
L486[21:21:32] <AmandaC> Horizons?
L487[21:24:02] <Izaya> Elite: Dangerous, I assume
L488[21:32:22] * Temia earperks
L489[21:32:36] <Temia> Mystic Square? Retronitus? Well, let me just queue that up
L490[21:33:02] ⇦ Quits: jazzpi (jazzpi!~jazzpi@2a03:4000:6:20f::2) (Quit: ZNC - http://znc.in)
L491[21:33:50] <Temia> I'm pretty sure you can modulate a sawtooth with the soundcard, but you'll have to devote a channel to the modulation
L492[21:34:26] ⇨ Joins: jazzpi (jazzpi!~jazzpi@jazzpis.space)
L493[21:35:30] <Temia> Man, that was nostalgic.
L494[21:35:45] <Temia> Now I kind of want to set up a PC9801 emulator and listen to the whole soundtrack again
L495[21:46:05] <Temia> I can't remember if the sound card has a sawtooth wave generator or not
L496[21:46:41] <Wuerfel_21> Retronitu's sawtooth modulation is more akin to pulse width modulation on a square channel
L497[21:46:47] <Wuerfel_21> Retronitus' sawtooth modulation is more akin to pulse width modulation on a square channel [Edited]
L498[21:47:03] <Wuerfel_21> Infact, the same IU register is used
L499[21:47:21] <Wuerfel_21> for both pulse width and whatever it does to sawtooths
L500[21:49:06] <Wuerfel_21> for reference, this is hoe the square waves are generated:
L501[21:49:06] <Wuerfel_21> Code Block pastebined https://paste.pc-logix.com/culunexaba
L502[21:49:54] <Wuerfel_21> and this wiered shiz happens with the sawtooths:
L503[21:49:54] <Wuerfel_21> Code Block pastebined https://paste.pc-logix.com/zujedugewo
L504[21:53:04] <Wuerfel_21> why is it even writing the carry result from SUMC?
L505[22:02:11] ⇦ Quits: Thutmose (Thutmose!~Patrick@host-69-59-79-181.nctv.com) (Quit: Leaving.)
L506[22:44:24] <Izaya> %tell S3 https://web.archive.org/web/20120716230729/http://koo.corpus.cam.ac.uk/projects/earlyatm/earlyatm.html
L507[22:44:24] <MichiBot> Izaya: S3 will be notified of this message when next seen.
<<Prev Next>> Scroll to Top