greengriminal has quit [Quit: This computer has gone to sleep]
<FromGitter>
<parruda> Hello everyone! faastRuby is written 90% in Crystal. I am looking for ppl who would be interested in looking at the code and doing a security review prior to the release in exchange for credits on the repo’s readme. ⏎ The most sensitive part is the runners service, responsible for running untrusted code. We’d have to do this over a hangouts call with all the parties where I could share my screen, walk you
<FromGitter>
... through the design and answer any questions you may have. ⏎ Once the review is over I will open it up to the world!
<FromGitter>
<parruda> I should have said prior to the opensource release
<FromGitter>
<Daniel-Worrall> Is there a way to find dependent repos? I have an underused library and wish to view others code and searching gh isn't pulling anything
<FromGitter>
<Daniel-Worrall> Repos j
<FromGitter>
<Blacksmoke16> like where that shard is in their shard.yml?
<FromGitter>
<Daniel-Worrall> Yeah
<FromGitter>
<Blacksmoke16> could write some script to search github by lang, parse raw shard.yml for each one as yaml, and build it out
<FromGitter>
<Blacksmoke16> but i dont know anyway to do that off the top of my head
<FromGitter>
<Daniel-Worrall> I'm just thinking that rubygems has something similar
<FromGitter>
<Blacksmoke16> Depending on what you need to do might not be necessary
<FromGitter>
<mwlang> automate redundant tasks.
<FromGitter>
<mwlang> I'm messing a round some with the amber framework and it seems I need something like sam / cake to automate deployments. I could use capistrano to deploy crystal projects, but that seems somehow "wrong" even though I've done it for Perl and PHP projects.
<FromGitter>
<Blacksmoke16> Option parser and some methods would probably do the same thing without an extra dependency
<FromGitter>
<Blacksmoke16> Depending on complexity of what you need to do
<FromGitter>
<mwlang> ok, looking at that now.
<FromGitter>
<mwlang> didn't know about it before.
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<Blacksmoke16> 👍
gangstacat has quit [Ping timeout: 250 seconds]
alex``` has quit [Ping timeout: 252 seconds]
alex```8 has joined #crystal-lang
_whitelogger has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter>
<bew> @parruda hi, I'd suggest you to ask in the crystal forum too, to avoid your request to be flooded by the help messages here.. Personally I would be interested, but I'm not sure I qualify for this kind of review..
_ht has quit [Remote host closed the connection]
<FromGitter>
<mavu> Hi, which one is the smallest web framework that is still maintained? (in crystal) ⏎ I just need to display one page with a form that gets send and saved as a config file. ⏎ Does it even make sense to use a framework for this? Or should I just diy it with http-server?
<FromGitter>
<vladfaust> @mavu http-server is enough
ashirase has quit [Ping timeout: 258 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
ashirase has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<mavu> thanks :)
laaron has quit [Remote host closed the connection]
<FromGitter>
<parruda> @bew I am sure you qualify :) ⏎ The most important part is the design of it, that’s why I have to do a walk through. So if you are interested I am sure it will be very helpful to have you look at it
<FromGitter>
<parruda> I will post on the forum though, good idea
<FromGitter>
<bararchy> Is there a default timeout for `HTTP::Client.exec`? (socket timeout)
<FromGitter>
<bararchy> or will it just hang forever
<FromGitter>
<bararchy> I know the Instance variant allows setting read_timeout and connect_time, the class variable won't support it
<FromGitter>
<mwlang> I have two problems I'm trying to solve with websockets. This is the gist: https://gist.github.com/mwlang/57876320390c899be690a5a79eed8125 Overall it works as designed, but when left running for a long time, one or two things happen:
<FromGitter>
<mwlang> 1) the server simply stops sending data to the websocket (but never sends a CLOSE) -- yet, the client still thinks it's connected and waiting for new data to arrive. I think this is an issue specifically with line 30 in the gist
<FromGitter>
<mwlang> 2) A CLOSE is sent, but I apparently never exits the fiber so it never gets restarted in the main loop. It seems that calling "break" to exit the while loop of the listener never leads to main loop of the program checking that the listener is stopped and can thus attempt to restart.
<FromGitter>
<mwlang> I suspect my problems are with how the Listener's while loop is coded, but I am not at all sure how to resolve these two issues "exit" instead of "break" exits the whole program. Fiber.yield after the listener's while loop doesn't seem to have any effect (idea was to pass control back to main loop) either.
laaron has quit [Remote host closed the connection]
<FromGitter>
<Blacksmoke16> where i need an array of values that could be any type, then later do some transformations on some of them to new up a class based on the transformed values?
<FromGitter>
<asterite> @mwlang maybe you need `select`, but it's undocumented... though it works more or less like in Go
<FromGitter>
<Blacksmoke16> @asterite unfortunately no. Might step back and see if there is a different approach that would make things easier
<FromGitter>
<mwlang> @asterite where is "select" in the crystal library? I'll have to read the source to see if it'll do what I need as I'm not familiar with how Go does anything.
<FromGitter>
<asterite> it's not in the library, it's in the language
<FromGitter>
<asterite> but maybe you don't need it
mistergibson has quit [Quit: Leaving]
_ht has joined #crystal-lang
_ht has quit [Quit: Lost terminal]
sz0 has quit [Quit: Connection closed for inactivity]
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
FromGitter has joined #crystal-lang
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
<FromGitter>
<watzon> `select` is the opposite of `reject` isn't it? Look up the Ruby docs. Should be similar.
<FromGitter>
<Blacksmoke16> i think its something diff
<FromGitter>
<Blacksmoke16> like a lang construct
<FromGitter>
<watzon> I'm considering doing some documenting tonight. Specifically in the `Array`, `Iterable`, `Enumerable` area
<FromGitter>
<omidathari> Hi all, ⏎ In the code below we are attempting to open a serial port and spawn a fiber that simply blocks waiting for data from the serial port. ⏎ The (stdin) gets() below the fiber never executes. Can someone help me understand why. ⏎ Thanks ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5cddea8cad024978c6dab0f2]
<FromGitter>
<Blacksmoke16> prob gets caught in infinite loop from the while statement
<FromGitter>
<omidathari> @Blacksmoke16 The puts "tell me your name:" executes ok.
<FromGitter>
<Blacksmoke16> right but the loop happens in a fiber
<FromGitter>
<Blacksmoke16> im not *super* familiar with fibers, but imo when you do `gets.to_s` that causes a blocking IO, which executes the next available fiber, which has a infinite loop so it never switches back to the main fiber to print the name
<FromGitter>
<Blacksmoke16> print `tell me your name`, gets blocks it, so prints the content of my shard.yml, then prints what i type in
<FromGitter>
<asterite> the code looks fine to me and it should execute well. What's not working?
<FromGitter>
<Blacksmoke16> in his example it never prints the name you typed in
<FromGitter>
<asterite> but does he type something in the console?
<FromGitter>
<omidathari> Interesting. The first gets is blocking on the serial port file descriptor and the name gets() is waiting on the stdin file descriptor and that is why I thought they should be completely independent of each other. Don't you think?
<FromGitter>
<Blacksmoke16> its concurrency, only 1 fiber executes at a time
<FromGitter>
<omidathari> Yes we are typing the name in the console @asterite
<FromGitter>
<Blacksmoke16> at first the main fiber is executing, hence why it prints the `tell me your name:`, then the `name = gets.to_s` blocks waiting for user input, so the fiber you defined in your spawn block executes
<FromGitter>
<Blacksmoke16> but i imagine the infinite loop in the fiber never blocks/end so it never goes back to the main fiber to print your name
<FromGitter>
<omidathari> I am under the impression that the whole point of gets is to block a fiber until it becomes ready to run. It should not be a busy wait. Correct?