<<Prev Next>> Scroll to Bottom
Stuff goes here
L1[00:06:16] * Amanda
startles back to reality "WHEN AM I!?"
L2[00:06:35] <Amanda> I didn'tjust lose the
last 10h to halucinating, y'all have no proof!
L3[00:11:21]
<Ariri>
Your FBI agent thinks otherwise
L4[00:11:38] <Amanda> Rude! I paid them o--
I mean, they have nothing to say otherwise about!
L5[00:13:42] <Amanda> %choose it's not
delivery, it's BEEEEEEEEESSSSSS or something else
L6[00:13:43] <MichiBot> Amanda: I've heard
"something else" is in these days
L7[01:01:18] * Amanda
beams a glass of Ariri's favourite beverage in front of her, in a
totally innocent looking"Gift"
L8[01:01:25] <Amanda> s/in a /as a /
L9[01:01:26] <MichiBot> * Amanda beams a
glass of Ariri's favourite beverage in front of her, as a totally
innocent looking"Gift"
L10[01:14:58]
<20kdc>
ooo, stealable shiny!
L11[01:15:19]
<20kdc>
nabs and drinks Ariri's drink
L12[01:16:17] *
Ariri sees a bright orange fizz spray into 20kdc's face as they pop
the cap open
L13[01:17:57] <Amanda> Rather impressing,
considering I provided it in a glass
L14[01:57:00] <Ariri> my brain skipped over
that part and envisioned a glass bottle
L15[01:57:38] <Ariri> it doesnt add to the
taste of orange creme soda, but I still prefer it for some
reason
L17[02:04:44]
<ThePiGuy24> hmm "e" looking
interesting ;p
L18[02:41:08]
<Vaur>
%tonk
L19[02:41:09] <MichiBot> Fopdoodle! Vaur!
You beat CompanionCube's previous record of 4 hours, 20 minutes
and 15 seconds (By 1 hour, 30 minutes and 12 seconds)! I hope
you're happy!
L20[02:41:10] <MichiBot> Vaur's new record
is 5 hours, 50 minutes and 27 seconds! Vaur also gained 0.0075
(0.0015 x 5) tonk points for stealing the tonk. Position #1.
L21[02:45:06] ⇦
Quits: Thutmose (~Patrick@host-69-59-79-181.nctv.com) (Quit:
Leaving.)
L23[02:46:37] <MichiBot> Amanda: Inari
will be notified of this message when next seen.
L25[03:01:52]
<bad at
vijya> Izaya: how do you feel about glow filters
L26[03:02:51] ⇦
Quits: ThePiGuy24 (~ThePiGuy2@host-92-17-126-142.as13285.net)
(Remote host closed the connection)
L27[03:17:11]
<bad at
vijya> i just learned CSS has variables
L28[03:33:02] *
Amanda flops down around Elfi, yawns
L29[03:33:25]
<Kleadron>
>bad at vijya:
L30[03:33:25]
<Kleadron>
I thought my eyes were doing shit or my monitor was acting up but
it's just the glow around the text in the image itself
L31[03:33:32] <Amanda> I don't want to use
the sleeps, but my body's betraying me, Elfi D:
L32[03:36:13] <Elfi> It's okay, you will
dream about fairies and areas to explore and play with
L33[03:38:06] *
Amanda yawns again
L34[03:38:25] <Amanda> Okie, after one...
More.. vid... Zzzz
L35[03:40:19] <Amanda> ( night nerds
)
L36[03:42:39] * Elfi
snuggles in cozily with and does a heckin sleep too
L37[04:00:14] ⇦
Quits: Corded (~MichiBot@ip160.ip-192-99-104.net) ()
L38[04:00:14] ⇦
Quits: MichiBot (~MichiBot@ip160.ip-192-99-104.net) ()
L39[04:04:45] ⇨
Joins: Neo (~neo@ip160.ip-192-99-104.net)
L40[04:04:57] *** Server sets mode: +ntz
L42[04:36:40] <Izaya> bad_at_vijya: glow
can be good used sparingly
L44[04:45:28] ⇦
Quits: ben_mkiv|afk
(~ben_mkiv@200116b814bfef0096481e976cce219d.dip.versatel-1u1.de)
(Ping timeout: 189 seconds)
L45[04:56:38] <Izaya> oh, looks like payo's
alive
L46[05:28:19] <Ariri> Izaya, that has meme
potential as a template if it isn't one already
L47[05:29:02] <Izaya> fairly sure that
one's a templated meme
L48[05:29:46] <Ariri> I've not seen it
then
L49[06:04:30] <Izaya> okay so
L50[06:04:43] <Izaya> I want pipes that
only insert into an inventory when given a redstone signal
L51[06:04:46] <Izaya> what are my
options?
L52[06:15:19] ⇦
Quits: Hawk777 (~chead@2607:c000:8265:f800:64ec:64c0:c3cf:e089)
(Quit: Leaving.)
L53[06:21:27] ⇦
Quits: flappy (~flappy@88-113-155-26.elisa-laajakaista.fi) (Ping
timeout: 189 seconds)
L54[06:34:28] ⇨
Joins: Vexatos
(~Vexatos@port-92-192-163-98.dynamic.as20676.net)
L55[06:34:28] zsh
sets mode: +v on Vexatos
L56[07:31:02]
<kamray23>
anyone here?
L57[07:35:21]
<Vaur> yes
?
L58[07:49:53] ⇨
Joins: ThePiGuy24
(~ThePiGuy2@host-92-17-126-142.as13285.net)
L59[08:02:45]
<kamray23>
just saying
L60[08:02:55]
<kamray23>
i just saw a bit of code
L61[08:03:08]
<kamray23>
someone was catching the exceptions in a string-returning
function
L62[08:03:17]
<kamray23>
and returning them
L63[08:03:40]
<kamray23>
so if anything went wrong noone would know and it would just write
error messages into wherever that data was going
L64[08:51:14] ⇨
Joins: Inari (~Pinkishu@p4fe7ed98.dip0.t-ipconnect.de)
L65[08:51:19] <Inari> omg
L66[08:51:21] <Inari> payonel is
alive!
L67[08:51:35] <Inari> Amanda: I ate it
al
L69[08:52:30]
<ThePiGuy24> payonnaise
L70[08:53:58] <Inari> mayonel
L72[09:09:02] ⇦
Quits: hnOsmium0001 (uid453710@id-453710.stonehaven.irccloud.com)
(Quit: Connection closed for inactivity)
L73[09:38:45] <Izaya> anyone know a way to
detect a player's hunger level with OC?
L74[09:42:27]
<bad at
vijya> really slowly shoot them with arrows and see if they
regen :^)
L75[09:51:33]
<ThePiGuy24> trap them in a box and see
how long it takes them to starve
L76[09:51:46]
<ThePiGuy24> (and strip their inv
first)
L77[09:56:04]
<bad at
vijya> some person with the username "yax" added me as
a friend, and then cancelled the request, and now they're using my
username
L78[09:56:05]
<bad at
vijya> weird
L80[10:04:56]
<Teris>
That's not very nice of them
L81[10:08:52]
<bad at
vijya> in other news
L83[11:02:56] ⇨
Joins: t20kdc
(~20kdc@cpc139384-aztw33-2-0-cust220.18-1.cable.virginm.net)
L84[11:04:34] ⇨
Joins: TPG24
(~ThePiGuy2@host-92-17-126-142.as13285.net)
L85[11:06:21] ⇦
Quits: ThePiGuy24 (~ThePiGuy2@host-92-17-126-142.as13285.net) (Ping
timeout: 189 seconds)
L86[11:07:41] <Amanda> Izaya: I think the
nanobots can? Though that's extremely low range
L87[11:07:43] ***
TPG24 is now known as ThePiGuy24
L88[11:25:49] ⇦
Quits: glasspelican (~quassel@2607:5300:201:3100::325) (Quit:
http://quassel-irc.org - Chat comfortably.
Anywhere.)
L89[11:26:38] ⇨
Joins: glasspelican (~quassel@2607:5300:201:3100::325)
L90[11:32:28]
<Forecaster> %tonkout
L91[11:32:29] <MichiBot> Sard! Forecaster!
You beat Vaur's previous record of 5 hours, 50 minutes and 27
seconds (By 3 hours and 52 seconds)! I hope you're happy!
L92[11:32:30] <MichiBot> Forecaster has
stolen the tonkout! Tonk has been reset! They gained 0.008 tonk
points! plus 0.007 bonus points for consecutive hours! (Reduced to
50% because stealing) Current score: 0.8672707. Position #3 Need
0.1631903 more points to pass CompanionCube!
L93[11:43:14] ⇨
Joins: TPG24
(~ThePiGuy2@host-92-17-126-142.as13285.net)
L94[11:44:01] ⇦
Quits: ThePiGuy24 (~ThePiGuy2@host-92-17-126-142.as13285.net) (Ping
timeout: 189 seconds)
L95[12:14:14] ***
TPG24 is now known as ThePiGuy24
L96[12:38:08] <Amanda> dequbed @Bob: so is
there really any point in using String over &str? I assume it's
similar to Java's boxed native types, but want to be sure
L97[13:23:13]
<Bob> Well
they're different things
L98[13:23:28]
<Bob> a
String is the dynamic on heap representation
L99[13:24:07]
<Bob> while
a &str is a peek into some memory really, its a slice type
which is generally static in size
L100[13:25:00] ⇦
Quits: DBotThePony (~Thunderbi@31.220.170.28) (Ping timeout: 198
seconds)
L101[13:28:46] <Amanda> 9I see
L102[13:29:15] <Amanda> So I probably
should be using String for something that might be dynamic, such as
a generated output from a command issued in a MUD. :P
L103[13:30:38] <Amanda> How would you
recommend something like a command lookup map, @Bob ? I'd rather
have it in a generic type so I can do someCommandTable.run(inp)
with multiple someCommandTables, so I can attach them to different
things
L104[13:31:03] <Amanda> I'm guessing I'd
want a HashMap or similar of Fn, but the rust book seems to be
using `where` for that?
L105[13:32:06]
<Bob>
&str being constant size, youd probably want to use them for
reading only, usually as function arguments
L106[13:32:58]
<Bob> and
`where` is just giving restrictions to generics
L107[13:33:11]
<Bob> for
HashMaps, the keys need to be `Hash`
L109[13:34:29] <Amanda> Note that the room
data's loadded from an XML file
L110[13:34:52] <Amanda> ( And defined as a
String as well )
L111[13:41:43]
⇨ Joins: DBotThePony (~Thunderbi@31.220.170.28)
L112[14:11:51]
<BrisingrAerowing> @bad at vijya you may
want to notify Discord of that.
L113[14:11:58]
<BrisingrAerowing> Seems to be a bug /
exploit.
L114[14:12:12]
<bad at
vijya> amazing
L115[14:12:18]
<BrisingrAerowing> I don't think they'll
take kindly to someone doing that.
L116[14:12:37]
<bad at
vijya> i just figured they changed their name to mine to
uhh
L117[14:12:49]
<bad at
vijya> impersonate me or something idk
L118[14:18:51]
⇨ Joins: Thutmose
(~Patrick@host-69-59-79-181.nctv.com)
L119[14:25:00]
<Vaur>
%tonk
L120[14:25:02] <MichiBot> Eh! Vaur! You
beat Forecaster's previous record of <0 (By 2 hours, 52 minutes
and 32 seconds)! I hope you're happy!
L121[14:25:03] <MichiBot> Vaur's new
record is 2 hours, 52 minutes and 32 seconds! Vaur also gained
0.00288 tonk points for stealing the tonk. Position #1.
L122[14:33:17] ⇦
Quits: Amanda (~weechat@c-73-165-85-199.hsd1.pa.comcast.net) (Ping
timeout: 189 seconds)
L123[14:38:19]
<Ariri> I
don't think the username thing is a bug, unless they copied the
identifier too
L124[14:50:48]
<20kdc>
actually that could be a thing
L125[14:50:48]
<20kdc>
using an FR to determine you do actually exist,
L126[14:51:23]
<20kdc>
then renaming to you in order to get their discriminator
changed
L127[15:02:35]
⇨ Joins: Amanda
(~weechat@c-73-165-85-199.hsd1.pa.comcast.net)
L128[15:08:14]
⇨ Joins: ben_mkiv
(~ben_mkiv@200116b8148e5b00b349511101b8d277.dip.versatel-1u1.de)
L129[15:16:51]
⇨ Joins: Hawk777
(~chead@2607:c000:8265:f800:64ec:64c0:c3cf:e089)
L130[15:17:49] <Inari> %splash
Amanda
L131[15:17:49] <MichiBot> You fling a sour
coralcreep potion (New!) that splashes onto Amanda. Amanda turns
into a toad sloth boy until someone stops looking at them.
L132[15:18:18] *
Amanda glares at Inari
L133[15:18:27] <Inari> :3
L134[15:39:21]
<payonel>
looks like someone hacked my account and started cleaning up a
bunch github issues
L135[15:39:43]
<Forecaster> the nerve
L136[15:40:37]
<Bob> wait
a second
L137[15:40:44]
<Michiyo>
>payonel: looks like someone hacked my account and…
L138[15:40:45]
<Michiyo>
Payo!
L139[15:41:52]
<Forecaster> nah, this is probably the
hacker
L140[15:42:07]
<Forecaster> trying to mitigate
suspicion
L141[15:42:13]
<Michiyo>
Imposter payo!
L142[15:42:36]
<Bob> i
dont fucking know whats happening anymore lmao
L143[15:42:46]
<Forecaster> this is probably what the guy
who kept saying "among us" was trying to warn us
about
L144[15:42:54]
<Bob>
hahaha
L145[15:44:45] <Vexatos> @payonel make
sure to enable 2fa
L146[15:45:01] <Vexatos> and stop letting
your dog take the phone
L147[15:46:44]
<Kristopher38> @payonel thank god, I was
getting worried
L148[15:47:09]
<payonel>
haha
L149[15:48:13] ⇦
Quits: ben_mkiv
(~ben_mkiv@200116b8148e5b00b349511101b8d277.dip.versatel-1u1.de)
(Ping timeout: 189 seconds)
L150[15:57:55]
⇨ Joins: Nappali
(~nappali@catv-176-63-26-200.catv.broadband.hu)
L151[15:58:19]
⇨ Joins: Szoba
(~szoba@catv-176-63-26-200.catv.broadband.hu)
L153[15:58:29] <Szoba> szia
L154[15:58:38] <Nappali> megeszem
L155[15:58:46] <Szoba> mert?
L156[15:58:50] <Szoba> miért?
L157[15:58:57] <Szoba> megeszi a
kecskéke
L158[15:59:23] ⇦
Quits: Nappali (~nappali@catv-176-63-26-200.catv.broadband.hu)
(Remote host closed the connection)
L159[15:59:36] ⇦
Quits: Szoba (~szoba@catv-176-63-26-200.catv.broadband.hu) (Client
Quit)
L160[15:59:56]
⇨ Joins: Szoba
(~szoba@catv-176-63-26-200.catv.broadband.hu)
L161[16:00:06]
⇨ Joins: QuasMan
(~quasman@catv-176-63-26-200.catv.broadband.hu)
L162[16:00:12] <Szoba> szia
L163[16:00:22] <QuasMan> heló
L164[16:00:29] <Szoba> megyek
L165[16:00:32] ⇦
Quits: Szoba (~szoba@catv-176-63-26-200.catv.broadband.hu) (Remote
host closed the connection)
L166[16:08:01] ⇦
Quits: QuasMan (~quasman@catv-176-63-26-200.catv.broadband.hu)
(Remote host closed the connection)
L168[16:08:41] <MichiBot>
Title:
Can't yield from an orphan coroutine
| Posted by:
Fingercomp
| Posted: Wed Apr 14 07:20:44 UTC 2021
|
Status: closed
L169[16:13:38]
⇨ Joins: QuasMan
(~quasman@catv-176-63-26-200.catv.broadband.hu)
L170[16:16:49] ⇦
Quits: QuasMan (~quasman@catv-176-63-26-200.catv.broadband.hu)
(Ping timeout: 189 seconds)
L171[16:18:32]
<bad at
vijya> this dude in a dodge charger keeps fucking doing laps in
a parking lot and revving his fucking engine up all the way
L172[16:18:47]
<bad at
vijya> like christ i wanna be able to have my windows down
L173[16:22:16] <Vexatos> @payonel I'm
getting spammed with emails on github there must be a bot going
through every issue
L175[16:24:21]
<Michiyo>
How are you @payonel ?
L176[16:24:27]
<payonel>
alive
L177[16:24:35] <fingercomp> @payonel works
perfectly now, thanks!
L178[16:24:38]
<Michiyo>
Fair enough
L179[16:33:19] ⇦
Quits: tehbeard (~tehesper@208.80.10.200) (Ping timeout: 189
seconds)
L180[16:40:04]
⇨ Joins: TPG24
(~ThePiGuy2@host-92-17-126-142.as13285.net)
L181[16:41:01] ⇦
Quits: ThePiGuy24 (~ThePiGuy2@host-92-17-126-142.as13285.net) (Ping
timeout: 189 seconds)
L182[16:42:14]
⇨ Joins: tehbeard (~tehesper@208.80.10.200)
L183[16:50:44] <dequbed> Amanda: String vs
&str is more of an issue of ownership. String owns itself, so
you can move it around all day and it'll never be an issue.
&str is a reference, the memory is owned by a different scope
and so you can't just throw that around willy-nilly (especially in
futures and stuff that's important) [Exception to the rule
&'static str]. However different to what Bob said &str is
not necessarily static in size, it's more a case of it's not
L184[16:50:46] <dequbed> growable and the
size has to be known at runtime when you create the ref.
L185[16:51:18] <Amanda> ahh
L186[16:52:23] <dequbed> Amanda: So for
example you can't push on a &mut str but you can call take()
and create a smaller slice.
L187[16:53:40]
<Bob> well
you can take a subslice yeah
L188[16:55:26] <dequbed> The static sized
variant of &str is just `str`. That's a static sized array like
[u8; N] is
L189[17:02:30]
<bad at
vijya> i swear to christ
L190[17:02:35]
<bad at
vijya> what is it with hyundai elantra drivers
L191[17:07:15]
<payonel>
Amanda: what language?
L192[17:13:37] <Amanda> @payonel been
plauing with rewriting my C++ mud in rust.
L193[17:14:04]
<payonel>
ah, rust
L194[17:14:08]
<payonel> i
should learn rust
L195[17:17:12] <Amanda> wheee, now it
doesn't complain at you when you go into a room with no
exits!
L197[17:19:25]
⇨ Joins: ben_mkiv
(~ben_mkiv@200116b8148e5b00b349511101b8d277.dip.versatel-1u1.de)
L198[17:26:48]
⇨ Joins: ThePiGuy24
(~ThePiGuy2@host-92-17-126-142.as13285.net)
L199[17:27:18]
<bad at
vijya> a
L200[17:27:30] ⇦
Quits: TPG24 (~ThePiGuy2@host-92-17-126-142.as13285.net) (Ping
timeout: 189 seconds)
L201[17:55:41] <dequbed> Amanda: So I
finally got around to look at your code (sorry <3) and it's
reasonable. Two things I'd (probably) do differently: a) implement
`TryFrom<Exit>` and not `From<Exit>` unless I'm
absolutely sure that that load will never fail, and secondly use
PathBuf::display() instead of to_str().expect() ;)
L202[17:56:57] <dequbed> Also regarding a
much earlier comment of yours I found in the logs: Yes,
"literal".to_string() is basically the best way to
construct a String. Only other option is
`String::from("literal")` but that's not more
efficient.
L203[17:59:22] <dequbed> There's a
slightly hidden rule here the std crate has: `to_XXX` means a
conversion usually including a copy, `into_XXX` means a conversion
taking ownership that doesn't necessarily copies, `as_XXX` means
simple reinterpretation of memory that doesn't do much or any
conversion at all. So using `to_string` is sligthly more idomatic
since it highlights that part.
L204[18:01:57] <Amanda> That explains a
lot about the seemingly-random use of to/as
L205[18:15:33] ⇦
Quits: Renari (~Renari@64.67.31.239.res-cmts.bgr.ptd.net) (Read
error: Connection reset by peer)
L208[18:21:50]
⇨ Joins: Renari
(~Renari@64.67.31.239.res-cmts.bgr.ptd.net)
L209[18:22:20] <Amanda> ( the "you
broke me" message is because look returns a Err because that
particular look type isn't implemented yet )
L210[18:22:43] <Amanda> Specifically an
exit with no pretty title/description
L211[18:23:47] <Amanda> Need to figure out
how to deal with multiple people. At the moment it's more a
telnet-based text adventure than a MUD
L212[18:24:19] <Amanda> But I have no idea
how I'm supposed to share state while not sharing memory
L213[18:24:51] <dequbed> std::sync
:P
L214[18:24:54] <kinkinkijkin> serialize
state and send it over network
L215[18:25:04] <Inari> I want to get into
Rust more, but I always lack applications for it. Esp. given UI is
a pain still
L216[18:25:07] <Amanda> Yo dawg...
L217[18:25:16] <dequbed> Amanda: In other
words; Arc, Mutex, channel and friends
L218[18:25:54] <Amanda> dequbed: maybe in
dense, but I couldn't figure out how to store the channels in, eg,
the connection object
L219[18:26:27] <dequbed> If you're into
reactive programming there a crate building FRP basics on futures
so you can manage state as a stream of futures resolving to the
current state all the time
L220[18:27:10] <dequbed> uh, the type of a
channel receiver is Receiver<T> where T is whatever type
you're trying to send
L221[18:27:25] <Amanda> I've heard of the
popular react library's for, eg, Java, but never really looked into
it
L222[18:27:40] <Amanda> Yeah, but when
i--... I may be dumb
L223[18:27:55] <Amanda> Will test shortly,
snack break
L224[18:28:00] <kinkinkijkin> in most
languages you can store refs and, maybe if the lang is a little
tiny bit dumb, ask a dereferencing function for access
L225[18:28:22] <dequbed> But what's
stopping you from storing an Arc<Mutex<MyState>> in the
connections so you don't have to memcpy it on every update and also
have bidirectional updates?
L226[18:28:53] <Amanda> Wait
L227[18:29:11] <Amanda> Mutex is more than
the sqme-named sync primitive!?
L228[18:29:29] <kinkinkijkin> rust sounds
like a wild ride
L229[18:29:31] <dequbed> Uh, in Rust mutex
*contains* the thing your syncing
L230[18:29:43] <Amanda> I thought it was
just the primitive, not any helpful stuff above that
L231[18:29:46] <dequbed> So
Mutex<u64> gives you exclusive access to one u64
L232[18:30:02] <dequbed> (which is stored
*in* the mutex object )
L233[18:30:11] <Amanda> Son of a...
L234[18:30:27] <dequbed> So
Arc<Mutex<u64>> gives you a atomic reference counted
pointer to one u64 you can read/write from several threads
L235[18:30:48] <dequbed> And you create
that once with Arc::new(Mutex::new(0u64)) which does the
allocation.
L236[18:31:27] <kinkinkijkin> jesus at
that point just use a global channel
L237[18:31:29] <dequbed> Amanda: Wait
until you've heard about RwLock which gives you parallel reads but
serial writes with the same mental overhead as Mutex ! :P
L238[18:31:32] <kinkinkijkin> wait does
rust even have globals
L239[18:31:48] <dequbed> kinkinkijkin: Why
the fuck would I use a global channel for that?
L240[18:32:27] <kinkinkijkin>
significantly less references thrown around, might be mixing
terminology here on the word channel
L241[18:32:35] <dequbed> Yeah you probably
are
L242[18:34:10] <kinkinkijkin> mean more
of, a global, locked struct with a buffer for case of
write-during-lock
L243[18:34:24] <kinkinkijkin> ill be
honest, programming terms are nutty at times
L244[18:34:27] <dequbed> And that's
different to a Mutex .. how exactly?
L245[18:34:35] <kinkinkijkin> so that's
what a mutex is
L246[18:34:40] <dequbed> yes.
L247[18:34:46] <kinkinkijkin> damn I'm an
idiot then
L248[18:34:49] <dequbed> Well no.
L249[18:35:15] <dequbed> A Mutex doesn't
buffer writes because that's generally what one in the industry may
call *a bad idea*
L250[18:35:47] <dequbed> But the locked
part is what a mutex is :P
L251[18:35:59] <kinkinkijkin> buffer
potential writes, in languages i use with locks you generally want
to lock the entire struct
L252[18:36:32] <dequbed>
Mutex<MyState> locks the entirety of whatever MyState is, no
matter if that's 1 byte or 1 GB.
L253[18:36:55] <kinkinkijkin> so you can
have a potential-buffer and im trying to remember the use case for
a buffer in this
L254[18:37:34] <dequbed>
"""lockless""" code
L255[18:37:59] <kinkinkijkin> sorry, the
code I write tends to be very careful on the data end
L256[18:38:24] <kinkinkijkin> so stuff
like this is barely useful to me ever, and when it is i just look
at refdocs
L257[18:39:44] <dequbed> With
multithreaded code you can't really get around some level of
syncing so at some point you'll have to look at Mutexes and
friends
L258[18:40:19] <kinkinkijkin> I somewhat
obsessively avoid extra reads and writes, and I haven't written
anything manually-threaded yet
L259[18:40:39] <kinkinkijkin> I did have
auto-threading in something I wrote in C# a long time ago
though
L260[18:40:52] <dequbed> Even if you
reduce reads and writes to the absolute bare minimum using ASM you
still have to sync stuff.
L261[18:41:23] <dequbed> "you"
as in the application. "you" the developer can totally
rely on language primitives or libraries for that stuff.
L262[18:41:34] <kinkinkijkin> yes
yes
L263[18:42:20] <kinkinkijkin> i meant, a
lock is a write, so any form of lock tends to be something i don't
actually do unless i have to
L264[18:43:14] <kinkinkijkin>
unsurprisingly usually the first run of any big chunk of code of
mine has issues like write-before-read and extremely hard-to-catch
memory leaks
L265[18:43:31] <dequbed> That is in fact
unsurprising.
L266[18:48:06] <kinkinkijkin> very rare i
write something and the first run doesn't have some bug from my
obsession with minimizing heap size and reducing pulls from
ram
L267[18:49:19] <Amanda> dequbed:
million-dollar question! How do I get access to the data inside a
Arc<Mutex<Foo>>?
L269[18:51:56]
<Bob> Arc
is a smart pointer so it'll automatically deref most of the time
and in mutex you'd use one of the unlock methods
L270[18:52:04]
<Bob> and
damn i missed a conversation
L271[18:53:11] <dequbed> Amanda: Any type
that implements the `Deref` trait will automagically be converted
into a reference for that type. E.g. A String can be given to a fn
that expects a &str because String implements Deref<str>.
Arc<T> implements Deref<T> so you can pass it anywhere
you'd need a &T too. Such as Mutex::lock :P
L272[18:54:18] <dequbed> funnily enough
the examples for Mutex::lock actually showcase exactly how to use
an Arc<Mutex> ^^
L273[18:54:49]
<Bob>
They're so tighly related and common togheter so that makes
sense
L274[18:56:17] <dequbed> They're not at
all tightly related but a standalone Mutex is not all that useful.
You will nearly always have it either in a global scope or in an
(atomic) reference counted pointer
L275[19:05:24]
<bad at
vijya> i just write all my multithreaded stuff in lua
L276[19:05:25]
<bad at
vijya> ez
L277[19:08:47] <dequbed> Amanda: And, are
you now enjoying the Mutually Exclusive access Rust has to your
life? :P
L278[19:10:16]
<Forecaster> %tonkout
L279[19:10:17] <MichiBot> Eureka!
Forecaster! You beat Vaur's previous record of 2 hours, 52
minutes and 32 seconds (By 1 hour, 52 minutes and 42 seconds)! I
hope you're happy!
L280[19:10:18] <MichiBot> Forecaster 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.8757707. Position #3 Need
0.1546903 more points to pass CompanionCube!
L281[19:12:52]
<Bob>
>bad at vijya: ez
L282[19:12:52]
<Bob> ive
wrote more multithreaded Lua than i did multithreaded Rust
L283[19:20:02] ⇦
Quits: bauen1 (~bauen1@62.216.210.62) (Remote host closed the
connection)
L285[19:31:11] <dequbed> Amanda: Why do
you use c.lock().unwrap() instead of s? That will always panic.
Secondly, using references and futures is generally finicky. Rule
of thumb: If you use `await` or `async {}` in a scope, move and/or
clone.
L286[19:32:54] <Amanda> dequbed: artifact
of early stabbing trying to make it go away
L287[19:33:56] <dequbed> Anyway, my guess
would be that the `&mut s.player` spawns a "may not live
long enough" but I'm not sure if that's the issue you're
seeing.
L288[19:34:24] <Amanda> "rror: future
cannot be sent between threads safely
L289[19:34:38] <Amanda> which I don't
understand, why would that be sending it through threads?
L290[19:34:45]
⇨ Joins: bauen1 (~bauen1@62.216.210.62)
L291[19:34:47] <Amanda> And s isn't even a
future!
L292[19:34:52] <Amanda> ( unless I'm
missing something )
L293[19:35:19] <dequbed> Amanda: s is in a
future (every async block is one) and tokio will run them on a
threadpool so it has to be able to send them between threads
L294[19:36:35] <Amanda> Shouldn't s be my
Connection, or rather a MutexGuard wrapping my connection
though?
L295[19:37:01] <dequbed> Yes
L296[19:40:33] <dequbed> Amanda: If it
help aleviate some confusion; if you can't send a variable between
threads safely how could you send a future that contains that
variable? That's the basic reason how an async{} block can become
`!Send`
L297[19:56:58] <Amanda> dequbed: what I
don't understand is how that particular code would be sending
across the threads, is this some tokio implementation detail
regarding async/await or something?
L298[19:58:08] <Amanda> is it because I'm
using `&mut s.player`?
L299[19:59:32] <Amanda> Sorry if it's as
"running-around in circles" for you as it is for me
atm
L300[20:01:45] <dequbed> Amanda: Futures
work by setting resume points at every `await`. So basically every
time you hit an `await` the RT packs up the current state of the
function running and prepares to resume it later. The Tokio RT is
written in a way that means that a different thread does
potentially resume execution. To be able to do this safely tokio
requires all futures to be `Send`, i.e. to be able to be safely
sent, even if they will never be sent.
L301[20:02:15] <dequbed> So if you write
await and you're using tokio yes that means that you're
(potentially) sending across threads.
L302[20:02:37] <Amanda> I see
L303[20:03:17] <Amanda> so how can I avoid
this? I assume I should be doing something else to handle these
loops with channels then.
L304[20:03:19] <dequbed> And if you do
something !Send over a resume point (e.g. get a reference that's
!Send and don't drop it before calling await the next time) that
makes the entire future !SEnd
L305[20:03:29] <Amanda> ohhhhh
L306[20:03:43] <Amanda> so just refeencing
s at all is why
L307[20:03:54] <Hawk777> Inlining the
“c.lock().unwrap()” *might* help? That would make it more clear
that the lock is dropped by the time cmds.call() returns, which is
before the output.send() call which is the thing being awaited? Not
sure though, since I don’t have everything else.
L308[20:04:10] <dequbed> In general in
Rust one way of writing code is to just clone and move everything
all the time everywhere and then later when it works optimizing it
by using non-move semantics.
L309[20:04:55] <dequbed> Hawk777: The
issue is (likely) the &mut s.player. Calling c.lock().unwrap()
inline doesn't change anything and calling it twice will just
guarantee a panic ;P
L310[20:06:04] <dequbed> Amanda: More
specifically in this instance; if you can rewrite the fn to not use
a `&mut Player` or whatever that is but instead an
`MutexGuard<Player>` or an `Arc<Mutex<Player>>`
you'll have an easier time
L311[20:06:05] <Hawk777> No no, my point
is that if you inline that into the cmds.call(), then since
cmds.call() is not itself awaited, it will *return* (and therefore
no longer require &mut s.player, presumably—if it does then
you’d get a lifetime error at that point which will explain it). My
idea was to move the implicit drop of s from the end of the block
to in between the call to cmds.call() and to output.send().
L312[20:06:42] <Hawk777> I can’t see most
of the code so I don’t know what most of the types are, so I’m just
guessing here.
L313[20:06:54] <dequbed> Oh right! Yeah
that would work too. I misread what scope the await was for.
L314[20:19:23]
<Kleadron>
Stick shift potato
L315[20:22:58] ⇦
Quits: bauen1 (~bauen1@62.216.210.62) (Remote host closed the
connection)
L316[20:44:37]
⇨ Joins: bauen1 (~bauen1@62.216.210.62)
L317[20:48:07] <Amanda> dequbed: how would
I use `TryFrom` from the calling side that needs a Room form an
Exit?
L318[20:48:46] <Amanda> Also this is
cursed: pub fn build() ->
Arc<RwLock<CommandHolder<Arc<RwLock<Connection>>>>>
{
L319[20:48:54] <Amanda> but it's not
bitching anymore!
L320[20:49:07] <Amanda> ( Except for where
I used TryFrom wrong )
L321[20:51:53] <Amanda> nvm, it's all red
again
L322[20:54:08]
<Bob>
`TryFrom<T> for U` implies `TryInto<U> for T`
L323[20:54:38] <Izaya> housemate was using
all the internet bandwidth so I fixed it
L324[20:54:42] <Izaya> Full-duplex,
10Mb/s, media type is 10/100/1000BaseTX
L325[21:02:07] ⇦
Quits: bauen1 (~bauen1@62.216.210.62) (Quit: Lost
terminal)
L326[21:04:45] ⇦
Quits: Vazde (vazde@2a03:e581::dea) (Ping timeout: 189
seconds)
L327[21:04:53]
⇨ Joins: Vazde (vazde@dea.fi)
L328[21:05:26] <dequbed> Amanda: instead
of into() you use try_into() and handle the error :P
L329[21:06:08] <dequbed> Amanda: Can I
offer you a `pub type CursedType =
Arc<RwLock<CommandHolder<Arc<RwLock<Connection>>>>>;`
in these trying times? :p
L330[21:06:49] *
Amanda screams
L331[21:06:59] <Amanda> I can't get my
head around this!
L332[21:07:10]
<Bob> keep
calm and blame CLion
L333[21:08:01] *
Amanda isn't using CLion
L334[21:09:47] <dequbed> Amanda: I mean
give yourself some credit. You're learning a pretty complex
language very much the hardest possible way and you have a) not
given up b) instead gotten pretty far.
L335[21:10:46] <Amanda> I don't know what
the hell this language wants form me! I don't understand compsci
theory well at all, beyond what I cobble together with my infinite
cat-keyboard brain
L336[21:11:21] <dequbed> Appeasing the
borrow checker is one of the hardest parts about Rust
L338[21:14:19]
⇨ Joins: bauen1 (~bauen1@62.216.210.62)
L339[21:14:39] <Amanda> "rror[E0716]:
temporary value dropped while borrowed
L340[21:16:51] <dequbed> Last I checked
tokio::select is doing some deep magic with futures, I feel like
that has to be restructured for that to work.
L341[21:17:03]
<Bob>
macros r evil
L342[21:17:09] <dequbed> No they
aren't
L343[21:17:15] <dequbed> They're just
rather opaque
L344[21:20:38]
<Bob> well
yeah but still
L345[21:31:29] <Amanda> Well, now it's not
accepting input or output! \o/
L346[21:31:35] <Amanda> I suspect it's
deadlocked!
L347[21:32:38] <Amanda> pushed, I'mma take
a break and try and clear my headthough
L348[21:33:54] <Amanda> %choose waves or
rain
L349[21:33:55] <MichiBot> Amanda:
"rain", now with 30% fewer deaths caused by
negligence!
L350[21:34:11] *
Amanda eyes MichiBot wearily, wondering what she's been doing to
the rain boxes
L351[21:41:18] <dequbed> Amanda:
~~connecting the gas line to the water line on
"accident"~~
L352[21:44:05] <Amanda> dequbed: better
light a match, tjat was a STANKY one
L353[21:49:10] <kinkinkijkin> i consider
rust less of a programming language and ore of a hazing tool
L354[21:49:56] <kinkinkijkin> brave to try
to write a MUD in rust tbh
L355[21:50:16] <kinkinkijkin> especially
one utilizing multiple threads
L356[21:50:57] <dequbed> Rust is a
perfectly fine programming language though.
L357[21:51:21] <Amanda> I've already
written one in C++ over several years
L358[21:51:29] <Amanda> doesn't use
threads, I don't think, though
L359[21:51:42] <kinkinkijkin> many
programming languages are, im more referencing rust's design being
to punish bad code
L360[21:52:09] <kinkinkijkin> bad and
non-cautious code, that is
L361[21:53:00] <Amanda> All this is just
making me cautious of how many ownership/borrow/etc issues I may
have hadin the original C++ versio
L362[21:53:57] <dequbed> Amanda: I mean
you've given yourself a load more of those by starting out
multithreaded with tokio
L363[21:54:18] <Amanda> true
L364[21:54:30] <kinkinkijkin> rust's
compiletime-assured memory safety is very, very good for making
programmers who haven't encountered a similar language prior
question their code
L365[21:54:34] <Amanda> I don't know how
I'd go about doing the FD_SET stuff in rust though
L366[21:55:06] <Amanda> I wonder if it's
too late to go back to that pattern
L367[21:56:00] <kinkinkijkin> btw, are
MUDs generally intense enough for multithreading to be a perf
increase or is this more for realtime action assurance without
running an overly tight gameloop or?
L368[21:56:03]
<Bob> even
i haven't gotten to using threading lol
L369[21:56:29]
<bad at
vijya> man
L370[21:56:34]
<bad at
vijya> my experience with multithreading is
L371[21:56:35]
<bad at
vijya> lua lanes
L372[21:56:39]
<bad at
vijya> and that's it
L373[21:56:41]
<bad at
vijya> lmao
L374[21:56:48]
<bad at
vijya> actually there was a bit of fuckery i did with c
L375[21:56:51]
<Vaur>
%tonk
L376[21:56:52] <MichiBot> Willikers!
Vaur! You beat Forecaster's previous record of <0 (By 2 hours,
46 minutes and 35 seconds)! I hope you're happy!
L377[21:56:53] <MichiBot> Vaur's new
record is 2 hours, 46 minutes and 35 seconds! Vaur also gained
0.00278 tonk points for stealing the tonk. Position #1.
L378[21:57:18] <dequbed> Is writing
multithreaded code seriously that rare? I felt like that's pretty
commonplace to just go towards o.O
L379[21:57:59] <kinkinkijkin> i like using
threads in pace assurance models when i need gameloop-like reaction
time without as much overhead as a single-thread gameloop or loop
slowdown
L380[21:58:14]
<Bob> event
driven design be like
L381[21:58:16] <kinkinkijkin> it's rare in
games stuff, becoming less rare
L382[21:58:40] <kinkinkijkin> events are
often too slow on many platforms
L383[21:58:57] <kinkinkijkin> not going to
write all of my code assuming every user of it uses an RTOS, as
much as that would be ideal
L384[21:59:05] <Izaya> tbh if I want to
use multiple cores I end up splitting the task into multiple
distinct processes
L385[22:00:15] <kinkinkijkin> fast,
consistent event timing is really hard to get on windows, linux,
bsds, etc
L386[22:01:15] <kinkinkijkin> so faking an
event system with infrequent watcher threads paced along with a
main loop can get a bit more predictability
L387[22:04:08]
<payonel>
Izaya: poke
L388[22:04:10] <kinkinkijkin> semirelated,
I'm trying to think of something to do with tonight's pay, i know i
want to fulfill a device need but i dont know whether i want to get
a device for os stuff or a wifi-to-ethernet bridge
L389[22:04:13] <Izaya> hi hi
L390[22:07:22] <Izaya> saw activity on GH
and figured you were alive, and I suppose that's accurate now but
perhaps not at the time
L391[22:08:56]
<payonel>
life has been way too heavy for me for the last year. not trying to
be dramatic, but...it is hard to chill and hobby code when life
sucks
L392[22:09:27]
<payonel>
sorry to be negative about such things. i'm sure there are many who
deal with worse things than i
L393[22:09:36] <Izaya>
understandable
L394[22:10:12] <Izaya> my latest project
may amuse you
L395[22:10:21]
<payonel> 🙂
oh?
L396[22:10:35] <Izaya> I've built LuPI2
and Linux 5.12 for PowerPC because I'm going to turn my eMac into a
dedicated OC emulator
L397[22:11:04] <Izaya> 800Mhz PowerPC G4,
384M of RAM, going to swap the 40GB HDD for an 8GB SSD later
L398[22:11:39]
<ThePiGuy24> might just be able to run
mineos ;p
L399[22:11:57]
⇨ Joins: Office
(~Office@ip98-166-70-166.hr.hr.cox.net)
L400[22:12:11] <Izaya> also, 1280x960 CRT,
so with a 16x8 font, I can get 160x60 characters on the
screen
L401[22:12:24] ⇦
Quits: Office (~Office@ip98-166-70-166.hr.hr.cox.net) (Client
Quit)
L402[22:13:44]
<payonel>
izaya: in lupi, is (the equivalent of) /sbin/init a lua
script?
L403[22:13:56]
<payonel>
does the lua init use c binding to talk to the kernel?
L404[22:14:16] <Izaya> yeah lupi is a
fairly minimal OC emulator written in C that runs as init
L405[22:14:37]
<payonel> i
see, that makes sense
L406[22:14:44] <Izaya> or, is designed to
run as init
L407[22:15:35]
<payonel>
when lupi is emulating the filesystem, is it using c api for
whatever is mounted to / ?
L408[22:15:39] <Izaya> it's pretty well
abandoned but I think I'm semi-competent enough to make it work for
my usecase
L409[22:15:46]
<payonel>
init normally would do more for things like fstab
L410[22:16:16] <Izaya> it mounts the root
filesystem and nothing else, as far as I can tell
L411[22:16:18]
<payonel>
and so, i wonder, in lupi, do you just have to deal with which ever
rootfs was mounted by kernel config?
L412[22:16:21] <Izaya> I was going to
extend it
L413[22:16:24]
<payonel>
"it" being lupi?
L414[22:16:31] <Izaya> yeah
L415[22:16:35]
<payonel>
does lupi remount rootfs rw then?
L416[22:16:37] <Izaya> it's been a week
since I looked at it though so I may be wrong
L417[22:16:59]
<payonel>
it just makes me start to consider things that init needs to do
that are more than just emulate oc
L418[22:17:09]
<payonel>
"need" being, for a reasonable host to talk to
L419[22:17:19]
<payonel>
"need" being, for the emulator to have a reasonable host
to talk to [Edited]
L420[22:21:05] <Izaya> I was thinking
about extending it to automount stuff
L421[22:21:13] <Izaya> the way it works is
that OC only sees stuff under /root
L422[22:21:22]
<payonel>
oh i see
L423[22:21:40] <Izaya> so I was thinking,
have it auto-mount filesystems that it can under like
/mnt/UUIDHERE, then expose those as filesystem components
L424[22:22:08] <Izaya> it also has some
capacity for internet card support but I removed all the IP
networking related stuff from my build of the kernel I could
L425[22:22:49] <Izaya> I want to support
talking to the ethernet card as a modem component so I can do
minitel over ethernet
L426[22:22:54] <Izaya> (MOE for
short)
L428[22:26:08] <Izaya> I also want to
allow access to raw block devices as drive components
L429[22:36:24] <Amanda> Inari: I feel like
it's past-due time for your foxes to return the remote they stole.
:|
L430[22:41:34] <Inari> No!
L431[22:41:53] <Amanda> D: Rude!
L432[22:42:06] <Corded> * <Michiyo>
hugs @payonel
L433[22:43:54]
<Forecaster> %sip
L434[22:43:55] <MichiBot> You drink a
gloomy emerald potion (New!). Forecaster's favourite hair suddenly
disintegrates.
L435[22:44:03]
<Forecaster> D:
L436[22:44:11] <Amanda> %splash rude foxes
named Inari with Mutable Green Potion
L437[22:44:11] <MichiBot> You fling a
mutable green potion (New!) that splashes onto rude. rude turns
into a shark until someone looks at them.
L438[22:44:19] <Inari> rude
L439[22:44:28] <Inari> %bite Amanda
L440[22:44:28] <MichiBot> Inari is trying
to bite Amanda! They have 1 minute if they want to attempt to
%defend against it!
L441[22:44:32] <Amanda> %parry
L442[22:44:32] <MichiBot> Amanda failed to
parry Inari. With a 9 vs 12 Amanda takes the full 4 damage.
L443[22:44:36] <Amanda> rude!
L446[22:50:18]
<ThePiGuy24> ah yes soviet, uh,
thing...
L447[22:50:28] <Izaya> nuclear powered
airships
L448[22:51:33]
<ThePiGuy24> yeah something like
that
L449[22:57:13] ⇦
Quits: Izaya (~izaya@210.1.218.92) (Ping timeout: 189
seconds)
L450[23:05:18] ⇦
Quits: CompanionCube (~samis@thonk.9net.org) (Quit: ZNC - http://znc.in)
L451[23:05:36] ⇦
Quits: jackie (~jackie@irc.chaosfield.at) (Quit: bye
o/)
L452[23:05:54] ⇦
Quits: Stary (~Stary@thonk.9net.org) (Remote host closed the
connection)
L453[23:06:43] ⇦
Quits: ben_mkiv
(~ben_mkiv@200116b8148e5b00b349511101b8d277.dip.versatel-1u1.de)
(Remote host closed the connection)
L454[23:06:44] ⇦
Quits: Vexatos (~Vexatos@port-92-192-163-98.dynamic.as20676.net)
(Quit: Insert quantum chemistry joke here)
L455[23:07:12]
⇨ Joins: CompanionCube (~samis@thonk.9net.org)
L456[23:07:28]
⇨ Joins: Stary (~Stary@thonk.9net.org)
L457[23:08:00]
⇨ Joins: ben_mkiv
(~ben_mkiv@200116b8148e5b00b349511101b8d277.dip.versatel-1u1.de)
L458[23:10:05]
⇨ Joins: jackie (~jackie@tureis.comfix.cc)
L459[23:10:05]
zsh sets mode: +v on jackie
L460[23:20:24] *
Amanda beams a thimble onto Elfi's head, observes her
reaction
L461[23:20:44] *
Elfi squeaks! picks the thimble up offer her head
L462[23:21:05] *
Elfi fills it with nectar and sips from it. '3'
L463[23:21:15] *
Amanda giggles, snugs
L464[23:34:31] <t20kdc> oh hey I didn't
know that the "Kirov" was based off of what appears to be
relatively real-looking plans
L465[23:35:01] <t20kdc> even has lil'
"teeth"...
L466[23:36:17] <Amanda> %choose laptop nap
time?
L467[23:36:18] <MichiBot> Amanda:
"laptop nap time" doesn't really seem like a good idea
right now.
L468[23:56:29] ⇦
Quits: Hawk777 (~chead@2607:c000:8265:f800:64ec:64c0:c3cf:e089)
(Quit: Leaving.)