<<Prev Next>> Scroll to Bottom
Stuff goes here
L1[00:19:45] ⇦ Quits: feldim2425 (~feldim242@188-23-95-7.adsl.highway.telekom.at) (Ping timeout: 198 seconds)
L2[00:31:39] ⇨ Joins: feldim2425 (~feldim242@2002:bc17:5908:0:9706:bf4e:6a57:28bc)
L3[01:48:02] <Penn​yJim> Yo, can anyone help me with code? I would just post it to the forum, but I can't seem to sign up.
L4[01:49:04] <Kristo​pher38> Post code, describe issue
L5[01:51:00] ⇦ Quits: flappy (~flappy@88-113-155-26.elisa-laajakaista.fi) (Ping timeout: 189 seconds)
L6[01:53:23] <Penn​yJim> It's really long code though? I'm basically trying to create my own api for a UI interface. When I moved all the relevant functions out to their own file, require didn't seem to work. I don't really know lua that well, so don't feel rude for saying the simplest of the simple stuff
L7[01:54:55] <CompanionCube> did you return things
L8[01:55:08] <CompanionCube> that's what you get when you require()
L9[01:55:49] <Penn​yJim> the api file, in short (and with evidence of stuff I have tried to fix it):
L10[01:55:49] <Penn​yJim> Code Block pastebined https://paste.pc-logix.com/zahelomiha
L11[01:57:04] <Penn​yJim> Based on what little I understand, I think I want to remove the `package.path = package.path .. "pennyui.lua"`
L12[01:57:13] <Penn​yJim> the api file, in short (and with evidence of stuff I have tried to fix it):
L13[01:57:13] <Penn​yJim> Code Block pastebined https://paste.pc-logix.com/obupigiwaw [Edited]
L14[01:57:27] <CompanionCube> i was going to say that line is out-of-place
L15[02:00:52] <Penn​yJim> And the file that is trying to use the api file:
L16[02:00:52] <Penn​yJim> Code Block pastebined https://paste.pc-logix.com/aweqofofah
L17[02:00:52] <Penn​yJim> It fails on line 6 (ui.setupScreen()) as ui is nil, and I don't know how to fix that
L18[02:03:14] <Vampyre> return a valid table in pennyui.lua
L19[02:04:01] <Penn​yJim> is that not what I'm doing? How do I make it do that then?
L20[02:05:06] <Vampyre> I don't know, did you paste it?
L21[02:06:01] <Penn​yJim> In a code block, yes. Do I have to type it plaintext for IRC or whatever to see it properly?
L22[02:06:20] <CompanionCube> no, it pastes just fine
L23[02:06:22] <Vampyre> well, is the last line of penny.ui a return statement?
L24[02:06:27] <CompanionCube> Vampyre: it is
L25[02:06:36] <CompanionCube> see https://paste.pc-logix.com/obupigiwaw
L26[02:06:42] <Vampyre> whichh paste s it then?
L27[02:06:44] <Vampyre> ah
L28[02:07:39] <Vampyre> did you reboot? pennyui.lua is probably cashed
L29[02:07:46] <Vampyre> cached*
L30[02:07:59] <CompanionCube> oh right that's a thing
L31[02:08:41] <Penn​yJim> I'll try that then
L32[02:10:00] <Penn​yJim> Still says ui is nil
L33[02:10:22] <Vampyre> package.loaded['pennyui'] = nil might also work to force reloading it
L34[02:11:09] <Vampyre> is ui nil or is ui.setupScreen nil?
L35[02:11:21] <Penn​yJim> Also, slight side-complaint, why does it mount its primary monitor to an already mounted monitor? They're only connected via a raid storage
L36[02:11:38] <Izaya> component networks overlap
L37[02:11:46] <Izaya> you need a switch to separate them
L38[02:11:48] <Izaya> relay, rather
L39[02:12:15] <Penn​yJim> ui is nil, as in the actual code there is an added `print(ui)`
L40[02:13:34] <Vampyre> well, add a debug print(M) just before the return in pennyuii.lua to see wtf is going on
L41[02:16:32] <Penn​yJim> Running 'uitest', it only outputs the nil it prints, running 'pennyui' it outputs `0000026F5A263F90`
L42[02:17:38] <Penn​yJim> My friend originally thought it had to do with require failing, so he copied the pennyui file to other locations, could that be interferring with things?
L43[02:17:46] <Vampyre> if you only get 1 print when running uitest, while you added another print to pennyui means pennyui is cached
L44[02:18:01] <Vampyre> so force reload it or reboot
L45[02:19:17] <Vampyre> and yes, make sure you are getting the right pennyui.lua file of course
L46[02:19:37] <Penn​yJim> I've got a script to reload it that simply does Code Block pastebined https://paste.pc-logix.com/gocisoxuji
L47[02:19:37] <Penn​yJim> and it still only prints once
L48[02:20:18] <Penn​yJim> How do you delete a directory and its contents?
L49[02:20:33] <Vampyre> so the print from pennyui doesn't show?
L50[02:20:39] <Vampyre> rm -rf dir
L51[02:21:04] <Penn​yJim> Yea
L52[02:21:17] <Vampyre> if the print doesn't show, then you are not running the code you think you are running, so fix that first
L53[02:24:50] <Penn​yJim> Eey, I think I got it to work. Now it's just complaining on line 123 (of pennyui) that I'm doing arithmetic on a table instead of complaining about nil on line 6 (of uitest)
L54[02:26:23] <CompanionCube> progress!
L55[02:26:39] <Penn​yJim> but here's the question, why is it calling `w` a table if it's directly after... That's not calling the function of `gpu.maxResolution()`.
L56[02:27:26] * Amanda beams a thimble full of mead in front of Elfi, curls up and zzzmews
L57[02:27:33] <Amanda> Night nerds
L58[02:27:45] <Amanda> Maybe I'll get to sleep past 0630 roberto's
L59[02:27:54] <Amanda> Tomorrow*
L60[02:28:10] <Elfi> :O
L61[02:28:11] <Elfi> Honey!
L62[02:28:15] * Elfi does a sippy!
L63[02:28:27] * Elfi ... yaawns, does a sleepy in Amanda's fur
L64[02:28:44] * Amanda carefully drapes her tail over Elfi
L65[02:29:01] <Amanda> Right, phone plugged in, internet read, sleeps time
L66[02:29:18] <Vampyre> yeah, you 2 now made me tired, so good idea :-p
L67[02:30:51] <CompanionCube> you don't have a line123 in your pastes so
L68[02:35:21] ⇦ Quits: t20kdc (~20kdc@cpc139384-aztw33-2-0-cust220.18-1.cable.virginm.net) (Remote host closed the connection)
L69[02:35:32] <Va​ur> %tonkout
L70[02:35:34] <MichiBot> Awesome! Va​ur! You beat Compan​ionCube's previous record of 3 hours, 1 minute and 23 seconds (By 1 hour, 26 minutes and 22 seconds)! I hope you're happy!
L71[02:35:35] <MichiBot> Va​ur has stolen the tonkout! Tonk has been reset! They gained 0.004 tonk points! plus 0.003 bonus points for consecutive hours! (Reduced to 50% because stealing) Current score: 0.7182424. Position #1
L72[02:40:47] <Penn​yJim> Right. Now I need to learn how to actually do the thing I've attempted but don't really understand at all
L73[02:40:47] <Penn​yJim> Any help on why this would be erroring on the self.writeButton, saying it's attempting to call a nil value:
L74[02:40:47] <Penn​yJim> Code Block pastebined https://paste.pc-logix.com/rimedowuka
L75[02:43:14] <Penn​yJim> Wait, I think I glossed over the error a little too much. It's an entire different line that's erroring
L76[02:43:40] <Penn​yJim> I did notice the `self.buttons..etc` line missing, so not too much wasted effort
L77[02:50:55] ⇦ Quits: hnOsmium0001 (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
L78[03:25:14] ⇦ Quits: Thutmose (~Patrick@host-69-59-79-181.nctv.com) (Quit: Leaving.)
L79[03:31:33] ⇨ Joins: ThePiGuy24 (~ThePiGuy2@26.121.208.46.dyn.plus.net)
L80[03:33:10] <Penn​yJim> Going to ask for help here again...
L81[03:33:10] <Penn​yJim> Why is this saying it's attempting to index a nil value from a global variable? It should be local, should it not?
L82[03:33:10] <Penn​yJim> Code Block pastebined https://paste.pc-logix.com/aguhehiwif
L83[03:33:15] ⇦ Quits: TPG24 (~ThePiGuy2@31.111.20.130) (Ping timeout: 189 seconds)
L84[03:34:16] <Penn​yJim> Wait, did I ever look at the line number? I just assumed it was the weird feeling `#self.buttons`, but my every other call to buttons doesn't include the self
L85[03:35:37] ⇦ Quits: ThePiGuy24 (~ThePiGuy2@26.121.208.46.dyn.plus.net) (Ping timeout: 204 seconds)
L86[03:36:12] ⇨ Joins: ThePiGuy24 (~ThePiGuy2@26.121.208.46.dyn.plus.net)
L87[03:45:33] <i_develo​p_things> Are you calling it as `M.click` or `M:click`? @PennyJim
L88[03:49:10] <ThePi​Guy24> ~w gpu
L89[03:49:11] <ocdoc> http://ocd.cil.li/component:gpu
L90[03:49:45] <Izaya> Ariri: today's cursed idea: AMV of Savage Garden's "To The Moon And Back" set to footage from Adachi to Shimamura
L91[03:50:26] <Izaya> it works on far too many levels
L92[03:54:16] <Penn​yJim> >i develo​p things: Are you calling it as `M.click` or `M:cli…
L93[03:54:16] <Penn​yJim> I was calling it as M:click. I realized it was because I wasn't calling `self.buttons[i].click()` but `buttons[i].click()` instead
L94[03:54:40] <i_develo​p_things> Aaaaaah
L95[03:54:46] <i_develo​p_things> That’d d do it
L96[03:55:10] <Penn​yJim> Although, if anyone knows a better way to go through a list in reverse order than the way I did it, I'd like to know
L97[03:56:21] <i_develo​p_things> That’s pretty much the most efficient way to do it actually
L98[04:02:29] ⇨ Joins: hnOsmium0001 (uid453710@id-453710.stonehaven.irccloud.com)
L99[04:29:29] <Ariri> Izaya, that is cursed
L100[04:29:46] <Izaya> if I could be bothered rewatching that much I'd do it
L101[04:29:48] <Izaya> you know I would
L102[04:32:07] <Izaya> Ariri: https://social.shadowkat.net/media/3a5448512260e49c10b38379eefa254f4175248dfdde2fdcbffda7c0184f25d2.oga
L103[04:32:21] <Izaya> that song and that series are made for each other
L104[04:35:56] <Ariri> Honestly it does work
L105[04:36:13] <Ariri> maybe I'll do it one day:tm:
L106[04:36:32] <Izaya> besides
L107[04:36:45] <Izaya> novelty value of a 90s pop song for a 2020 anime amv?
L108[04:36:49] <Izaya> priceless.
L109[04:37:24] <Ariri> exactly
L110[04:43:06] <Forec​aster> %tonk
L111[04:43:08] <MichiBot> Gadsbudlikins! Forec​aster! You beat Va​ur's previous record of <0 (By 2 hours, 7 minutes and 33 seconds)! I hope you're happy!
L112[04:43:09] <MichiBot> Forecaster's new record is 2 hours, 7 minutes and 33 seconds! Forecaster also gained 0.00213 tonk points for stealing the tonk. Position #3. Need 0.23578015 more points to pass Compan​ionCube!
L113[05:01:42] <Izaya> Ariri: one could do a two-parter with Kaiser Chiefs' Ruby if they wanted to be really fancy
L114[05:01:54] <Izaya> but that would work better if the anime had any of the later books
L115[05:01:56] <Izaya> ie a second season
L116[05:02:02] <Izaya> eventually
L117[05:06:32] <Ariri> Ill have to look into that one
L118[05:07:32] <Izaya> https://files.catbox.moe/h07j03.ogg
L119[05:13:58] <ThePi​Guy24> https://tinyurl.com/yhtnx2fm
L120[05:20:49] <Klea​dron> oooooooooooooooo
L121[05:21:35] <ThePi​Guy24> no idea how fast it runs in game
L122[05:21:51] <ThePi​Guy24> but maybe a simmilar speed
L123[05:22:00] <ThePi​Guy24> probably a bit slower
L124[05:22:16] <ThePi​Guy24> eh fuck it time to test
L125[05:27:57] <ThePi​Guy24> the answer is approximately this fast https://tinyurl.com/yfk8nv56
L126[06:04:01] <bad at​ vijya> today in ss13 adminbussing
L127[06:04:31] <bad at​ vijya> nuke is armed, wide renault runs down the hall at very hihg speeds, casing fireballs at people, while zero plays in the background
L128[06:04:44] <bad at​ vijya> tl;dr "why is the sky playing the spanish guitar"
L129[06:30:05] ⇦ Quits: Corded (~MichiBot@ip160.ip-192-99-104.net) ()
L130[06:30:05] ⇦ Quits: MichiBot (~MichiBot@ip160.ip-192-99-104.net) ()
L131[06:30:52] <Michiyo> Corded & MichiBot will be back after the server recovers from a 300 load avg...
L132[07:28:38] ⇨ Joins: Neo (~neo@ip160.ip-192-99-104.net)
L133[07:28:50] *** Server sets mode: +ntz
L134[07:29:21] <ThePi​Guy24> pairs returns 2 "things", the first being the key, the 2nd being the value, so instead of just `for v` you need `for k, v`
L135[07:29:21] <Michiyo> Test
L136[07:29:43] <Penn​yJim> Okay, I knew it was probably me not understanding something
L137[07:29:57] <Penn​yJim> So now I can go back to debugging why another thing isn't working
L138[07:55:17] <Penn​yJim> I've run into a little bit of a logic problem with my code that I don't know how to solve. I've got two functions that construct screens with buttons. These two functions have a button within them that call the other function, but the function needs to be defined before it can be attached to a button... How? I can't even really think of a workaround...
L139[08:14:19] <Va​ur> is your button like a toggle ?
L140[08:14:45] <Va​ur> where the second button become the first one I mean ?
L141[08:16:27] <Penn​yJim> Okay, I will report what I did to fix it. I rewrote one of the functions after using inside the other function
L142[08:16:40] <Penn​yJim> Code Block pastebined https://paste.pc-logix.com/nikepovake
L143[08:25:30] ⇨ Joins: Vexatos (~Vexatos@port-92-192-163-98.dynamic.as20676.net)
L144[08:25:30] zsh sets mode: +v on Vexatos
L145[08:36:48] ⇦ Quits: ThePiGuy24 (~ThePiGuy2@26.121.208.46.dyn.plus.net) (Remote host closed the connection)
L146[08:36:49] ⇨ Joins: ThePiGuy24 (~ThePiGuy2@26.121.208.46.dyn.plus.net)
L147[08:39:51] ⇨ Joins: TPG24 (~ThePiGuy2@37.152.254.133)
L148[08:42:05] ⇦ Quits: ThePiGuy24 (~ThePiGuy2@26.121.208.46.dyn.plus.net) (Ping timeout: 189 seconds)
L149[08:49:30] ⇦ Quits: hnOsmium0001 (uid453710@id-453710.stonehaven.irccloud.com) (Ping timeout: 189 seconds)
L150[08:49:30] ⇦ Quits: Ariri (~finch@2603-8000-2f00-e0b3-0226-18ff-fe06-8702.res6.spectrum.com) (Ping timeout: 189 seconds)
L151[08:49:36] ⇨ Joins: finch (~finch@2603-8000-2f00-e0b3-0226-18ff-fe06-8702.res6.spectrum.com)
L152[08:49:39] ⇨ Joins: hnOsmium0001 (uid453710@id-453710.stonehaven.irccloud.com)
L153[08:50:03] ⇦ Quits: feldim2425 (~feldim242@2002:bc17:5908:0:9706:bf4e:6a57:28bc) (Ping timeout: 189 seconds)
L154[08:50:11] ⇨ Joins: feldim2425 (~feldim242@188-23-89-8.adsl.highway.telekom.at)
L155[08:50:36] ⇦ Quits: Forecaster (~Forecaste@2001:41d0:700:3949:2222::2) (Ping timeout: 189 seconds)
L156[08:50:36] ⇦ Quits: Sandra (~Sandra@2001:41d0:700:3949:2222::2) (Ping timeout: 189 seconds)
L157[08:50:36] ⇦ Quits: Antheus_ (~Antheus@2001:41d0:700:3949:2222::2) (Ping timeout: 189 seconds)
L158[08:52:07] ⇨ Joins: Antheus (~Antheus@2001:41d0:700:3949:2222::2)
L159[08:52:22] ⇨ Joins: Forecaster (~Forecaste@2001:41d0:700:3949:2222::2)
L160[08:52:39] ⇨ Joins: ThePiGuy24 (~ThePiGuy2@37.152.254.133)
L161[08:54:11] ⇦ Quits: TPG24 (~ThePiGuy2@37.152.254.133) (Ping timeout: 189 seconds)
L162[08:54:29] ⇨ Joins: Sandra (~Sandra@2001:41d0:700:3949:2222::2)
L163[08:54:56] ⇨ Joins: TPG24 (~ThePiGuy2@47.254.115.87.dyn.plus.net)
L164[08:54:57] <Va​ur> %sip
L165[08:55:01] <MichiBot> You drink a goopy tuna potion (New!). When Vaur drinks the last drop, a bucket of water materializes above their head and dumps its contents over them. Vaur is drenched in water, followed by a bucket hitting them on the head. (1 vs DC 8)
L166[08:55:12] <Va​ur> ouch
L167[08:56:24] <Forec​aster> oof, a 1
L168[08:57:59] ⇦ Quits: ThePiGuy24 (~ThePiGuy2@37.152.254.133) (Ping timeout: 204 seconds)
L169[08:58:54] ⇦ Quits: TPG24 (~ThePiGuy2@47.254.115.87.dyn.plus.net) (Ping timeout: 189 seconds)
L170[09:15:02] ⇨ Joins: ben_mkiv (~ben_mkiv@2001:16b8:1e58:7100:eb1d:c091:9141:6a34)
L171[09:22:09] <Va​ur> %sip
L172[09:22:11] <MichiBot> You drink a cloudy white potion (New!). The bottle turns into a piece of bacon. Vaur has found 1 piece of bacon so far.
L173[09:27:02] <Forec​aster> %sip
L174[09:27:03] <MichiBot> You drink a seeping avesmingo potion (New!). Forecaster suddenly craves pie.
L175[09:50:55] ⇦ Quits: hnOsmium0001 (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
L176[10:02:46] <Penn​yJim> Yo, what are the variables returned in the event "key_down"?
L177[10:03:21] <Forec​aster> ~oc signals
L178[10:03:34] <Izaya> ~w signals
L179[10:03:38] <Izaya> oh, no ocdoc
L180[10:03:53] <Forec​aster> https://ocdoc.cil.li/component:signals?s[]=signals
L181[10:04:14] <Forec​aster> @PennyJim look under Keyboard
L182[10:04:23] <Izaya> https://ocdoc.cil.li/component:signals#keyboard
L183[10:06:38] <Penn​yJim> So I think I understand that if I just want keyboard output, I'll just use the char, but what's code?
L184[10:06:56] <Forec​aster> char is the literal character
L185[10:07:03] <Forec​aster> code is a unique identifier for the key
L186[10:07:25] <Penn​yJim> Okay
L187[10:08:20] <Izaya> code is useful for stuff like shift that don't have actual characters
L188[10:08:35] <Penn​yJim> Cool. So pressing u and shft-u returns different char's but both end with the same code. Testing has proved this. It's fun to understand stuff
L189[10:21:58] <Vampyre> %drink coffee
L190[10:22:01] <MichiBot> Vam​pyre: Vampyre has some coffee. It's hot and bitter.
L191[10:22:31] * Vampyre also sends off a small tactical nuke to kill off Amanda's alarmclock
L192[10:22:34] <Vampyre> keep sleeping ;-)
L193[10:24:05] <Vampyre> @PennyJim I think shift has it's own keydown event, not sure about that though, never messed with the OC keyboard
L194[10:24:15] <Vampyre> but I assume it's scancode based
L195[10:32:50] <Forec​aster> https://tinyurl.com/yfc8yuhp
L196[10:33:03] <Forec​aster> Shift, Ctrl, H, Shift C
L197[10:33:22] <Forec​aster> Ctrl C I mean
L198[10:47:45] <Penn​yJim> Almost got my textbox working... https://tinyurl.com/yfze7bfs
L199[10:48:24] <Penn​yJim> Need to figure out why, and then fix the fact that multiple textboxes are linked for some reason
L200[10:49:01] <Penn​yJim> But for now, I'll just escape shift from being typed as an invisible character
L201[10:50:36] <Penn​yJim> Oh, and also allow it to stop tying when you click out of it
L202[10:55:39] <Penn​yJim> Question, is there a way to un-pull an event from the queue so a listener a little down the line can hear it?
L203[10:57:24] ⇨ Joins: Inari (~Pinkishu@p508ef71d.dip0.t-ipconnect.de)
L204[11:06:19] <Inari> Amanda: https://tenor.com/view/business-cat-working-cat-boss-angry-gif-13655998
L205[11:07:10] <Kristo​pher38> I don't think so, you can put the event in the event queue again, but it will mess up event order
L206[11:08:41] <Kristo​pher38> I don't know what you want to do but I'd suggest having only one place where you pull events, and then pass these events to desired places
L207[11:11:25] ⇨ Joins: ThePiGuy24 (~ThePiGuy2@37.152.243.174)
L208[11:17:59] ⇦ Quits: ben_mkiv (~ben_mkiv@2001:16b8:1e58:7100:eb1d:c091:9141:6a34) (Remote host closed the connection)
L209[11:30:10] <Va​ur> %tonkout
L210[11:30:10] <MichiBot> Wow! Va​ur! You beat your own previous record of 2 hours, 31 minutes and 25 seconds (By 1 hour, 44 minutes and 11 seconds)! I hope you're happy!
L211[11:30:11] <MichiBot> Va​ur has tonked out! Tonk has been reset! They gained 0.004 tonk points! plus 0.006 bonus points for consecutive hours! Current score: 0.7294424, Position #1
L212[11:33:42] <Amanda> Vampyre: probably shouldn't shoot a tactical nuke at my back porch
L213[11:34:19] <Amanda> Though the birds were much less noisy today with my window closed
L214[11:40:56] <Forec​aster> %sip
L215[11:40:56] <MichiBot> You drink a salty tiberium potion (New!). Forecaster feels slightly faster.
L216[11:45:45] <Va​ur> %sip
L217[11:45:46] <MichiBot> You drink a muddy unobtanium potion (New!). Vaur feels slightly weaker.
L218[12:08:05] <Elfi> %quaff
L219[12:08:06] <MichiBot> You drink a sour caterium potion (New!). Elfi feels slightly faster.
L220[12:08:21] * Elfi buzzes wings +w+
L221[12:14:50] <Amanda> Elfi~ Why's my head so foggy today~
L222[12:15:04] <Amanda> I don't understand how I can be sick, I don't even go out
L223[12:15:23] <Va​ur> %sip
L224[12:15:23] <MichiBot> You drink a thick platinum potion (New!). Vaur has a sudden desire to run around in a circle until they have a nap.
L225[12:15:44] <Va​ur> cant take a nap if I'm running around in circle 🤔
L226[12:16:07] <Amanda> I guess passing out from exhaustion might count as a nap
L227[12:20:15] <Amanda> @PennyJam the individual UI elements should not be accepting events like key up/down/mouse -- those should be handled top-level and propogated down the ui heiarchy from container to child( possibly another container)
L228[12:20:42] <Amanda> That way the container can keep track of what has focus, and only send relevent events there
L229[12:20:47] <Forec​aster> Jim, not Jam
L230[12:21:02] <Amanda> @PennyJim See above
L231[12:25:13] <Penn​yJim> The basic ui api I'm creating is basically a drop an element onto a pile and if you want it off, you have to redrop the whole pile. There's no hierarchy to propogate it down to. I've got two listeners that I honestly could probably somewhat easily merge into one if I truly bothered. the only difference being one event listener is nested inside the other for when it clicks inputboxes it starts its listening loop.
L232[12:26:16] <Penn​yJim> Also, I've been awake for ~20 hours and coding for most of them, so I'm going to bed. @ me with anything interesting you might have to say on the topic
L233[12:27:03] <Penn​yJim> of my terrible ui program. Does editing messages work in this weird irc mix of a chat? @ me the answer.
L234[12:27:48] <Amanda> @PennyJim most UI Toolkits don't let the individual elements have the raw event pump, the elements provide callbacks that some higher-level thing connverts event pump events into calls to those callbacks
L235[12:28:15] <dequbed> Amanda: What about a tact-less nuke into your backyard though?
L236[12:28:15] <Amanda> for example: some_element:key_down(char, scancode)
L237[12:28:43] <Amanda> dequbed: tbh I'd rather my house not get nuked at all
L238[12:28:44] <Penn​yJim> It's not an individual element. It's the api and the thing using the api to create the ui that have event listeners
L239[12:29:22] <Amanda> what I mean by element is the text box, the label, etc, the actual UI widgets
L240[12:29:55] <n​il> %tonk
L241[12:29:55] <MichiBot> Aw jeez! n​il! You beat Va​ur's previous record of <0 (By 59 minutes and 44 seconds)! I hope you're happy!
L242[12:29:56] <MichiBot> nil's new record is 59 minutes and 44 seconds! nil also gained 0.001 tonk points for stealing the tonk. Position #4. Need 0.09565954 more points to pass Forec​aster!
L243[12:30:39] <Penn​yJim> If you consider the clickevent of an element an element, then the secondary listener is in an element
L244[12:31:37] <Amanda> for my UI toolkit I had a top-level "app" object that was also a container, that handled the raw CC events, and converted them into calls down the UI heiarchy, so I'd iterate the children, and if the widget had focus, it'd get key events, if it was a mouse click within it's bounds, it'd get a mouse event
L245[12:31:46] <Amanda> s/key events/key callback/
L246[12:31:47] <MichiBot> <Amanda> for my UI toolkit I had a top-level "app" object that was also a container, that handled the raw CC events, and converted them into calls down the UI heiarchy, so I'd iterate the children, and if the widget had focus, it'd get key callback, if it was a mouse click within it's bounds, it'd get a mouse event
L247[12:31:53] <Amanda> s/mouse event/mouse callback.
L248[12:31:53] <MichiBot> <Amanda> for my UI toolkit I had a top-level "app" object that was also a container, that handled the raw CC events, and converted them into calls down the UI heiarchy, so I'd iterate the children, and if the widget had focus, it'd get key callback, if it was a mouse click within it's bounds, it'd get a mouse callback.
L249[12:32:23] <Amanda> Most UI apis work this way, at least real ones do
L250[12:32:38] <Amanda> You don't handle the raw computer events inside the widget directly
L251[12:33:14] <Penn​yJim> That's smart, but sounds like a lot more effort when I only really needed an extremely simple ui to either join or create an island for my mostly-private project ozone server
L252[12:34:20] <Amanda> fair,I thought you were making a general-purpose API, not a custom one-off one
L253[12:35:06] <Penn​yJim> The practice in which I'm coding this one is semi-general-purpose, but it's going to be used like a one-off
L254[12:35:43] <Amanda> the reason events are abstracted like that is it lets higher-level widgets/containers handle custom logic easier, such as a tab group, or a pop-up window
L255[12:36:13] <Penn​yJim> Maybe my friend will take it and use it for similarly simple UI as he tends to just use a commandline interface
L256[12:36:29] <Amanda> for example, a pop-up window just needs to be a custom container, that overrides some key callbacks to close itself
L257[12:36:43] <Penn​yJim> But that's the only reason this could be considered anything other than a one-off
L258[12:37:51] <Penn​yJim> A popup window would be something I would use for island selection, if I didn't already struggle enough creating a single window interface
L259[12:38:23] <Penn​yJim> Now I really should go to bed
L260[12:38:27] <Amanda> night o/
L261[12:38:42] <Amanda> %choose halucinate or rainbox
L262[12:38:43] <MichiBot> Ama​nda: I'm 40% "halucinate"!
L263[12:50:34] ⇨ Joins: Thutmose (~Patrick@host-69-59-79-181.nctv.com)
L264[13:12:09] <Va​ur> whoua, I've never been into one of those station before, its pretty cool https://tinyurl.com/yj366je9
L265[13:12:28] <Izaya> before I look, I'm calling that it's an asteroid station
L266[13:12:52] <dequbed> Reminds me of X2
L267[13:13:07] <Izaya> and sure enough
L268[13:13:27] <Izaya> I don't know the imperial ship names but I know it's one of them too >.>
L269[13:16:29] <Va​ur> its the cutter Izaya
L270[13:18:58] <Kristo​pher38> @Vaur have you been to a burning station though?
L271[13:19:06] <Va​ur> no I have not
L272[13:19:21] <Kristo​pher38> try it, they're even cooler
L273[13:19:30] <Izaya> lies
L274[13:19:32] <Izaya> they're warm
L275[13:19:37] <Kristo​pher38> lmao
L276[13:19:42] <Va​ur> I'm sure I'll find one sooner or later
L277[13:20:27] <Kristo​pher38> you should have systems which were attacked recently on the map
L278[13:20:44] <Kristo​pher38> or not, don't remember if you have to enable that first or not
L279[13:21:18] <Izaya> do note, a combat-equipped mamba may be better suited to burning stations than other ships
L280[13:21:33] <Izaya> because if you use a mamba in combat you already have every slot filled with heatsinks
L281[13:22:26] <Kristo​pher38> I mean, you can go in them in any ship
L282[13:23:06] <Forec​aster> you don't
L283[13:23:07] <Kristo​pher38> but make sure that you have heatsinks equipped and restocked if your docking skills aren't that good
L284[13:23:14] <Forec​aster> the damaged station marker is enabled by default
L285[13:23:26] <Forec​aster> it's a red one with a horizontal line in a diamond shape
L286[13:23:29] <Izaya> I'm just talking shit about my favourite ship
L287[13:23:47] <Izaya> the mamba is very cool too, if you get what I mean
L288[13:25:34] <Forec​aster> I think I used a Python last time
L289[13:28:35] <Kristo​pher38> Izaya: I didn't know you played ED
L290[13:28:47] <Izaya> haven't played in quite a while
L291[13:28:52] <Izaya> controller machine broke
L292[13:28:58] <Kristo​pher38> F
L293[13:32:17] ⇦ Quits: blankshade (~slimespid@115.135.230.105) (Quit: Boof!)
L294[13:35:14] ⇦ Quits: phroa (~phroa@173.254.236.155) (Ping timeout: 189 seconds)
L295[13:37:32] ⇨ Joins: phroa (~phroa@173.254.236.155)
L296[13:50:53] ⇨ Joins: blankshade (~slimespid@115.135.230.105)
L297[13:53:47] ⇦ Quits: Izaya (~izaya@210.1.218.92) (Read error: Connection reset by peer)
L298[13:54:42] ⇨ Joins: Izaya (~izaya@210.1.218.92)
L299[13:59:22] <Vampyre> Amanda, sorry about the back porch, but I hope the birds get the message
L300[14:00:12] <Vampyre> either that or they are now planning a retaliatory strike and I just unleeched WWIII, between the bats and the birds
L301[14:01:18] <Forec​aster> %tonk
L302[14:01:18] <MichiBot> Shoot! Forec​aster! You beat n​il's previous record of 59 minutes and 44 seconds (By 31 minutes and 38 seconds)! I hope you're happy!
L303[14:01:19] <MichiBot> Forecaster's new record is 1 hour, 31 minutes and 23 seconds! Forecaster also gained 0.00053 tonk points for stealing the tonk. Position #3. Need 0.23525015 more points to pass Compan​ionCube!
L304[14:02:34] <Izaya> this is not what was meant by the birds and the bees
L305[14:04:06] <Vampyre> I don't think I understand the birds and the bees correctly ;-)
L306[14:04:25] <Forec​aster> the birds, the bees, and nuclear warheads
L307[14:04:28] <Vampyre> it doesn not involve nuclear weapons apparently
L308[14:09:33] <Izaya> not of the literal variety, anyway
L309[14:23:20] <Va​ur> %sip
L310[14:23:21] <MichiBot> You drink a soft green potion (New!). Vaur suddenly forgets a random piece of trivia.
L311[15:01:56] <Forec​aster> https://youtu.be/lYf9HK-rI1s
L312[15:01:58] <MichiBot> Raspberry Pi overclocking failure | length: 23s | Likes: 1,465 Dislikes: 1,307 Views: 175,413 | by Afrotechmods | Published On 28/12/2014
L313[15:06:35] <8Bi​tz0> R.I.P. Raspberry Pi
L314[15:06:43] <Va​ur> %sip
L315[15:06:43] <MichiBot> You drink a simulated crimson potion (New!). Vaur gains one research point. Vaur now has 1 point.
L316[15:06:48] <Forec​aster> at least it wasn't a pi4
L317[15:07:50] <Forec​aster> I just got mine online, with the touchscreen
L318[15:23:20] <n​il> %sip
L319[15:23:20] <MichiBot> You drink a fiery adamantium potion (New!). 2 nearby pebbles suddenly shift slightly in nil's direction.
L320[15:24:24] <Va​ur> %sip
L321[15:24:25] <MichiBot> You drink a tiny ferozium potion (New!). Vaur briefly feel like they have just stepped out of a car.
L322[15:24:31] <Amanda> %choose space or irradiate
L323[15:24:31] <MichiBot> Ama​nda: "space" is for cool kids!
L324[15:24:40] <Amanda> %8ball low-temp goat kitten?
L325[15:24:40] <MichiBot> Ama​nda: Ask again later
L326[15:24:48] <Va​ur> Spaaaaace
L327[15:25:15] <Va​ur> https://media.tenor.com/images/89c8d610e2e7fe59932726365391446c/tenor.gif
L328[15:35:22] <Amanda> Elfi: am I a low-temp goat kitten? Michibot said to ask later, but I have to know.
L329[15:38:33] <Amanda> %choose get motivated or lay down
L330[15:38:33] <MichiBot> Ama​nda: The proof is in the pudding. Definitely "get motivated". Now please get it out of my pudding.
L331[15:39:32] <n​il> >Va​ur: https://media.tenor.com/images/89c8d���
L332[15:39:32] <n​il> wheatley core! hehe, I like Portal
L333[15:53:16] <Amanda> %choose get the chutes fixed first or let the jetpack fill some more
L334[15:53:16] <MichiBot> Ama​nda: I received a telegram from a long lost relative that only read "get the chutes fixed first". Weird.
L335[15:56:20] <Va​ur> %sip
L336[15:56:20] <MichiBot> You drink a shimmering currentcorn potion (New!). Vaur feels a strong urge to recycle the potion bottle.
L337[15:56:35] ⇨ Joins: hnOsmium0001 (uid453710@id-453710.stonehaven.irccloud.com)
L338[16:19:23] <Ar​iri> Inari: awaw https://youtu.be/IYHxWUqJvWg
L339[16:19:23] <MichiBot> Awawawawa *w* | length: 9s | Likes: 4,041 Dislikes: 12 Views: 81,381 | by dominick kun uwu | Published On 3/1/2020
L340[16:24:21] <Amanda> Inari: Rude! Sending another storm when I need to disassemble my base partially to fix the chute error you made!
L341[16:31:47] <Forec​aster> %tonkout
L342[16:31:48] <MichiBot> Eh! Forec​aster! You beat your own previous record of 1 hour, 31 minutes and 23 seconds (By 59 minutes and 6 seconds)! I hope you're happy!
L343[16:31:49] <MichiBot> Forec​aster has tonked out! Tonk has been reset! They gained 0.002 tonk points! plus 0.002 bonus points for consecutive hours! Current score: 0.46272085, Position #3 Need 0.23125015 more points to pass Compan​ionCube!
L344[16:39:03] ⇦ Quits: ThePiGuy24 (~ThePiGuy2@37.152.243.174) (Ping timeout: 204 seconds)
L345[16:41:06] <n​il> %tonk
L346[16:42:20] ⇨ Joins: ThePiGuy24 (~ThePiGuy2@37.152.243.174)
L347[17:01:09] <Forec​aster> https://i.imgur.com/LFsNwf2.jpg
L348[17:04:18] <n​il> %tonk
L349[17:04:19] <MichiBot> Kapow! n​il! You beat Forec​aster's previous record of <0 (By 32 minutes and 30 seconds)! I hope you're happy!
L350[17:04:20] <MichiBot> nil's new record is 32 minutes and 30 seconds! nil also gained 0.00054 tonk points for stealing the tonk. Position #4. Need 0.09964954 more points to pass Forec​aster!
L351[17:04:49] <n​il> %tonksnipe count
L352[17:04:49] <MichiBot> n​il: You have 0 Blue Shells, 0 Red Shells, 2 Green Shells, and 2 Bricks
L353[17:04:58] <n​il> %tonksnipe green Vaur
L354[17:05:00] <MichiBot> n​il: Unfortunately you missed with a 9 vs 10.
L355[17:06:37] <Amanda> %remindme 1h take out the dishes
L356[17:06:37] <MichiBot> I'll tell you "take out the dishes" in 1h at 04/07/2021 06:06:37 PM
L357[17:07:50] ⇨ Joins: TPG24 (~ThePiGuy2@37.152.243.174)
L358[17:09:27] ⇦ Quits: ThePiGuy24 (~ThePiGuy2@37.152.243.174) (Ping timeout: 189 seconds)
L359[17:11:20] <Va​ur> %sip
L360[17:11:20] <MichiBot> You drink an invisible electrum potion (New!). Vaur turns into a black cat girl until they see a bird.
L361[17:11:48] <Va​ur> \start avoiding seeing any birds
L362[18:06:37] <MichiBot> Amanda REMINDER: take out the dishes
L363[18:09:38] <n​il> %tonk
L364[18:09:38] <MichiBot> Holy empty bottle Batman! n​il! You beat your own previous record of 32 minutes and 30 seconds (By 32 minutes and 49 seconds)! I hope you're happy!
L365[18:09:39] <MichiBot> nil's new record is 1 hour, 5 minutes and 19 seconds! No points gained for stealing from yourself. (Lost out on 0.00055)
L366[18:33:47] <Amanda> %remindme 30m throw the dishes for real, turn on AC
L367[18:33:47] <MichiBot> I'll tell you "throw the dishes for real, turn on AC" in 30m at 04/07/2021 07:03:47 PM
L368[19:03:47] <MichiBot> Amanda REMINDER: throw the dishes for real, turn on AC
L369[19:10:31] <Va​ur> %sip
L370[19:10:31] <MichiBot> You drink a sweet honey potion (New!). A tiny genie appears, gives Vaur a thumbs up, and poofs away.
L371[19:41:28] <Va​ur> %tonk
L372[19:41:28] <MichiBot> Awesome! Va​ur! You beat n​il's previous record of 1 hour, 5 minutes and 19 seconds (By 26 minutes and 29 seconds)! I hope you're happy!
L373[19:41:29] <MichiBot> Vaur's new record is 1 hour, 31 minutes and 49 seconds! Vaur also gained 0.00088 (0.00044 x 2) tonk points for stealing the tonk. Position #1.
L374[19:45:49] <Penn​yJim> Is there a quick an easy way to compare if a string is in a table?
L375[19:46:35] <i_develo​p_things> ex: `t = {"string1", "s2", "s3"}` and you want to know if `"s3"` is in the table?
L376[19:46:42] <Penn​yJim> ye
L377[19:47:46] <i_develo​p_things> do you `for i=1, #t, 1 do ... end` anywhere in your code or is it only a list of strings?
L378[19:48:46] <Penn​yJim> I do have loops, yes, but what do you mean only a list of strings?
L379[19:49:05] <Penn​yJim> Wait, I'm dumb. It's a list of numbers I want to compare to
L380[19:49:09] <i_develo​p_things> i.e. do you only need to check if the table contains----oh
L381[19:49:30] <i_develo​p_things> do you do anything that requires indexing the table in order?
L382[19:49:52] <i_develo​p_things> (i.e. drawing overlapping elements in the correct order)
L383[19:49:54] <Penn​yJim> Nope, but It's going to be a relatively static table so I can easily make sure it's sorted
L384[19:50:01] <i_develo​p_things> well
L385[19:50:07] <i_develo​p_things> if it doesn't need to be sorted
L386[19:50:53] <i_develo​p_things> then instead of doing `t = {78, 124, 7453}` do `t = {[78] = true, [124] = true, [7453] = true}`. then you can just check for `t[78]` rather than iterating over it every time you need to check for a number in it
L387[19:51:06] <i_develo​p_things> and if you do need to iterate use `for k in pairs(t) do ... end`
L388[19:52:19] <Penn​yJim> I kind of wanted to avoid doing a loop as I'm checking key inputs and not typing characters when it's stuff like arrow keys, so that table of booleans is honestly quite genius
L389[19:52:31] <i_develo​p_things> i've used it before also
L390[19:52:47] <Penn​yJim> I wouldn't have thought of it myself
L391[19:52:55] <i_develo​p_things> you just have to make sure to set them as `t[245] = true` rather than `t[#t + 1] = 245` or `table.insert(t, 245)`
L392[19:53:00] <i_develo​p_things> no problem :)
L393[20:12:53] <Penn​yJim> Side note, if I understand what little I've seen about opencomputers users, those who aren't a user can't control the keyboard, right? Is there any way to let such users use the keyboard, but only allow then to do one command when in the terminal?
L394[20:13:42] <i_develo​p_things> not with OpenOS
L395[20:14:33] <Penn​yJim> Sad
L396[20:15:52] <Penn​yJim> Wait... is ctrl-alt-c catch-able with pcall or xpcall? Because, if so, that sounds like a wonderful way to keep random users from breaking out of my program and using the debugcard
L397[20:17:22] <Amanda> it can be caught, but not with pcall/xpcall, but I forget how. There's a internal bit of OpenOS you can fiddle with in your program
L398[20:18:51] <Penn​yJim> what's the technical term for ctrl-alt-c? so I can try looking up ways to intercept it
L399[20:51:59] ⇨ Joins: ben_mkiv (~ben_mkiv@200116b814dab100eff7a3bec3e27477.dip.versatel-1u1.de)
L400[20:55:44] ⇦ Quits: ben_mkiv (~ben_mkiv@200116b814dab100eff7a3bec3e27477.dip.versatel-1u1.de) (Client Quit)
L401[20:55:47] <Amanda> %choose code or halucinate
L402[20:55:48] <MichiBot> Ama​nda: Once you get a taste of "halucinate" you can't stop.
L403[20:57:42] <Forec​aster> MichiBot stop with the drugs
L404[21:09:06] <dequbed> Hey, let her be happy if she wants!
L405[21:13:28] <Izaya> dequbed: man these USB variants are really getting out of hand https://cache.landofkittens.social/6fac3f87959c437e56ffb6c389b38601e031255416243e18bac131686f57345c.jpg
L406[21:14:11] <dequbed> Thanks I hate it.
L407[21:14:33] <Forec​aster> I mean, the USB logo does have a triangle on it
L408[21:14:52] <Forec​aster> just need a round one too
L409[21:14:59] <bad at​ vijya> triangular renault
L410[21:30:29] <Kristo​pher38> >Penn​yJim: what's the technical term for ctrl-alt-c? so …
L411[21:30:29] <Kristo​pher38> @idevelopthings
L412[21:30:42] <Kristo​pher38> intercepting ctrl-alt-c in OpenOS how
L413[21:31:11] <Forec​aster> it's an exception, so pcall? maybe?
L414[21:57:26] <Amanda> it's got special handling in OpenOS
L415[21:59:56] <Va​ur> %tonkout
L416[21:59:57] <MichiBot> Awesome! Va​ur! You beat your own previous record of 1 hour, 31 minutes and 49 seconds (By 46 minutes and 38 seconds)! I hope you're happy!
L417[21:59:58] <MichiBot> Va​ur has tonked out! Tonk has been reset! They gained 0.002 tonk points! plus 0.002 bonus points for consecutive hours! Current score: 0.7343224, Position #1
L418[22:00:40] <Va​ur> %sip
L419[22:00:40] <MichiBot> You drink a simulated gold potion (New!). The potion contained a computer virus! It just changed Vaur's background...
L420[22:55:46] ⇨ Joins: alexandr1a (~alxsdf@burningcanary.plus.com)
L421[22:55:49] *** alexandr1a is now known as aster
L422[22:56:12] ⇦ Parts: aster (~alxsdf@burningcanary.plus.com) ())
L423[23:02:36] <i_develo​p_things> @PennyJim set `process.info().data.signal = function() end`
L424[23:03:11] <Penn​yJim> And then what's within that function will get called on ctrl-alt-c?
L425[23:03:56] <i_develo​p_things> yes
L426[23:04:47] <i_develo​p_things> the relevant line is `/lib/event.lua:43`
L427[23:05:37] <Penn​yJim> Now, after the program actually closes, is it going to affect how ctrl-alt-c works for other programs?
L428[23:07:41] <i_develo​p_things> no
L429[23:07:52] <Penn​yJim> Okay, that's good
L430[23:19:07] ⇦ Quits: TPG24 (~ThePiGuy2@37.152.243.174) (Remote host closed the connection)
L431[23:19:22] ⇨ Joins: TPG24 (~ThePiGuy2@37.152.243.174)
L432[23:19:35] <Penn​yJim> My ctrl-c stopped working after I added that... Good thing I've got known crashes I can use to exit
L433[23:22:27] <Penn​yJim> I mean, it's entirely due to my attempt to check that only the users I've allowed can use ctrl-c, but still
L434[23:25:12] <i_develo​p_things> regular `ctrl-c` sends an `interrupted` event so you can just poll that
L435[23:25:39] ⇦ Quits: Inari (~Pinkishu@p508ef71d.dip0.t-ipconnect.de) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
L436[23:26:28] <Penn​yJim> Yea, but my code to check if the last event that returns user was one of the allowed user before letting them out of the listen-loop. I will admit, my event listening is probably extremely terrible
L437[23:27:03] <Penn​yJim> I'm attempting to do
L438[23:30:51] <Penn​yJim> Code Block pastebined https://paste.pc-logix.com/cubidudisi
L439[23:31:47] <i_develo​p_things> ~w event.listen
L440[23:31:55] <i_develo​p_things> :|
L441[23:32:31] <Penn​yJim> How much would I have to refactor if I wanted to use event.listen instead?
L442[23:33:50] <i_develo​p_things> put your handlers into functions
L443[23:33:59] <i_develo​p_things> then `event.listen(sigName, func)`
L444[23:34:12] <i_develo​p_things> to remove the listeners do `event.ignore` with the same arguments
L445[23:35:18] <i_develo​p_things> the listener will be called with the full signal, i.e. `"keydown", "<$address>", 37, 152, "idevelop_things"`, as its arguments
L446[23:46:24] <Penn​yJim> interrupt doesn't pass any arguments, right?
L447[23:46:34] <i_develo​p_things> right
L448[23:48:32] ⇦ Quits: Vexatos (~Vexatos@port-92-192-163-98.dynamic.as20676.net) (Quit: Insert quantum chemistry joke here)
L449[23:51:00] <Penn​yJim> If I put a listener onto an event, then I don't have to worry about having an infinite loop checking for events?
L450[23:51:14] <Penn​yJim> It'll just automatically call the associated function?
L451[23:51:59] <Penn​yJim> if so, how do I keep my program from closing, or if I don't have to do anything, how do I close it?
<<Prev Next>> Scroll to Top