pawnbox has quit [Remote host closed the connection]
mati_urunda has quit [Ping timeout: 265 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
matp has quit [Quit: Bye!]
matp has joined #crystal-lang
jhass has quit [Ping timeout: 260 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
DeBot has quit [Ping timeout: 260 seconds]
asterite has quit [Ping timeout: 250 seconds]
shawn42 has joined #crystal-lang
jhass has joined #crystal-lang
asterite has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
vikaton has joined #crystal-lang
akwiatkowski has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 264 seconds]
mgarciaisaia has joined #crystal-lang
Philpax has joined #crystal-lang
mgarciaisaia has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
A124 has quit [Remote host closed the connection]
A124 has joined #crystal-lang
<FromGitter>
<KingPixil> hey guys!
<FromGitter>
<KingPixil> I'm new to crystal!
<FromGitter>
<cjgajard> hello :)
<FromGitter>
<KingPixil> hi!
<FromGitter>
<KingPixil> crystal is awesome, can't wait to dig in deeper :)
<FromGitter>
<KingPixil> how can i add a route to a web app?
<FromGitter>
<KingPixil> using `http`
<FromGitter>
<cjgajard> there's no routing in `HTTP::Server` from stdlib, but you can use any of the routing shards (libraries) out there. Have you checked Kemal? (https://github.com/sdogruyol/kemal)
<FromGitter>
<KingPixil> yeah, but I want to know what's under the hood
mgarciaisaia has quit [Ping timeout: 252 seconds]
<FromGitter>
<KingPixil> how does it create a route?
<FromGitter>
<cjgajard> it makes a tree of paths, each path is associated with a `Proc`, adds a `HTTP::Handler` to there server which searches the path in the tree and calls it if found any or returns 404... (kind of... :sweat_smile: )
mgarciaisaia has joined #crystal-lang
<FromGitter>
<KingPixil> oh, thanks! i'm looking into it
mgarciaisaia has quit [Ping timeout: 246 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 260 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 240 seconds]
mgarciaisaia has joined #crystal-lang
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has quit [Ping timeout: 260 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
mgarciaisaia has quit [Ping timeout: 248 seconds]
mgarciaisaia has joined #crystal-lang
soveran has joined #crystal-lang
mgarciaisaia has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
soveran has quit [Remote host closed the connection]
mgarciaisaia has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
Nik736 has joined #crystal-lang
bjz has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 268 seconds]
mgarciaisaia has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
pawnbox has joined #crystal-lang
mati_urunda has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 250 seconds]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 246 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 245 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 265 seconds]
mgarciaisaia has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
Yxhuvud has quit [Ping timeout: 250 seconds]
j2k has joined #crystal-lang
akwiatkowski has joined #crystal-lang
bjz_ has quit [Ping timeout: 258 seconds]
<FromGitter>
<sdogruyol> is bountysource.com/ down?
pawnbox_ has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
Yxhuvud has joined #crystal-lang
pawnbox_ has quit [Remote host closed the connection]
mgarciaisaia has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 250 seconds]
Philpax has joined #crystal-lang
_whitelogger has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Nik736 has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
shawn42 has quit [Quit: Connection closed for inactivity]
mgarciaisaia has joined #crystal-lang
<crystal-gh>
[crystal] lbguilherme opened pull request #3582: [WIP] Windows (master...win) https://git.io/v1TNd
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<RX14>
one day I'm going to set up a test jenkins for all the different targets we support
<RX14>
can't be too hard...
<RX14>
Hardest part would be OSX because I have 0 experience with it honestly
<Papierkorb>
You need a OS X box (mac mini or so) if you want to make it legal, as you're not usually allowed to run their OS in a VM on a non macOS host machine. Maybe there's a license allowing for it though
<RX14>
especially with Jenkins 2.0 and the new UI the setup could be quite nice
<RX14>
Papierkorb, yeah...
<RX14>
the jenkins slave might end up being on someone's dev laptop#
<Papierkorb>
Maybe you could persuade manastech or so to hook up a mac mini into a serverrack ;)
<RX14>
maybe so
<RX14>
oh wow macs are expensive
<Papierkorb>
They are, and don't even look at their specs
<RX14>
thats almost laughable
<Papierkorb>
Ah well, maybe one from ebay would do, or it could be crowd-funded. "Starting at 569€" ... wow
<RX14>
hmm
<Papierkorb>
The cheap mac mini only has 4GiB RAM .. and a 1.4GHz dual core cpu. Eh.
<RX14>
i wonder if we could use scaleway VMs for the ARM tests
<RX14>
i wish I had more free time to sort out stuff like this
<Papierkorb>
> 8 GB LPDDR3 SDRAM mit 1600 MHz
<Papierkorb>
I shouldn't have opened the apple shop
<RX14>
i wonder how the stdlib wil look with if flag? everywhere for windows
<Papierkorb>
Maybe stupid, but maybe have a compat layer written in Crystal, which is required if on windows, which then provides fopen() and friends. Dunno if this would make it better for much of the stdlib though.
<RX14>
yeah thats what I think will eventually happen
<RX14>
something like lib_c currently
<RX14>
with the load path hacks
<Papierkorb>
Still better than #ifdef hell I'm afraid
<RX14>
and just being basically an OS abstraction
<RX14>
Papierkorb, exactly
<RX14>
it's already ifdef hell anywhere near the concurrency code
<BlaXpirit>
why does ifdef have to be hell
<RX14>
because every platform has different semantics, and once you support more than 3 you end up with hell everywhere platform specific
<RX14>
and there's always a whole lot more thats platform specific than you expect
<Papierkorb>
BlaXpirit: It's an indication of wanting an abstraction layer. There are cases where you need it, but I like a require hack more than cluttering everything with ifdef, which you can forget to do and suddenly your nice new method blows up anywhere else
<RX14>
we essentially want a libc abstraction over windows
<Papierkorb>
fiber.cr is a place where I fear ifdef is fine, and which for windows, will grow even more, thanks to MS doing the x64 ABI different to anyone else
<RX14>
i wonder if we can get away with just creating a manual lib_c that's not actually a lib definition
<RX14>
at that point you might as well use an existing posix windows wrapper
<RX14>
and just link that statically
<RX14>
which I would be all for
<Papierkorb>
Same here, why reinvent the wheel
<RX14>
i think using an existing posix wrapper should still be possible with msvc
<Papierkorb>
As long the license of it allows it, some things can get really iffy. I still wonder how cygwin emulates fork().
<RX14>
magic
<BlaXpirit>
what i think is.. there should be large platform-specific chunks, maybe even files, not 100 ifdefs per file
<BlaXpirit>
putting Windows stuff through POSIX abstractions is no good
<BlaXpirit>
but a general thin abstraction just to separate implementations is good in my opinion
<BlaXpirit>
all languages go through this, it's not such a big deal
<RX14>
BlaXpirit, yes thats what we were suggesting
<RX14>
like lib_c is currently
<RX14>
a folder for each target
<RX14>
it's probably a good start though to reuse an existing wrapper
<Papierkorb>
We can still make adjustments, code is there to be changed afterall
<Papierkorb>
IMO it's more important to have a quick start and get people to use it than to have the perfect solution 3 years later
<crystal-gh>
[crystal] MakeNowJust opened pull request #3583: .crystal directory is no longer created (master...fix/no-longer-crystal-dir) https://git.io/v1Tpr
<RX14>
hmm
<Papierkorb>
Is there a reason that IO::FileDescriptor does not have #ioctl ?
<Papierkorb>
Was there a tool which converted C headers into a `lib`?
<RX14>
so that you can send a Void* through Fiber#resume
<RX14>
then each select action is responsible for identifying it's own resume token
<Papierkorb>
Could it be abused for that what I think you could?
<Papierkorb>
Signaling a `gtfo` to a fiber?
<RX14>
yup
<Papierkorb>
Though I still think raising an exception is better for that, only running the `ensure`s sounds like more work for something exceptions do anyway
<RX14>
but
<RX14>
you can catch ex : Exception
<RX14>
and retry
<RX14>
we want un uncatchable exception
<Papierkorb>
Do we?
<Papierkorb>
Catching `Exception` uncarefully is broken code
<RX14>
not really
<crystal-gh>
[crystal] MakeNowJust opened pull request #3585: Clean up trailing newline in .gitignore of crystal init (master...fix/cleanup-gitignore) https://git.io/v1Tjl
<RX14>
sometimes you want to run a user event handler
<RX14>
but you wabnt to just log exceptions
<RX14>
instead of crashing the whole thing
<Papierkorb>
I don't see much wrong for that case to also catch StopError (or w/e) too in that use-case
<Papierkorb>
(grammar at its finest, jeez)
<RX14>
hmm
<Papierkorb>
catching the root exception type is always an unusal, finicky thing. Retrying from that sounds like a general bad idea.
<Papierkorb>
At least in all languages I've come across
<FromGitter>
<sdogruyol> what do you think about it
<RX14>
it's too early to tell how the worting will go
<RX14>
porting*
<Papierkorb>
Sounds like a good start and basically what we were talking about yesterday
<FromGitter>
<sdogruyol> @RX14 yeah
<Papierkorb>
But time will tell of course. I'm positive that if there's a developer proficient with windows around that it'll get quite stable in the long run
<RX14>
i'm most interested to see how the winapi abstraction will be handled
<FromGitter>
<sdogruyol> i thought you were going to open a PR soon @papierkorb :P
<FromGitter>
<sdogruyol> does winapi has differences between 32 bit and 64 bit?
<Papierkorb>
sdogruyol, I dropped that after I read in the "want windows" issue that @lbguilherme wanted to PR something this week-end
<Papierkorb>
Most likely
<Papierkorb>
MS also uses their own x64 ABI
<Papierkorb>
Everyone but MS uses one, and MS uses their own
<Papierkorb>
it's glorious
<FromGitter>
<sdogruyol> then it's gonna be crap show :D
<RX14>
damn, i'm going to have to use Select.select instead of #select because of the select keyword
ssvb has quit [Read error: Connection timed out]
pawnbox has quit [Remote host closed the connection]
<crystal-gh>
[crystal] asterite closed pull request #3583: .crystal directory is no longer created (master...fix/no-longer-crystal-dir) https://git.io/v1Tpr
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/v1kTm
<crystal-gh>
crystal/master 9446b22 TSUYUSATO Kitsune: Clean up trailing newline if not lib [ci skip]
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/v1kTO
<crystal-gh>
crystal/master 0932cf0 TSUYUSATO Kitsune: Correct example to write client instead of server [ci skip]