RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.25.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
DTZUZO has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 264 seconds]
Raimondii is now known as Raimondi
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 248 seconds]
ua_ has joined #crystal-lang
ua has quit [Ping timeout: 240 seconds]
ashirase has quit [Ping timeout: 248 seconds]
ashirase has joined #crystal-lang
zhangkaizhao has joined #crystal-lang
zhangkaizhao has quit [Quit: Konversation terminated!]
Groogy has joined #crystal-lang
<FromGitter> <foi> Hi! How to use HTTP::Server as multithread (not multiprocess!)
<FromGitter> <foi> ```code paste, see link``` ⏎ ⏎ This is single threaded [https://gitter.im/crystal-lang/crystal?at=5b66e6ace9ab53770c918ead]
<Groogy> Think there is a Thread class but not sure how well Crystal support it at this point
<FromGitter> <Qwerp-Derp> To implement threads for Windows, is it basically just porting the same code in the existing POSIX implementation, but changing things a bit so that they work properly for Windows instead?
<FromGitter> <Qwerp-Derp> There is a `Thread` class but it's used internally, you just use `Fiber`s and `#spawn` and instead
<FromGitter> <foi> if i wrap context in spawn do end - http server returns nothing
<Groogy> @Qwerp-Derp Fibers are not multi-threaded though?
<Groogy> Unless that changed recently they just let you switch context within same thread for long operations like IO etc.
<FromGitter> <Qwerp-Derp> oh didn't know that
<Groogy> From what I remember fibers only let another fiber do work if you yield
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 256 seconds]
jeromegn has quit []
Flipez has quit [Ping timeout: 264 seconds]
Flipez has joined #crystal-lang
txdv has quit [Ping timeout: 264 seconds]
txdv has joined #crystal-lang
return0e has quit [Ping timeout: 240 seconds]
return0e has joined #crystal-lang
<FromGitter> <S-YOU> How many number of arguments in this function(clear_screen) of struct member? ⏎ ⏎ ```struct TextOutput ⏎ clear_screen : (TextOutputProtocol * -> Uint64T) ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5b6706e7c79ebc1ae7af36aa]
<FromGitter> <S-YOU> Compiler expects 0
<FromGitter> <foi> Sorry. It is my fault. HTTP::Server is multithreaded (or evented) by default. I've test from 1 browser and multiple tabs and it behaves as single threaded, but if use another browsers (or clients) it is not blocks and works as expected.
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
alex`` has quit [Quit: WeeChat 2.2]
<FromGitter> <fridgerator> @foi You have to use `reuse_port` and run multiple servers that bind to the same port
<FromGitter> <fridgerator> https://crystal-lang.org/api/0.25.1/HTTP/Server.html#listen%28port%3AInt32%2Creuse_port%3ABool%3Dfalse%29-instance-method
<oprypin> so much misleading info :(
<oprypin> foi, you can't use multiple threads. but it's fine, the default behavior is still concurrent, using fibers. for multiple processes, see ^
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<Groogy> Ugh I'm missing my sorted insert pull request right now :(
<Yxhuvud> What would you use it for this time?
alex`` has joined #crystal-lang
<Groogy> priority queue
<Groogy> for my A* and Dijkstras algorithm
<Groogy> It's weird we don't want it in our standard library when most others do
<Groogy> and from what I could tell there's not really a good interface to find out where to put an element besides bsearch_index in Crystal
<Groogy> would say it's a place where we are severly lacking at
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang