ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
irc_user has joined #crystal-lang
<FromGitter> <stellarpower> FYI:
<FromGitter> <stellarpower> shards build -Dpreview_mt -Dpreview-mt --error-trace mainThread
<FromGitter> <stellarpower> Does work
<FromGitter> <stellarpower> Defines in shards I mean
<FromGitter> <stellarpower> Is there a way I can delete a method overload in a child class?
<FromGitter> <stellarpower> I.e. prevent it from being called explicitly. Equivalent of
<FromGitter> <stellarpower> ```class B : public A{ ⏎ void fFromA() = delete; ⏎ };``` []
<FromGitter> <Blacksmoke16> maybe like
<FromGitter> <Blacksmoke16> ```def method ⏎ {% @def.raise "This method does not exist" %} ⏎ end``` []
<FromGitter> <Blacksmoke16> or at the least ` "..."`
<FromGitter> <stellarpower> Finally!
<FromGitter> <Blacksmoke16> ofc best answer would be just dont define it at all so its truly undefined?
<FromGitter> <stellarpower> IT won;t send the screenshot but I have a GUI and it is updating
<FromGitter> <stellarpower> ^^ I want it to be compil;e-time though
<FromGitter> <stellarpower> I think a parent class' constructor is being called when I want a compile error, in this case
<FromGitter> <Blacksmoke16> `private def`?
<FromGitter> <stellarpower> YEah that would do it, thanks
<FromGitter> <stellarpower> Make it private, the old ways.
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <stellarpower> Why did I not think of that haha
<FromGitter> <stellarpower> I think `= delete` only came in C++11
<FromGitter> <stellarpower> Maybe I Can make itnot compile actually, cause methods are a bit like generics in other languages right, the actual code is only really ocmpiled at the point they are used, because you can;t know how the types will filter through
<FromGitter> <stellarpower> I could presumably force an error in somehow to make sure it isn;t called
<FromGitter> <stellarpower> OR, rather, it doesn;t compile, with a message that then means I fix it
<FromGitter> <stellarpower> Although for a cponstructor now I would need to instantiate all my members or they become nillable
<FromGitter> <stellarpower> So, it also now seems to be locking up reading from a channel
<FromGitter> <stellarpower> Surely that will return ontrol to other fibers right?
<FromGitter> <stellarpower> Somnehoe looks that replacing `receive` with `receive?`has made a difference, but I'm not sure why..
<FromGitter> <stellarpower> This may also be relevant
Sankalp has quit [Ping timeout: 244 seconds]
irc_user has quit [Quit: Connection closed for inactivity]
Sankalp has joined #crystal-lang
<FromGitter> <Blacksmoke16> might be a good use case for `select`?
<FromGitter> <Blacksmoke16> then could like wait specific amount of time, or fallthru if nothing is waiting to be recieved etc
_ht has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 244 seconds]
egality has joined #crystal-lang
<FromGitter> <stellarpower> Should there be any conceptual differences between select and just calling receive for a single channel?
jmdaemon has quit [Ping timeout: 244 seconds]
<FromGitter> <stellarpower> Think the threading is finally working, I was hitting a bit of a nasty silent issue with my other code
<FromGitter> <stellarpower> I give up, it's just back to hanging now
<FromGitter> <stellarpower> I feel like any attempts to make threading easier just take away control and leave things broken. If I could just make threads and use mutices this would probably get easier
yxhuvud has quit [Remote host closed the connection]
<FromGitter> <stellarpower> urhg finally okay
<FromGitter> <stellarpower> I was writing to a channel before actually entering the event loop.
<FromGitter> <stellarpower> I thought that should return immediately but evidently it was hanging
<FromGitter> <stellarpower> Is Channel capacity automatic? I.e. it defaults to a sensible value if not given explicitly
yxhuvud has joined #crystal-lang
<FromGitter> <Blacksmoke16> afaik channels dont have a limit unless you create them with one
<yxhuvud> if they don't have a limit they will always wait until the other side is ready though.
<FromGitter> <stellarpower> Right, okay. I thought I must have tried it before and it worked, but maybe I was wrong.
hightower2 has joined #crystal-lang
mr_tr0n has joined #crystal-lang
hightower2 has quit [Remote host closed the connection]
mr_tr0n has quit [Quit: mr_tr0n]
_ht has quit [Remote host closed the connection]
jmdaemon has joined #crystal-lang