<FromGitter>
<christopherzimmerman> Is it possible to pass an operator into a macro? I tried passing it as a symbol (`:+`) and as normal but it won't parse.
sz0 has quit [Quit: Connection closed for inactivity]
f1refly has quit [Ping timeout: 276 seconds]
f1refly has joined #crystal-lang
DTZUZO has quit [Ping timeout: 268 seconds]
absolutejam2 has joined #crystal-lang
<FromGitter>
<watzon> Is there no way to get instance methods and variables in macros still?
ht__ has joined #crystal-lang
dwdv has joined #crystal-lang
<FromGitter>
<ImAHopelessDev_gitlab> @christopherzimmerman nice, what kinda project are you working on?
absolutejam2 has quit [Ping timeout: 265 seconds]
<FromGitter>
<bararchy> Is Process MT safe ?
ua has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
<oprypin>
bararchy, purely by the idea, it really should be
<oprypin>
coud have bugs tho
DTZUZO has quit [Ping timeout: 246 seconds]
ua has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter>
<bararchy> "coud have bugs tho" here be dragons
<FromGitter>
<bararchy> :)
<FromGitter>
<bararchy> I saw MT horrors in the last 24h that I'm too afriad to trust the "should" notion
<FromGitter>
<bararchy> hahaha
DTZUZO has quit [Ping timeout: 276 seconds]
Vexatos has quit [Quit: ZNC Quit]
Vexatos has joined #crystal-lang
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 268 seconds]
alexherbo2 has joined #crystal-lang
absolutejam2 has joined #crystal-lang
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 245 seconds]
DTZUZO has joined #crystal-lang
absolutejam2 has quit [Ping timeout: 245 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 246 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 252 seconds]
DTZUZO has joined #crystal-lang
ht__ has quit [Ping timeout: 276 seconds]
ht__ has joined #crystal-lang
<FromGitter>
<Blacksmoke16> @watzon can get class methods, just not variables iirc
<FromGitter>
<bararchy> btw, does Mutex.synchronize stops the world or just makes sure this specific blocks get executed by a single Fiber each time?
<FromGitter>
<asterite> the latter
<FromGitter>
<asterite> synchronize calls lock before entering the block, unlock when exiting. You can imagine a fiber trying to enter the block. If it's unlocked it enters and locks, and until unlocking no other fiber can enter because it's locked
<FromGitter>
<asterite> mutex exist in almost every language, maybe there's a wiki page or article about them
<FromGitter>
<kingsleyh> if anyone uses MacOS and likes to switch between Crystal versions - I just wrote this super simple version switcher: https://github.com/kingsleyh/ball
rohitpaulk has quit [Remote host closed the connection]
<Yxhuvud>
Hmm. I'm fiddling with C bindings. Anyone know if I can define unions inside a struct definition, or do I have to give it a name and define it outside the struct?
<FromGitter>
<ochran> But that doesn't seem to be exactly what I want, but will have to do. Cheers sir
<FromGitter>
<kingsleyh> @j8r pine didn't work for me - and it doesn't look like it's maintained much - /usr/local/bin is convenient for my purposes - but I should probably move the directories into /usr/local
DTZUZO has joined #crystal-lang
<FromGitter>
<tenebrousedge> `/usr/local/bin` should be `~/.local/bin`
<FromGitter>
<kingsleyh> if I move it to a local path then it will only work for me - and I need to switch users often which why I put it in /usr/local/bin - but I could make that configurable - although I'm not expecting anyone else to use my ball library really - but it's convenient for me
<FromGitter>
<Blacksmoke16> whats the use case for switching versions a lot?
<FromGitter>
<Blacksmoke16> older libs that arent up to date anymore?
<FromGitter>
<kingsleyh> many of my apps are broken by new releases - and it takes quite some time to migrate them
<FromGitter>
<Blacksmoke16> fair enough
<FromGitter>
<kingsleyh> in the past I just stayed up to date all the time - but the most recent releases caused a large amount of breakage
<FromGitter>
<ilanpillemer> part 2 is taking forever
<FromGitter>
<ilanpillemer> Woot!
<FromGitter>
<ilanpillemer> it completed
<FromGitter>
<gdotdesign> @kingsleyh there is https://asdf-vm.com/ it has a crystal plugin don't know if it's up to date or now
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter>
<Blacksmoke16> er should be `myAddress`, i fixed it
<FromGitter>
<Blacksmoke16> but cant edit anymore so welp
sagax has quit [Quit: Konversation terminated!]
Groogy has joined #crystal-lang
Groogy has quit [Client Quit]
<FromGitter>
<bararchy> I really really want a niceness level for Fibers
<FromGitter>
<bararchy> spawn(-19) do ⏎ ⏎ end
<FromGitter>
<bararchy> or some similar method to indicate which Fibers are more important and which a are less so
<FromGitter>
<tenebrousedge> that would be nice, but should Crystal implement that in core?
<FromGitter>
<bararchy> what I said or @Blacksmoke16 ?
<FromGitter>
<tenebrousedge> you
<FromGitter>
<bararchy> so, adding something like that means integration with the scheduler, and all concurrency model
<FromGitter>
<bararchy> so I guess it has to go into Core
<FromGitter>
<tenebrousedge> hmmm
<FromGitter>
<straight-shoota> Well, technically you can reopen the scheduler or write your own
<FromGitter>
<bararchy> I'm sure I can, but won't something like that be valuable for multiple people?
<FromGitter>
<straight-shoota> Maybe
<FromGitter>
<bararchy> as in, you can say "This Fiber is the most important, before scheduling other Fibers, make sure he don't want to get wake up"
<FromGitter>
<straight-shoota> I'm sure you can already do that by manually enqueing the respective fiber.
<FromGitter>
<straight-shoota> The scheduler implementation has changed a bit since MT and I'm not overly familiar with its workings after that, but it should be possible
<FromGitter>
<bararchy> will that mean "make this Fiber be tested now!" sort of thing? or just to put it in the end of the queue?
<FromGitter>
<straight-shoota> It means it is added to the runnables queue. This queue is worked off when a fiber yields
<FromGitter>
<straight-shoota> So it might not be executed immediately at the next fiber switch if other fibers are ready and in the runnables queue, but pretty soon
gangstacat has quit [Ping timeout: 276 seconds]
ht__ has quit [Ping timeout: 246 seconds]
<FromGitter>
<bararchy> @straight-shoota what does `.resume` means?
<FromGitter>
<bararchy> isn't that what i'm looking for ?
<FromGitter>
<straight-shoota> It immediately switches execution to the respective fiber
<FromGitter>
<straight-shoota> It forces a context switch. The current fiber will not be continued, unless it has been enqueued before
gangstacat has joined #crystal-lang
<FromGitter>
<straight-shoota> Or is resumed/enqueued again from somewhere else