ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
bmcginty has quit [Ping timeout: 240 seconds]
<FromGitter> <georgeu2000> Wow Gary Bernhardt, long time no hear!
<FromGitter> <georgeu2000> I loved DAS, so many years ago...
bmcginty has joined #crystal-lang
Philpax has joined #crystal-lang
<FromGitter> <ino76> hi :) is there some way to compile crystal from linux to windows?
ephemera_ has quit [Ping timeout: 246 seconds]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
ephemera_ has joined #crystal-lang
ephemera_ has quit [Ping timeout: 248 seconds]
ephemera_ has joined #crystal-lang
snsei has joined #crystal-lang
ephemera_ has quit [Ping timeout: 252 seconds]
snsei has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
snsei has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Client Quit]
<FromGitter> <fridgerator> no
_whitelogger has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
_whitelogger has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
_whitelogger has joined #crystal-lang
snsei has quit [Remote host closed the connection]
claudiuinberlin has joined #crystal-lang
<Groogy> Morning! o/
<FromGitter> <ekremkaraca> Morning guys
snsei has joined #crystal-lang
<Groogy> gonna see if I can get free type to cooperate today
<Groogy> *sigh*
snsei has quit [Ping timeout: 260 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <ekremkaraca> Hey guys, is it possible to access instance variable defined in a class from outside?
rohitpaulk has joined #crystal-lang
<Groogy> only through a method call
<FromGitter> <sdogruyol> Morning everyone
<Groogy> Morning sdogruyol o/
<FromGitter> <sdogruyol> sup @Groogy
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <ekremkaraca> I supposed so but
rohitpaulk has joined #crystal-lang
<FromGitter> <ekremkaraca> When I define a class, then call it and assign its instance to a variable, then I call its instance variable, it returns its value.
<FromGitter> <ekremkaraca> For example, I defined a person class with @age variable inside it
<FromGitter> <ekremkaraca> Then I called person = Person.new
<FromGitter> <ekremkaraca> Then I hit person.@age
<FromGitter> <ekremkaraca> But I got its value instead of an error like Ruby
<FromGitter> <ekremkaraca> Sorry, unlike ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
<Groogy> huh sounds like a bug
<Groogy> that's freaky
rohitpaulk has joined #crystal-lang
bmcginty has quit [Ping timeout: 248 seconds]
bmcginty has joined #crystal-lang
buggs has quit [Read error: Connection reset by peer]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<oprypin> Groogy, nah it's not a bug, it's Tricks They Don't Want You to Know
<Groogy> lol
<oprypin> seriously though it's intentional but likely pending removal
claudiuinberlin has joined #crystal-lang
<Groogy> I mean I don't mind friends as much, at least friends over this kind of public access
<Groogy> (not friends as in C++ style but how D does it with sub classes that have access which will give you indirect access to things you want to keep normally hidden)
<oprypin> yes, Crystal needs friends........
<oprypin> the closest thing is https://crystal-lang.org/docs/syntax_and_semantics/visibility.html#protected-methods but otherwise severely lacking
Philpax has joined #crystal-lang
<Groogy> Yeah would be cool if Crystal could have something akin to packages
<Groogy> as in D
<Groogy> though maybe more you declare a package and classes can claim to belong to it and it is another scope of visibility
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 252 seconds]
<vegai> does it make sense to just cast Ints from C bindings to Int64 instead of doing the awkwardish LibC::Int?
<vegai> at least when resources aren't an issue
<FromGitter> <ziprandom> @krypton97 yeah. when I use the lib in my own crystal script it works, just the curl snippet didn't do anything although it compiles without error
<Groogy> how do I define a default value using a block with hashes?
<Groogy> been trying but keeps getting key error
<Groogy> @pages = Hash(UInt64, Page).new { Page.new @face, @gfx }; @pages.fetch(12u32)
<Groogy> gives me key error :/
<Groogy> oh wait I am dumb nvm
ShalokShalom_ has quit [Ping timeout: 252 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 264 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <krypton97> Any workaround for binding :: on a useless key on vscode?
<Groogy> aaaaalmost there....
<Groogy> something maps wrong when it tries to read the pixels
<FromGitter> <ansarizafar> How can we check that body exists and not nil ⏎ ⏎ ``` context.request.body``` [https://gitter.im/crystal-lang/crystal?at=59c670e2bc46472974697e5b]
Philpax has quit [Ping timeout: 248 seconds]
<Groogy> GAH WHY IS IT READING THE PIXELS WRONG ;_;
<Groogy> (ノ `Д´)ノ ~┻━┻
<FromGitter> <ziprandom> hey what is the best tool to profile a crystal application on linux?
<Groogy> you could use the Benchmark module in crystal
<FromGitter> <ziprandom> yeah but thats cumbersome. I want something to show me in which methods it spends the most time without having to wrap everything in benchmarks
<Groogy> gprof maybe?
<Groogy> I mean it is a binary like any other so anything that works on C++/C should work here as well
<Groogy> not 100% sure though
<FromGitter> <ziprandom> thxx Groogy, trying with oprof now, let's see
<crystal-gh> [crystal] asterite opened pull request #5024: [WIP] Int128 and UInt128 (master...feature/128-bit-integers) https://git.io/vdUGm
rohitpaulk has joined #crystal-lang
A124 has quit [Quit: '']
sz0 has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #5025: Compiler: use return type of method with Primitive if available (master...refactor/simplify-primitivs) https://git.io/vdUct
rohitpaulk has quit [Ping timeout: 246 seconds]
<Groogy> When I print it manually to the console, letter looks just fine
<Groogy> when I print it to screen it gets distorted :/
<oprypin> vegai, it's a very good idea to never expose the C types in your public API. for the case of `LibC::Int` in particular, what I like to do is use Int in lib bindings and then, without casting, specifying the return type Int32
pabs has quit [Ping timeout: 255 seconds]
pabs has joined #crystal-lang
<Groogy> YES I SOLVED IT ;_;
<Groogy> I can load a font into texture memory
<Groogy> now just need to clean things up and implement a way to efficently render text
<FromGitter> <bararchy> Cool Groogy !
<Groogy> been smashing my head into it for weeks it feels like
<oprypin> why tho
<oprypin> i could appreciate that if it was something done for the first time
<Groogy> because I had forgotten to set the unpack alignment of pixels when uploading the pixels to the texture
<Groogy> i.e sincei t was 8bit bitmap it was not divisable by four
<Groogy> and it would sometimes screw everything up depending on size of bitmap
<Groogy> now my texture sets the unpack alignment correctly before uploading the pixels
<Groogy> most embarrising part is that it is even under "common mistakes" on khronos wikipedia
<Groogy> the result! https://imgur.com/a/jglzo
<FromGitter> <bararchy> Groogy , super cool ! most of the times, it's the little things that screw things up XD
weston1 has joined #crystal-lang
<FromGitter> <aaronbronow> is there a document that explains how to build and run the docker image for development?
<FromGitter> <aaronbronow> i've pulled it but i don't know how to actually run it
ShalokShalom_ has joined #crystal-lang
rohitpaulk has joined #crystal-lang
weston1 has quit [Ping timeout: 248 seconds]
<FromGitter> <samueleaton> @aaronbronow so you need a dockerfile in your application and then you just need to build your app image and run it. The thing is that you would need to remove and re-build your image on every change so you can use sentry.cr in your dockerfile so it watches and recompiles on any change without the docker container needing to restart. ⏎ ⏎ here is an example dockerfile and command to build your app:
<FromGitter> <samueleaton> But in dev you can also use docker-compose and a docker-compose.yml which is another level of abstraction on top of your dockerfile
<FromGitter> <samueleaton> To clarify, you don't run the crystal image directly, but instead you base your app's dockerfile on the crystal image.
ShalokShalom_ is now known as ShalokShalom
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
ylluminate has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
A124 has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
snsei has joined #crystal-lang
<FromGitter> <Fanna1119> has anyone ever ran into an error similar to this ⏎ "this version of PCRE is compiled without UTF support at 0 (ArgumentError)" ?
<oprypin> Fanna1119, yeah probably
<FromGitter> <bew> Groogy congrat!
snsei has quit [Remote host closed the connection]
weston1 has joined #crystal-lang
<FromGitter> <Fanna1119> took me a while to figure it out. had to find my PCRE version , using pcretest -C , find the package and ./configure --enable-utf8 --enable-unicode-properties, and then make the package, :D well with every hiccup you learn something new i guess haha
snsei has joined #crystal-lang
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
rohitpaulk has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 252 seconds]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <akzhan> @Fanna1119 see https://github.com/crystal-lang/crystal/pull/4712 for example
weston1 has quit [Ping timeout: 260 seconds]
<Groogy> Thanks @bew!