<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…]
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> 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] MakeNowJust opened pull request #3877: Fix String#scan behavior same as Ruby (master...fix/string/scan-regex-behavior) https://git.io/vMzcq
<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?
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
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> 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>
<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…]