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
gewo has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] asterite pushed 9 new commits to master: https://git.io/vMucH
<crystal-gh> crystal/master 19c72dd Sijawusz Pur Rahnama: Mark String#gen_to_ macro as private
<crystal-gh> crystal/master 2b9b5b2 Sijawusz Pur Rahnama: Mark Time#def_at macro as private
<crystal-gh> crystal/master 160d7a9 Sijawusz Pur Rahnama: Remove outdated TODOS
gewo has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#591f8ef (master - Removed deprecated methods from `Char`): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/191161327
ome has joined #crystal-lang
<bmcginty_> Is anyone else here having issues building latest crystal? `in src/debug/dwarf/line_numbers.cr:264: private macros can only be declared at the top-level`
<bmcginty_> Never mind me. outdated version.
greengriminal has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 255 seconds]
onionhammer has quit [Read error: Connection reset by peer]
onionhammer has joined #crystal-lang
soveran has joined #crystal-lang
matp_ has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
matp has quit [Ping timeout: 258 seconds]
matp_ has quit [Remote host closed the connection]
matp has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
ome has quit [Quit: Connection closed for inactivity]
greengriminal has quit [Quit: Leaving]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
mooe has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has quit [Ping timeout: 258 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: No route to host]
pawnbox has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 255 seconds]
pawnbox has joined #crystal-lang
bjz has joined #crystal-lang
mark_66 has joined #crystal-lang
<FromGitter> <david50407> why superclass of `Reference` is `Class` not `Object` when I run this https://play.crystal-lang.org/#/r/1k4s
A124 has quit [Ping timeout: 245 seconds]
<FromGitter> <david50407> but if i modify the macro spec of compiler and run the code below, it give me `Object`: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58773fad11e7a7f61d86fd36]
pawnbox has quit [Read error: No route to host]
pawnbox has joined #crystal-lang
gloscombe has joined #crystal-lang
Kug3lis has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dostoyevsky has quit [Ping timeout: 240 seconds]
mooe has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Remote host closed the connection]
bjz has joined #crystal-lang
dostoyevsky has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 252 seconds]
Raimondii is now known as Raimondi
pawnbox has joined #crystal-lang
Yxhuvud has quit [Read error: Connection reset by peer]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
<FromGitter> <jots_twitter> UDPSocket does not have "sendto"? I see a "connect" but no sendto. would like to have a single UDPSocket that sends messages to many hosts. Can UDPSockets connect without a message?
<Papierkorb> jots_twitter, that's missing atm, yes. But #connect doesn't send a message, it uses connect(3) to bind the udp socket to a host/port
<Papierkorb> same goes for recv
<FromGitter> <asterite> @jots_twitter Papierkorb It's not missing, it's just `send` and `receive`
<Papierkorb> Since when is it there? Longer than 3 months?
<FromGitter> <jots_twitter> send doesn't let you specify destination ip and port though. that's the part I'd like.
<FromGitter> <asterite> It was in 0.19.3: https://crystal-lang.org/api/0.19.3/UDPSocket.html#send%28message%3AString%2Caddr%3AIPAddress%29-instance-method
<FromGitter> <asterite> @jots_twitter it's defined in Socket
<FromGitter> <asterite> @jots_twitter
<FromGitter> <asterite> https://crystal-lang.org/api/0.20.4/Socket.html#send%28message%2Ctoaddr%3AAddress%29-instance-method
<Papierkorb> I wish the docs would print out the inherited methods in full too
<FromGitter> <jots_twitter> ah great! thanks guys!
<FromGitter> <asterite> Instance methods inherited from class Socket: send, and hovering over it shows the overload
<Papierkorb> Yes, hovering over it
<Papierkorb> but that doesn't cut it
<Papierkorb> e.g., Ctrl+F won't find it
<FromGitter> <asterite> In any case, the docs could use an improvement. But I think in the end it's just about eventually having that as an answer in stackoverflow :-P
<Papierkorb> To me, having to search SO for a stdlib feature is a bug
<FromGitter> <asterite> But how would you search it?
<FromGitter> <asterite> I mean, you want to send, I'd search "send"
<Papierkorb> Ctrl+F on the UDPSocket docs page
<FromGitter> <asterite> Doing that you get the method, plus the inherited methods
<Papierkorb> Yes, and then hit F3 until you find something useful. Having to reach for my mouse is inconvenient if a single key press should do the same
<FromGitter> <asterite> PRs are welcome :-)
<FromGitter> <jots_twitter> What threw me off is "IPAddress" I did not think it included port.
Yxhuvud has joined #crystal-lang
soveran has quit [Remote host closed the connection]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
<FromGitter> <crisward> Does anyone have tips for profiling / finding slow parts of a crystal app ?
<FromGitter> <sdogruyol> @crisward if you are on OS X use Instruments
<FromGitter> <sdogruyol> it works great
<Yxhuvud> crisward: You can use the tools included in valgrind like callgrind/cachegrind etc.
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<crystal-gh> [crystal] spalladino pushed 2 new commits to master: https://git.io/vMzIc
<crystal-gh> crystal/master a619476 Santiago Palladino: Merge pull request #3870 from MakeNowJust/fix/char-reader...
<crystal-gh> crystal/master 2e3571a TSUYUSATO Kitsune: Disallow 3-byte UTF-8 surrogate pair
<DeBot> https://github.com/crystal-lang/crystal/pull/3870 (Disallow 3-byte UTF-8 surrogate pair)
pawnbox has quit [Remote host closed the connection]
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 240 seconds]
matp has quit [Quit: ZZzzzZz...]
<travis-ci> crystal-lang/crystal#a619476 (master - Merge pull request #3870 from MakeNowJust/fix/char-reader): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/191278584
<DeBot> https://github.com/crystal-lang/crystal/pull/3870 (Disallow 3-byte UTF-8 surrogate pair)
A124 has joined #crystal-lang
Philpax_ is now known as Philpax
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] david50407 opened pull request #3875: Macro ancestors (master...macro_ancestors) https://git.io/vMz3d
Kug3lis has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] MakeNowJust opened pull request #3876: Implement Rabin-Karp algorithm for String#rindex (master...feature/string/rindex-rabin-karp) https://git.io/vMznf
<DeBot> https://github.com/crystal-lang/crystal/pull/3876 (Implement Rabin-Karp algorithm for String#rindex)
<crystal-gh> [crystal] MakeNowJust opened pull request #3877: Fix String#scan behavior same as Ruby (master...fix/string/scan-regex-behavior) https://git.io/vMzcq
<DeBot> https://github.com/crystal-lang/crystal/pull/3877 (Fix String#scan behavior same as Ruby)
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vMz4P
<crystal-gh> crystal/master 6b1917c Ary Borenszweig: Fixed Object's metaclass. Fixes #3874
<DeBot> https://github.com/crystal-lang/crystal/issues/3874 (Broken meta-model above Reference (Why "Object == Class" answers true) (Original: [Metamodel] Superclass of Reference is mismatched))
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
<FromGitter> <MaxLap> I'm trying to build the compiler, without any changes, and I get ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=587794ed11e7a7f61d88d3bb]
<FromGitter> <MaxLap> On ubuntu 16.04, pretty much a clean install. this is after the build, when it starts the specs
<FromGitter> <MaxLap> Any idea?
<FromGitter> <alex-lairan> Hey all ! :) How I can search into an hash safely? What I mean is to don't raise an exception when the key don't exist :)
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vMzE3
<crystal-gh> crystal/master 26402dd Leon: Fix typo: "uknown" -> "unknown" (#3854)
<DeBot> https://github.com/crystal-lang/crystal/pull/3854 (Fix typo: "uknown" -> "unknown")
<FromGitter> <MaxLap> `my_hash[key]?` i believe
<FromGitter> <alex-lairan> Oh i've never see this syntax :)
<FromGitter> <alex-lairan> Thanks it works
<FromGitter> <david50407> yes, `[]?` is the nil-returning version of `[]`
<FromGitter> <david50407> @MaxLap How many memory does your Ubuntu have?
<FromGitter> <MaxLap> 4GB + 2GB swap
<FromGitter> <MaxLap> what's odd is, if i run `./bin/crystal build -o .build/all_spec spec/all_spec.cr` after all of that, it will work. But when i do `make clean crystal spec`, it fails like that. (tried twice)
<FromGitter> <MaxLap> well, "work", i have no output
<FromGitter> <david50407> `crystal build` will only create the executable output, try `.build/all_spec` ?
<FromGitter> <MaxLap> The third time i ran `./bin/crystal build -o .build/all_spec spec/all_spec.cr`, it failed with the same cannot allocate (at a different place). ⏎ I'm running .build/all_spec right now (i guess from one of the times where the compile didn't fail), it seems to be going well. RAM hasn't exceeded 1GB used yet.
<FromGitter> <MaxLap> Alright, well bin/all_spec.cr worked. Got a few pending, i assume this is expected
<Papierkorb> Is there a stable implementation of a lexer and parser generator for Crystal?
<Papierkorb> Ah I'll give racc a test-drive
<travis-ci> crystal-lang/crystal#6b1917c (master - Fixed Object's metaclass. Fixes #3874): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/191317787
<DeBot> https://github.com/crystal-lang/crystal/issues/3874 (Broken meta-model above Reference (Why "Object == Class" answers true) (Original: [Metamodel] Superclass of Reference is mismatched))
pawnbox_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
soveran has quit [Remote host closed the connection]
<FromGitter> <raydf> Is there a way to use a proxy server with http::client?
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<FromGitter> <raydf> Hi everyone :)
matp has joined #crystal-lang
mark_66 has quit [Quit: Leaving.]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#26402dd (master - Fix typo: "uknown" -> "unknown" (#3854)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/191324509
<DeBot> https://github.com/crystal-lang/crystal/pull/3854 (Fix typo: "uknown" -> "unknown")
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
<FromGitter> <MaxLap> Is there something to reduce the needed ram of `./bin/crystal build -o .build/all_spec spec/all_spec.cr`? Like doing release or something maybe? Because at ~5.5GB of memory needed I can barely compile it.
foca has quit [Ping timeout: 258 seconds]
<FromGitter> <bcardiff> You could split the specs compiler vs stdlib for example.
foca has joined #crystal-lang
<Yxhuvud> do we know why it is taking up so much memory?
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<FromGitter> <david50407> Is there any way or possible to show the progress when building codes (like showing the status of "collected n files...", "expending macros...", etc.)?
<FromGitter> <Exilor> --stats ?
<FromGitter> <david50407> @Exilor wow, thanks. never noticed that
<FromGitter> <Exilor> there are more commands here https://crystal-lang.org/docs/using_the_compiler/
pduncan has quit [Read error: Connection reset by peer]
<FromGitter> <MaxLap> The crazy growth is in Codegen (bc+obj), but it gets cut before it ends i guess, so it's back at 1.5GB displayed
<FromGitter> <david50407> could we release some memory after Codegen(crystal)
<FromGitter> <MaxLap> Got the fork: couldn't allocate memory right after `Codegen (crystal): 00:00:31.4260048 (1938.68MB)`. I didn't even get to see the next Codegen line. It's as if at the start of the next one (bc+obj), a massive chunk of ram is reserverved.
<FromGitter> <david50407> I only get `Codegen (crystal): 00:00:23.2965020 (1546.96MB)` on master
<RX14> yeah it's nowhere near 5gb for me
<FromGitter> <MaxLap> stats don't show it, thats the thing
<FromGitter> <david50407> It shows on my computer (I mean the bc+obj one
<FromGitter> <MaxLap> Here are 2 runs, but if you do a free -m, you'll see it increase in usage during bc+obj
<FromGitter> <MaxLap> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5877be1dcbcb2817705f5d04]
<RX14> I see 3gb of ram
<FromGitter> <MaxLap> It's interesting to note the difference in MB at Codegen(crystal). Maybe GC didn't run, making a big diff?
<RX14> thats all
<RX14> the bc+obj phase is in llvm i think
<RX14> so nothing we can do
<RX14> yup
<FromGitter> <MaxLap> I'm running on a clean Ubuntu 16.04 64bit install VM. Anyways alright, i'm just flagging a possible issue someone with more experience could look into
<RX14> what llvm version?
<FromGitter> <MaxLap> 1) 8
<RX14> 1.8?
<RX14> no...
<RX14> "fork: cannot allocate memory" doesn't make sense on ubuntu
<RX14> fork should be CoW
<RX14> it imples you're already out of memory by the time you get to fork
<RX14> and that memory definitely should be counted
<FromGitter> <maiha_twitter> It would need `sysctl vm.overcommit_memory=1` to enable overcommit. I don't know default value in ubuntu :smile:
<FromGitter> <MaxLap> seems to be 0
<FromGitter> <david50407> 1) 82 MB at last
<FromGitter> <david50407> btw, I run with `bin/crystal spec --stats`, I don't know if this is all specs
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Client Quit]
gloscombe has quit [Remote host closed the connection]
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
<FromGitter> <asterite> Note that the memory there is memory allocated by the GC. Memory that LLVM needs is not shown there, so it could definitely be reaching 3~4 GB
matp_ has joined #crystal-lang
matp has quit [Ping timeout: 240 seconds]
matp_ has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
jhass has quit [Ping timeout: 255 seconds]
asterite has quit [Ping timeout: 240 seconds]
asterite has joined #crystal-lang
jhass has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
Ven has joined #crystal-lang
<FromGitter> <crisward> @spalladino @sdogruyol Thanks for the perf tips.
Ven has quit [Ping timeout: 248 seconds]
<FromGitter> <crisward> While I'm throwing questions out there... In Mocha testing in node, you can use `describe.only` and `it.only` to perform just one suite, or one single test. Anything similar in crystal spec?
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RX14> you can pass the line of the text you want to run
<RX14> test*
<RX14> crystal spec spec/foo_spec.cr:45
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 256 seconds]
bjz has joined #crystal-lang
Ven has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ven has quit [Ping timeout: 255 seconds]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
mccoovy has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
mccoovy has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] ysbaddaden opened pull request #3880: Optimize Crypto::Bcrypt performance (master...enhancement-bcrypt-performance) https://git.io/vMgXS
<DeBot> https://github.com/crystal-lang/crystal/pull/3880 (Optimize Crypto::Bcrypt performance)
Ven has quit [Ping timeout: 240 seconds]
olbat has quit [Ping timeout: 246 seconds]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 252 seconds]
olbat has joined #crystal-lang
olbat has joined #crystal-lang
olbat has quit [Changing host]