jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.9.1 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 264 seconds]
fowlduck_ has quit [Read error: Connection reset by peer]
fowlduck has joined #crystal-lang
guilleiguaran__ has quit [Read error: Connection reset by peer]
iamstef has quit [Read error: Connection reset by peer]
victor_lowther has quit [Read error: Connection reset by peer]
manveru has quit [Write error: Connection reset by peer]
n1ftyn8_ has quit [Read error: Connection reset by peer]
bjmllr has quit [Read error: Connection reset by peer]
avdi has quit [Write error: Connection reset by peer]
bjmllr has joined #crystal-lang
CompanionCube has quit [Ping timeout: 246 seconds]
jhass has quit [Ping timeout: 246 seconds]
qard__ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jokke has quit [Ping timeout: 246 seconds]
victor_lowther has joined #crystal-lang
jokke has joined #crystal-lang
manveru has joined #crystal-lang
avdi has joined #crystal-lang
CompanionCube has joined #crystal-lang
CompanionCube has quit [Changing host]
CompanionCube has joined #crystal-lang
n1ftyn8_ has joined #crystal-lang
jhass has joined #crystal-lang
guilleiguaran__ has joined #crystal-lang
iamstef has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 265 seconds]
qard__ has joined #crystal-lang
qard__ has quit [Client Quit]
Ven has joined #crystal-lang
A124 has quit [Read error: Connection reset by peer]
Ven has quit [Ping timeout: 250 seconds]
leafybasil has quit [Remote host closed the connection]
A124 has joined #crystal-lang
Ven has joined #crystal-lang
NeverDie is now known as slim_shady
slim_shady is now known as NeverDie
Ven has quit [Ping timeout: 265 seconds]
NeverDie has left #crystal-lang ["http://radiux.io/"]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 246 seconds]
blue_deref has quit [Quit: bbn]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 264 seconds]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Davy_CC_ has joined #crystal-lang
aemadrid has quit [Ping timeout: 448 seconds]
Davy_CC has quit [Write error: Broken pipe]
aemadrid has joined #crystal-lang
A124 has quit [Read error: No route to host]
ponga has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 272 seconds]
ssvb has quit [Ping timeout: 250 seconds]
Ven has joined #crystal-lang
leafybasil has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
leafybasil has quit [Ping timeout: 240 seconds]
trapped has joined #crystal-lang
Bofu2U has quit [Quit: Textual IRC Client: www.textualapp.com]
<ytti> is there some popularity page of crystal packages
<ytti> like what is canonical way do a web server
<ytti> just native net/http? or something more advanced? sinatra like
<ytti> i recall blog post about crystal concurrency but can't find it now
<ytti> is there anything timely, or is everything related to it already changed since
<Davy_CC_> ytti: https://github.com/manastech/frank try this?
<ytti> Davy_CC_, looks unmaintained
<ytti> Davy_CC_, i'm happy to use 'raw' net/http, if that is canonical solution for now
<ytti> Davy_CC_, what about oncurrency?
<BlaXpirit> ytti, seen http://crystalshards.herokuapp.com/ ?
<ytti> BlaXpirit, no, thanks
<ytti> BlaXpirit, kemal looks about what i want, thanks
<BlaXpirit> geez, these web frameworks blow up in popularity like crazy
<BlaXpirit> each new one surpasses the previous one in stars
Bofu2U has joined #crystal-lang
<BlaXpirit> Davy_CC_, looks like frank is superceded by kemal
<BlaXpirit> is basically a fork
Bofu2U has quit [Quit: Textual IRC Client: www.textualapp.com]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 255 seconds]
leafybasil has joined #crystal-lang
ismaelga has joined #crystal-lang
Ven has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
<ytti> sorry to pester
leafybasil has quit [Read error: Connection reset by peer]
<ytti> anyone remember blog article or such about the concurrency? or documents?
leafybasil has joined #crystal-lang
<ytti> there is no 'GIL' right, as there is no I
<ytti> but what is the idiomatic way in crystal to achieve concurrency?
Ven has quit [Ping timeout: 264 seconds]
ismaelga has quit [Read error: Connection reset by peer]
ismaelga has joined #crystal-lang
<jhass> ytti: atm, spawn & channels
<ytti> jhass, is there document on their use?
<jhass> not sure, probably not
<ytti> jhass, maybe i'm dreaming, but i recall article even about them, and in the article i recall they mentioend golang and how same ideology is shared 'share memory by communicating'
<jhass> well, I don't :P
<jhass> which of course doesn't mean there's none
<jhass> ytti: what do you want to parallelize (well, concurentize? for now)
<jhass> ?
<ytti> jhass, i want share state between webserver and thread/process/method/function which runs periodically
<jhass> how exact does the periodic invocation need to be?
A124 has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
<jhass> like do you need it to happen exactly at 00:00:00, 00:00:05, 00:00:10, ... for a five second interval or is some slop okay?
ismaelga has joined #crystal-lang
<jhass> and is some drifting okay?
ismaelga has quit [Remote host closed the connection]
<ytti> jhass, there will be GET/POST to web server, and these will have seconds to future, after which something must trigger
<ytti> jhass, i don't want to the webserver thread itself to do much anything else than to take the requests in and store the state
<ytti> jhass, i want another thread to process the thread, trigger actions etc
buggs has joined #crystal-lang
<jhass> ytti: best just spawn a coroutine for each and sleep for the timeout
<jhass> or delay I should say rather
<jhass> coroutine's are quite cheap, having a few thousands is of no issue
<jhass> in fact http/server already does spawn one for each request incoming for example
<ytti> jhass, thanks, i'm just misgign the article :) pretty sure it exists, i can't have dreamd so specifically
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 255 seconds]
n1ftyn8_ has quit [Ping timeout: 240 seconds]
danzilio has quit [Ping timeout: 240 seconds]
avdi has quit [Ping timeout: 240 seconds]
n1ftyn8_ has joined #crystal-lang
avdi has joined #crystal-lang
danzilio has joined #crystal-lang
<BlaXpirit> is this still the best info available on fibers?
ljfa has joined #crystal-lang
ljfa has quit [Client Quit]
mlitwiniuk has joined #crystal-lang
<ytti> jhass, i'm finding difficult getting any results for 'spawn'
<jhass> ytti: not sure I follow
<ytti> jhass, no docs
<ytti> is what i was thinking
<ytti> wasn't dreaming
<ytti> but that seems like that is best document about spawn :)
<ytti> i can't find it in docs or api
<jhass> ytti: yeah, there are no docs written yet for it, mostly because we don't consider the API stable yet
ismaelga has joined #crystal-lang
blue_deref has joined #crystal-lang
<ytti> is there plan to integrate the CLI tools 'crystal' and 'shards'
<ytti> imho, it's not too late
<ytti> why have multiple CLI, why not make shards integral part of it
<ytti> also, i'd really love golang style opinionated formatting
<ytti> (i know docs page has a start, but enforcing it by standard tooling is neat)
<ytti> i'm not sure why i need to say
<ytti> crystal build --release src/software.cr
<ytti> shouldn't that be by convention?
<ytti> i'm in directory 'software' shard.yml ays name is is software
<ytti> why wouldn't 'crystla build' be sufficient
<ytti> i wish idiomati crystal would omit parenthesis
<ytti> but it seems that ship has sailed
<jhass> ytti: yes, shards will eventually be merged into crystal, crystal deps already delegates to it. For now keeping them separate allows for faster iteration on both though
<jhass> ytti: there's crystal tool format now
<ytti> w
<ytti> cool
<jhass> ytti: release is quite a bit slower to compile, and unoptimized binaries aren't slow at all. You do development builds far more often than release builds, so it's the saner default
<jhass> ytti: there are a couple of issues open on the crystal and shards repos regarding a sane default target for crystal run and crystal build
<jhass> and yes, I too wish parenthesis less would be favored
<jhass> by they felt that def foo : Bar and def foo baz : Bar is to ambiguous to the reader
<jhass> it's one of the reasons I probably won't use the format tool on my own projects though
<jhass> er, *but they
Sadin has joined #crystal-lang
<ytti> i wonder if it was good decision to us YML instead of just crystal DSL in shard.yml
<ytti> there is no reason to support non-programmers
<ytti> as only programmer would ever create it
<ytti> so it's not immediately obvious to me, who is receiving the favour there
<jhass> a format you can parse at runtime is _way_ easier to implement
<jhass> having to compile something in order to parse it is quite a barrier
<jhass> you make your otherwise fairly small tool depend on the entire compiler
<jhass> it's just unnecessary surface really
kulelu88 has joined #crystal-lang
kulelu88 has joined #crystal-lang
<ytti> i was thinking that shard has some skeleton software which creates packages, fetches dependnecies etc
<ytti> and this module definition file, would be taped into that
<ytti> so when you call shards install or similar it compile the program and runs it
<ytti> but i don't have right now example in my mind where i'd want dynamism in the package definitino
<jhass> I mean you could always built a tool that writes out a generated shard.yml and calls shards if you wanted
<jhass> but we had lengthy discussions about the format, it'll stay this way for now
ismaelga has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 246 seconds]
kulelu88 has quit [Ping timeout: 255 seconds]
olek_poz has joined #crystal-lang
jwaldrip has joined #crystal-lang
kulelu88 has joined #crystal-lang
pawnbox has joined #crystal-lang
<olek_poz> Hello guys. I've rewritten my shard crystal_api and now you need only to create a few classes and use crystal_api only as library. Sample code is here https://github.com/akwiatkowski/crystal_api_sample/blob/master/src/crystal_api_sample.cr Hope it will be useful for someone.
ismaelga has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
<mlitwiniuk> oh, hi @olek_poz ;)
test88112 has joined #crystal-lang
jwaldrip_ has joined #crystal-lang
jwaldrip has quit [Ping timeout: 276 seconds]
Ven has joined #crystal-lang
A124 has quit [Quit: '']
Ven has quit [Ping timeout: 250 seconds]
test88112 has quit [Quit: Page closed]
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/v48Zq
<crystal-gh> crystal/master 8ee9ded Joakim Reinert: more sophisticated cookie parsing. Correctly handles multiple cookies
<crystal-gh> crystal/master 270ae86 Jonne Haß: Merge pull request #1888 from jreinert/cookie-parsing...
leafybas_ has joined #crystal-lang
leafybasil has quit [Ping timeout: 272 seconds]
leafybas_ has quit [Ping timeout: 272 seconds]
olek_poz has quit [Ping timeout: 260 seconds]
olek_poz has joined #crystal-lang
olek_poz has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
ponga has quit [Quit: Connection closed for inactivity]
Bofu2U has joined #crystal-lang
Ven has quit [Ping timeout: 260 seconds]
jwaldrip__ has joined #crystal-lang
jwaldrip_ has quit [Ping timeout: 255 seconds]
zz_Cidan is now known as Cidan
leafybasil has joined #crystal-lang
doddok has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
rvchangue has quit [Ping timeout: 240 seconds]
rvchangue has joined #crystal-lang
Sadin has quit [Ping timeout: 272 seconds]
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
greengriminal has joined #crystal-lang
hohenfall has quit [Quit: WeeChat 1.3]
hohenfall has joined #crystal-lang
Ven_ has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
Ven_ has quit [Read error: Connection reset by peer]
greengriminal has quit [Quit: Leaving]
Ven has joined #crystal-lang
sdogruyol has joined #crystal-lang
<sdogruyol> what's the best way to use a single file handler for logging
<jhass> you mean to share a logger instance globally?
ssvb has joined #crystal-lang
<sdogruyol> jhass: something like this http://carc.in/#/r/ml2
<sdogruyol> jhass: and then passing this handler around to log stuff
<jhass> a+ creates the file if none existent, no?
<sdogruyol> jhass: let me check it again
<jhass> I'm still blurry on the second part of your question
<sdogruyol> jhass: actually i want to share the logger and thus the file handler
<jhass> it's called file handle btw
<sdogruyol> jhass: ok :)
<jhass> anyway, I usually go for a class method on the main namepace
<sdogruyol> jhass: meanwhile "a+" doesnt create if not existing
<jhass> def self.logger; @@logger ||= Logger.new(File.new("kemal.log", "a+")) end
<jhass> really? libc sucks
<sdogruyol> jhass: File.open "kemal.log", "a+" doesnt
<sdogruyol> let me check new
<jhass> well, there should be a way to pass both, O_CREAT and O_APPEND
<jhass> I think you're testing wrong tbh
<sdogruyol> jhass: File.new does the trick
<sdogruyol> jhass: i was wrong at File.open part
<sdogruyol> jhass: thanks for the help as always :)
<jhass> aw, too slow
<sdogruyol> jhass: :)
<sdogruyol> jhass: meanwhile how are you?
olek_poz has joined #crystal-lang
<jhass> fine fine
<sdogruyol> jhass: great
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
hohenfall has quit [Quit: WeeChat 1.3]
hohenfall has joined #crystal-lang
hohenfall has quit [Client Quit]
hohenfall has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sdogruyol has quit []
barosl_ has joined #crystal-lang
jamie_ca has joined #crystal-lang
BlaXpirit has quit [Ping timeout: 265 seconds]
Excureo has quit [Ping timeout: 265 seconds]
ukd1 has quit [Ping timeout: 265 seconds]
Excureo has joined #crystal-lang
kulelu88 has quit [Ping timeout: 265 seconds]
barosl has quit [Ping timeout: 265 seconds]
ukd1 has joined #crystal-lang
fowlduck_ has joined #crystal-lang
jwaldrip___ has joined #crystal-lang
justinmcp has joined #crystal-lang
jwaldrip__ has quit [*.net *.split]
fowlduck has quit [*.net *.split]
epitron has quit [*.net *.split]
justinmcp_ has quit [*.net *.split]
epitron has joined #crystal-lang