Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven is now known as Guest75330
Guest75330 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark_66 has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Client Quit]
bjz has joined #crystal-lang
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
<FromGitter>
<pawandubey> So I am very excited about Crystal as a 5 minute translation of my Ruby gem to a Shard resulted in a 20X performance boost. But I am still not sure about the idioms of how shards are supposed to be distributed. I know the shard.yml workflow but do we just distribute the source? What if I have a crystal binary that I want to link to in my app, how do I go about doing that?
sz0 has quit [Quit: Connection closed for inactivity]
<crystal-gh>
[crystal] akzhan opened pull request #4422: Add .editorconfig template on crystal init command. (master...add-editorconfig-on-crystal-init) https://git.io/v9xkS
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
zipR4ND has joined #crystal-lang
Kug3lis has joined #crystal-lang
<FromGitter>
<andreaTP> crystal compile everything from sources, you produce a binary only if it is a "end user" application
<FromGitter>
<andreaTP> otherwise for libraries you provide your sources
zipR4ND has quit [Ping timeout: 272 seconds]
bjz has quit [Ping timeout: 246 seconds]
bjz has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<KCreate> @pawandubey You could try emitting a crystal binary as an object file and trying to link that.
<FromGitter>
<KCreate> But I never tried that so I don't know if it works
Kug3lis has joined #crystal-lang
<FromGitter>
<schoening> Wow... srsly f**k Windows. It has been updating for so long im not getting any work done. On the bright side i had plenty of time in the massage chair today
<FromGitter>
<aolko> :/
livcd has quit [Changing host]
livcd has joined #crystal-lang
<FromGitter>
<schoening> After it updated it showed the login screen. Waiting for me to click a button so it could say "Hi" and keep updating haha.. ⏎ Linux is so much better in so many ways it's not even funny xD Oh well /rant
<FromGitter>
<bew> @KCreate compiling object files from crystal source, then linking to a project works (ysbaddaden did an experiment here: https://github.com/ysbaddaden/crystal_library)
<FromGitter>
<KCreate> @schoening Are you also a member of the ForcedToWorkWithWindows club?
<FromGitter>
<schoening> I am. I'm the newly hired front end guy in a crowd of c# devs :smile:
<FromGitter>
<bew> front end? and you're forced on windows for this, or is it personal choice?
<FromGitter>
<schoening> Forced. My stack for hobby stuff is Gulp, browserify etc. But I am forced to switch to Visual Studio and windows.. It has some niceties but holy cow I also feel slow at times.
<FromGitter>
<schoening> The guys I am working with are awesome tho. I enjoy this place a lot
<FromGitter>
<aolko> > ut I am forced to switch to Visual Studio ⏎ ⏎ ouch
<FromGitter>
<schoening> The debugging tools of visual studio are pretty damn nice..
<FromGitter>
<schoening> But I have been using sublime for so long.. its hard to get used to this
<FromGitter>
<aolko> i prefer jetbrains' products
<FromGitter>
<aolko> and sublime is just yet another notepad++ replacement
<FromGitter>
<schoening> There, there. Let's not get too carried away with that religious debate :p
<FromGitter>
<aolko> it's actually kinda true
<FromGitter>
<schoening> If we can get crystal to 1.0 with windows support perhaps I can convince the boss to rewrite something small in it :D would be sweet
<FromGitter>
<aolko> that should've been :top:
bjz_ has joined #crystal-lang
<RX14>
that reminds me to attempt to get the compiler to produce empty windows executables
<crystal-gh>
[crystal] akzhan opened pull request #4424: Fixes #4361 wrong error message: unexpected token: end (master...fix-4361-unexpected-token-end-expecting-when-else-or-end) https://git.io/v9x0W
<FromGitter>
<aolko> still lisp
<FromGitter>
<l3kn> The way different types are encoded should be applicable to all kinds of languages, I think lisp is popular for these kinds of introductions because parsing it is so easy
<crystal-gh>
[crystal] akzhan closed pull request #4420: More documentation for Exception class. (master...doc-Exception-class-more) https://git.io/v9AG6
sz0 has joined #crystal-lang
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…]
vasilakisfil has joined #crystal-lang
<vasilakisfil>
hey people is there anything in Crystal like Rack in Ruby ? (or Plug in Elixir)
<FromGitter>
<Sija> i don’t think so, though I’d like to take a stab at it
<FromGitter>
<straight-shoota> Crystal has HTTP::Server and HTTP::Handler wich is a different concept, but the handlers are somewhat similar to Rack middleware.
<crystal-gh>
[crystal] akzhan reopened pull request #4420: More documentation for Exception class. (master...doc-Exception-class-more) https://git.io/v9AG6
<vasilakisfil>
ok
mark_66 has quit [Remote host closed the connection]
vasilakisfil has quit [Quit: Konversation terminated!]
unshadow has joined #crystal-lang
sagax has joined #crystal-lang
unshadow has quit [Quit: leaving]
pwned has joined #crystal-lang
<pwned>
hi I'm a ruby apostate
<FromGitter>
<bew> Hi we're crystal apostate :)
<FromGitter>
<bew> oops mis-understood the word I think...
<pwned>
it means I renounced ruby and have to be punsished with various exotic languages
<FromGitter>
<bew> @pwned why?
<pwned>
it's slow
<pwned>
I coded ruby for 6 years
<pwned>
it's gotten pretty good though.
<pwned>
I wanted to wrap an iterator returned from @iter = File.each_line so I can do def next; line = @iter.next; # do stuff with line, but crystal says IO::LineIterator is private so I'm stuck
<pwned>
I'm back to noob 101
<crystal-gh>
[crystal] mverzilli pushed 1 new commit to master: https://git.io/v9pTW
<FromGitter>
<johnjansen> `Iterator::Stop` has a meaning, personally, id interpret that meaning and handle it accordingly. implicitly ignoring it seems to miss the point
<RX14>
pwned, you have to detect if the result is an Iterator::Stop and if it is handle that case
<RX14>
it'll be Iterator::Stop when the iterator has finished
<FromGitter>
<johnjansen> ;-) @RX14
<RX14>
pwned, what exactly are you trying to do? Could it be done with Iterator#map?
TheLemonMan has joined #crystal-lang
<pwned>
RX14: I'm trying to read from a csv and use it in a transaction, so I need to read it part by part (like 1000 line at a time) using each_slice(1000) otherwise I run out of memory
<RX14>
it can output cobertura XMLs and pretty much everything
<FromGitter>
<fridgerator> thats crazy
<FromGitter>
<fridgerator> and awesome
<RX14>
there's lots of code not highligted at all
<FromGitter>
<johnjansen> yeah … cant believe you didn’t test that `size == 0` ;-)
<RX14>
which I assume is code that's not compiled in
<FromGitter>
<fridgerator> lol
<FromGitter>
<johnjansen> ;-)
<FromGitter>
<ltran> im using spawn and inside that make a webreq and then print some value, ⏎ the `puts` are getting mingled up and repeats. =) anyone have ideas around this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=591cb48700efc2bb3e7a2271]
<Papierkorb>
ltran, please post code.
<FromGitter>
<ltran> sure. 1 sec
<FromGitter>
<drujensen> @RX14 That is one heck of a find. `crystal coverage`
<RX14>
well we don't need a crystal coverage now
<RX14>
we can just point people to kcov
<RX14>
"that works out of the box"
<FromGitter>
<drujensen> right.
<FromGitter>
<johnjansen> @RX14 have you time to put together a quick “how to”
<FromGitter>
<johnjansen> this will help when someone asks, rather than us bumbling around looking …
<FromGitter>
<drujensen> @sdogruyol When you do the weekly mailer, maybe link to `kcov`?
<FromGitter>
<l3kn> mon
<RX14>
1) install kcov 2) compile your spec suite using `crystal build spec/foo_spec.cr` 3) kcov out-dir --verify ./foo_spec
<FromGitter>
<ltran> @johnjansen hey thanks for looking into it, i recorded my output and can be replayed at http://showterm.io/8c11c66ae13f108c7fe25 if you scroll the bottom bar to roughly the middle you can see the prints getting put onto the same line.
<FromGitter>
<g33kidd> I forgot about this site, thanks!
<FromGitter>
<johnjansen> @ltran i have seen something like that before, wouldnt want to speculate about why, i would try creating a fiber to do all the puts and use a channel to communicate with it … just see if that helps understand the problem
<FromGitter>
<ltran> @johnjansen ah okay, ya that was my next approach, making sure i wasnt missing somethingn obvious or something ;D
<FromGitter>
<johnjansen> like i say, i personally wouldnt speculate why. although im guessing that puts is not acting atomically (which would be blocking i assume)
bjz has joined #crystal-lang
<oprypin>
i think it would be a pretty cool feature to make `puts` calls block stdout
<FromGitter>
<bew> @oprypin block stdout? like mutex locks?
<FromGitter>
<straight-shoota> Maybe use `print` instead of `puts`? This would eliminate the check if the string ends with `'\n' `... Maybe that might reduce the risk of concurrency issues.
<FromGitter>
<bew> using print over puts won't resolve it, the `\n` check does not block the current fiber, and doesn't have concurrency issues
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]