RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.4 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
matp has quit [Excess Flood]
<FromGitter> <MaxLap> Looking at the doc about virtual types. If a type Parent has any descendants (even if only abstract ones), then whenever that Parent is refered to in the type inference stuff, it will use the VirtualType since it can always be a subclass, but we can only see it in the tool hierarchy. Is that it or am I missing something?
<FromGitter> <bcardiff> "but we can only see it in the tool hierarchy" what do yo mean?
matp has joined #crystal-lang
<FromGitter> <jots_twitter> read this: https://blog.myhro.info/2017/01/how-fast-are-unix-domain-sockets and did crystal version of unix-sockets with a bit better performance: https://gist.github.com/jots/c410731f43fdb8f66146d372494a582d
<FromGitter> <exts> man i love writing crystal, such a fun learning experience
<FromGitter> <jots_twitter> @manveru: I remember ramaze from the days before merb/rails I think... always liked that framework.
Guest84482 has quit [Remote host closed the connection]
ruby has joined #crystal-lang
ruby is now known as Guest61033
Guest61033 has quit [Ping timeout: 256 seconds]
<FromGitter> <MaxLap> @bcardiff We don't see the "+" sign indicating that something is a virtual type when using things like typeof. All we see is ex: Array(Parent). In crystal tool hierarchy we see the +, but that's the only place (i think?).
Philpax has quit [Ping timeout: 256 seconds]
Philpax has joined #crystal-lang
unshadow_ has quit [Ping timeout: 245 seconds]
onionhammer has quit [Read error: Connection reset by peer]
onionhammer has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has quit [Ping timeout: 256 seconds]
Philpax_ has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
unshadow has joined #crystal-lang
<manveru> is there a way to distinguish between private and public methods?
Ven has joined #crystal-lang
bjz has joined #crystal-lang
unshadow_ has joined #crystal-lang
<manveru> txdv: well, that's how to define them, but in a macro i seem to get all methods of a class, irrespective of visibility
<manveru> ah, maybe with visibility
unshadow has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
<manveru> jup, got it
<bmcginty_> manveru: I'd be interested in seeing what you come up for your routing. I'm wanting to make/use something similar, where you define a route for a function just before/outside that function. I have an idea on how to do it, but I learn something new each time I see someone elses code.
am_ has joined #crystal-lang
am_ has quit [Remote host closed the connection]
Kug3lis has joined #crystal-lang
gloscombe has joined #crystal-lang
<FromGitter> <akwiatkowski> I have problem with `crystal-db` and postgres with `PG::ResultSet#each`. https://gist.github.com/akwiatkowski/52da27ede20da27ea6627a3a722b8225
Raimondi has quit [*.net *.split]
<FromGitter> <akwiatkowski> nevermind, `result.each` without parameter works
swav has quit [*.net *.split]
bazaar has quit [*.net *.split]
Raimondi has joined #crystal-lang
bazaar has joined #crystal-lang
swav has joined #crystal-lang
tilpner has quit [*.net *.split]
jaitaiwan has quit [*.net *.split]
yopp has quit [*.net *.split]
trajing has quit [*.net *.split]
jaitaiwan has joined #crystal-lang
jamie_ca has quit [*.net *.split]
pleiosaur has quit [*.net *.split]
jamie_ has joined #crystal-lang
tilpner has joined #crystal-lang
yopp has joined #crystal-lang
jamie_ is now known as jamie_ca
Raimondii has joined #crystal-lang
pleiosaur has joined #crystal-lang
Raimondi has quit [Ping timeout: 260 seconds]
Raimondii is now known as Raimondi
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
mark_66 has joined #crystal-lang
Philpax_ has quit [Ping timeout: 256 seconds]
gloscombe has quit [Read error: No route to host]
gloscombe has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<Kug3lis> Does anybody think DI is needed for Crystal?
<RX14> it's an alright pattern for big projects I guess
<Kug3lis> Because I am trying to build modular system (web/backend framework) and trying to find a way how to interconnect modules together
<RX14> if you think using DI will help, why not?
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <crisward> DI can be good for testing and stubbing...
Kug3lis has joined #crystal-lang
soveran has joined #crystal-lang
holyheels has quit [Read error: Connection reset by peer]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<splitty_> Would it be hard to support static and constant C arrays in Crystal?
<splitty_> Static arrays would be arrays that land in .data
<splitty_> And constant arrays would be arrays that are only initialized once and never modified, and they'd land in .rodata
<splitty_> They could be used within libs, and they'd be valid for the runtime of the program.
<unshadow_> splitty_: you should open an issue on the git I think, this way a discussion can be followed and understood
<RX14> splitty_, I think StaticArray in a constant would land in rodata
<unshadow_> I think it's a good feature to have :)
<splitty_> Well RX14 I rewrote my GDT three times in Crystal
<splitty_> And never got it to work
<splitty_> It seems like the GDT itself is valid but as soon as the static array goes out of scope everything goes haywire
<splitty_> And since it's stack-allocated, that's really bad, too
<splitty_> Since it polluted the stack
<RX14> well if the staticarray is on the stack it would go haywire when it goes out of scope
<splitty_> Yeah.
<RX14> because it's now off the stack
<splitty_> Well I use unallocated UInt64[5]
<splitty_> Which, afaik, should be a StaticArray
<RX14> you could create the staticarray then just move the memory to the right place
<RX14> should work fine
<splitty_> Yeah but it's tedious
* RX14 shrugs
<RX14> it's the same as C
<splitty_> Supporting "real" static and constant arrays shouldn't be hard
<RX14> i would think
<splitty_> Nope
<RX14> well
<splitty_> if you have a static array in C it'll be valid as long as the program is running
<splitty_> Since all compilers I know put it in .data, if it's never written to, in .rodata
<RX14> if it's top level
<RX14> wait where did you put this staticarray
<splitty_> I put it inside of a module.
<splitty_> As an @@instance variable
<splitty_> I'm pretty sure that shouldn't go out of scope that way
<RX14> hmm
<splitty_> But it seems like the data gets corrupted every time
<splitty_> The thing is, that this is really hard to reproduce outside of a freestanding environment
<RX14> how do you mean "goes out of scope" then
<splitty_> So I didn't open an issue on that yet
<RX14> if it's in a module
<RX14> surely you would just have a pointer to the GDT memory
<RX14> and do it that way
<splitty_> Well apparently the data becomes invalid at some point, and I don't know why.
<splitty_> So I have a GDT module, inside of that GDT module I have the @@entries which are of type uninitialized UInt64[5]
<splitty_> And the GDT @@register (a C struct)
<splitty_> Now if I load the GDT everything seems fine
unshadow_ has quit [Ping timeout: 240 seconds]
<splitty_> But as soon as I load the IDT, Bochs tells me that the GDT is corrupted
<splitty_> So apparently, at some point the array is either moved or overridden
<splitty_> It's really weird.
<RX14> that is weird
bjz has quit [Ping timeout: 258 seconds]
unshadow has joined #crystal-lang
<RX14> well I see you got it working in ASM
bjz has joined #crystal-lang
holyheels has joined #crystal-lang
<splitty_> Yeah I implemented it in asm
<splitty_> I'm pretty good in x86 asm so that isn't really a problem
<splitty_> But I would've wanted it in Crystal, just to show that it can be done
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 260 seconds]
Raimondii is now known as Raimondi
bjz has quit [Ping timeout: 248 seconds]
bjz has joined #crystal-lang
<crystal-gh> [crystal] bararchy opened pull request #3865: API for OpenSSL (master...master) https://git.io/vMBTu
Philpax has joined #crystal-lang
<FromGitter> <bcardiff> @MaxLap yes. basically it won't be correct to allow programers express things *just* for parent class but not on subclasses. So any ocurrence of a parent class can be substitued by a inherit class.
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kostya_ has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Ping timeout: 240 seconds]
Kug3lis has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
soveran has quit [Remote host closed the connection]
<crystal-gh> [crystal] ysbaddaden opened pull request #3866: Fix: Debug::DWARF::LineNumbers on musl-libc (x86) (master...fix-debug-dwarf-line-numbers-musl-x86) https://git.io/vMBz8
<DeBot> https://github.com/crystal-lang/crystal/pull/3866 (Fix: Debug::DWARF::LineNumbers on musl-libc (x86))
Kug3lis has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Kug3lis has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
cyjimmy264 has joined #crystal-lang
unshadow has quit [Ping timeout: 252 seconds]
unshadow has joined #crystal-lang
gloscombe has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] spalladino pushed 2 new commits to master: https://git.io/vMB1p
<crystal-gh> crystal/master 7865abf Santiago Palladino: Merge pull request #3831 from ysbaddaden/enhancement-add-line-numbers-to-all-builds-by-default...
<crystal-gh> crystal/master df3fbb3 Julien Portalier: Always generate line numbers debug information
<DeBot> https://github.com/crystal-lang/crystal/pull/3831 (Always generate line numbers debug information)
kostya_ has quit [Remote host closed the connection]
unshadow has quit [Ping timeout: 252 seconds]
<Yxhuvud> yay
<FromGitter> <sdogruyol> @yxhuvud sup?
unshadow has joined #crystal-lang
<Yxhuvud> well, I'm trying to emit a strange integer format. But the yay was regarding the debug information :)
<FromGitter> <sdogruyol> :D
<FromGitter> <sdogruyol> the debug info is improving day by day thanks to @ysbaddaden
mark_66 has quit [Remote host closed the connection]
<manveru> any idea how to make a Proc in a macro?
<FromGitter> <sdogruyol> @manveru something like this ? https://github.com/kemalcr/kemal/blob/master/src/kemal/dsl.cr#L11
<manveru> yeah, that looks nice
<manveru> guess i can just make a method :)
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
<FromGitter> <sdogruyol> great :)
unshadow has quit [Quit: leaving]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
Kug3lis has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
soveran_ has joined #crystal-lang
soveran has quit [Ping timeout: 248 seconds]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
<travis-ci> crystal-lang/crystal#7865abf (master - Merge pull request #3831 from ysbaddaden/enhancement-add-line-numbers-to-all-builds-by-default): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/190684910
<DeBot> https://github.com/crystal-lang/crystal/pull/3831 (Always generate line numbers debug information)
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran_ has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Raimondi has quit [*.net *.split]
A124 has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
A124 has joined #crystal-lang
bjz has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
<crystal-gh> [crystal] mverzilli closed pull request #3866: Fix: Debug::DWARF::LineNumbers on musl-libc (x86) (master...fix-debug-dwarf-line-numbers-musl-x86) https://git.io/vMBz8
<DeBot> https://github.com/crystal-lang/crystal/pull/3866 (Fix: Debug::DWARF::LineNumbers on musl-libc (x86))
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/vMRLK
<crystal-gh> crystal/master c8481e8 Martin Verzilli: Merge pull request #3866 from crystal-lang/fix-debug-dwarf-line-numbers-musl-x86...
<DeBot> https://github.com/crystal-lang/crystal/pull/3866 (Fix: Debug::DWARF::LineNumbers on musl-libc (x86))
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
bjz has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 256 seconds]
bjz has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#c8481e8 (master - Merge pull request #3866 from crystal-lang/fix-debug-dwarf-line-numbers-musl-x86): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/190736188
<DeBot> https://github.com/crystal-lang/crystal/pull/3866 (Fix: Debug::DWARF::LineNumbers on musl-libc (x86))
holyheels has quit [Read error: Connection reset by peer]
<crystal-gh> [crystal] kostya opened pull request #3868: Spec: expect_raises return exception (master...spec_raise) https://git.io/vMREM
<DeBot> https://github.com/crystal-lang/crystal/pull/3868 (Spec: expect_raises return exception)
havenwood has quit [Quit: mIRC 5.91 (16 bit) for Microsoft © Windows For WorkGroups 3.11®]
havenwood has joined #crystal-lang
havenwood has joined #crystal-lang
havenwood has quit [Changing host]
havenwood has quit [Quit: mIRC 5.91 (16 bit) for Microsoft © Windows For WorkGroups 3.11®]
soveran has quit [Remote host closed the connection]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
havenwood has joined #crystal-lang
havenwood has joined #crystal-lang
havenwood has quit [Changing host]
triangles has joined #crystal-lang
aarongodin has quit [Ping timeout: 240 seconds]
Majost has quit [Ping timeout: 240 seconds]
aemadrid has quit [Ping timeout: 255 seconds]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #crystal-lang
havenwood has quit [Changing host]
havenwood has joined #crystal-lang
Majost has joined #crystal-lang
aarongodin has joined #crystal-lang
aemadrid has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]