ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.4 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
gloscombe has joined #crystal-lang
Philpax has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
guilleiguaran__ has quit [Read error: Connection reset by peer]
guilleiguaran__ has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 252 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 265 seconds]
snsei has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
Philpax has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
Philpax has quit [Ping timeout: 252 seconds]
Philpax has joined #crystal-lang
<crystal-gh> [crystal] johnjansen opened pull request #3435: String partition (master...string-partition) https://git.io/vP1Ns
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<A124> johnjansen : To catch up on previous time. (I did reply to the PM but late)
<A124> Hey, thanks! Well, I'm talking dozens to hundreds of requests/connections parallel. HTTP is a go-to example for crawling. I will read up and try to compare those three languages as precisely as possible. The core will stay at go, for now, but I'm looking into future of processing and extracting data, where we look forward to have widespread web assembly adoption, but for the smaller data [...]
<A124> [...] processing crowd a balance of language, speed, and concurrency is the key. The talk is about IPFS, and several other things that some people refuse to change and move away from python, as well emerging. Sorry to take your time by this commentary and other stuff, I appreciate your time.
<A124> And the situation about secure compute is also (but not only) in context of IPFS: Example: https://github.com/ipfs/apps/issues/6
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 252 seconds]
snsei has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
HakanD____ has joined #crystal-lang
Philpax has joined #crystal-lang
soveran has joined #crystal-lang
HakanD____ has quit [Quit: Be back later ...]
HakanD____ has joined #crystal-lang
snsei has joined #crystal-lang
HakanD____ has quit [Ping timeout: 250 seconds]
<FromGitter> <sdogruyol> @johnjansen so you are building this https://github.com/johnjansen/tokenizer
<FromGitter> <sdogruyol> looks amazing
snsei has quit [Ping timeout: 244 seconds]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
hmans has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Client Quit]
bjz has joined #crystal-lang
mark_66 has joined #crystal-lang
davidbackeus has joined #crystal-lang
HakanD____ has joined #crystal-lang
davidbackeus has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
onethirtyfive has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
ponga has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
HakanD____ is now known as HakanD
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
HakanD has quit [Quit: Be back later ...]
HakanD has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bjz has joined #crystal-lang
HakanD has quit [Ping timeout: 256 seconds]
HakanD has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
<Papierkorb> Is this a bug? When the other end of a TCPSocket closes the connection, a #read always returns `0`. It does not raise any error, also there's no IO#eof? :(
<Papierkorb> So I don't know if the IO has been closed, I have to guess based on the result of #read, and I have to remember that everytime I use it
snsei has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
snsei has quit [Ping timeout: 260 seconds]
sfcgeorge has joined #crystal-lang
HakanD_ has joined #crystal-lang
HakanD has quit [Read error: Connection reset by peer]
HakanD__ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
sfcgeorge has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RX14> Papierkorb, yes thats the point
<RX14> if read returns zero that IS EOF
<Papierkorb> That's a subtle way to produce bugs
<RX14> no it's not
<Papierkorb> that's not "great"2
<RX14> it's simple
<RX14> it's how unix works
<RX14> read blocks
<RX14> when it's EOF it returns zero
<Papierkorb> I want to ask it before if it's EOF
<Papierkorb> even C can do it.
<Papierkorb> and there's EOFError, but it's not used in that case? That's weird too
<RX14> no
<RX14> EOFError is used for other commands
<Papierkorb> that's just not consistent
<RX14> #read is the low level interface
<RX14> it has to be fast
<RX14> Papierkorb, there isn't a reliable way to test if a socket is open or closed other than reading or writing from it even in C
<A124> Actually if the remote does close normally, you know it is closed, no? If not, you cannot know.
<RX14> yes but what use if eof? if using read after it could return EOF anyway
<Papierkorb> And I stand by it. A "if size == 0" is too slow .. what? We just did a SYSCALL, a context switch, and now a single branch instruction is too much?
<RX14> it's a leaky abstraction over TCP at least
<RX14> Papierkorb, no, raising exceptions are slow
<RX14> exceptions should be an exception
<RX14> reaching eof is not exceptional
<RX14> you have to check the return value of read anyway to determine what of your slice is valid
<RX14> so handling size == 0 is easy to remember
<RX14> you might want #read_fully instead
<Papierkorb> it doesn't work with sockets if it has to wait for the buffer to fill up
<RX14> yes, I said you *might* want read_fully
<RX14> depending on wat you're doing
<RX14> if you need x bytes to do anything with you might as well use read_fully
<RX14> if you want to handle bytes as they come use #read
pawnbox has joined #crystal-lang
pawnbox_ has quit [Read error: Connection reset by peer]
<Papierkorb> Great help. "You *might* do something that won't work"
<RX14> well which call you use depends on your usecase
<RX14> thats what I said
<Papierkorb> which is clearly TCPSockets
<RX14> I don't *know* your usecase so I can't recommend a call
<RX14> TCP Sockets isn't a usecase
<RX14> it's a transport
<RX14> both calls work on TCP sockets
<RX14> it's just which works for your usecase
<Papierkorb> Yeah I don't have time to waste on me being talked down to, sorry.
sfcgeorge has joined #crystal-lang
Crizkov has joined #crystal-lang
<Crizkov> BlaXpirit: Hi! :raising_hand_man: The SDL issue on Linux is already posted #2695
<DeBot> https://github.com/crystal-lang/crystal/issues/2695 (Recent 17.x release breaks SDL sample)
Crizkov has quit [Client Quit]
<BlaXpirit> ok thanks
gloscombe has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 252 seconds]
Philpax has joined #crystal-lang
gloscombe has quit [Quit: leaving]
gloscombe has joined #crystal-lang
sfcgeorge has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has quit [Ping timeout: 250 seconds]
gloscombe has quit [Quit: leaving]
gloscombe has joined #crystal-lang
pawnbox has joined #crystal-lang
elia has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pduncan has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
gloscombe has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 260 seconds]
<FromGitter> <johnjansen> hey @sdogruyol yes, im building tokenizer ATM although its slow going ;-)
gloscombe has joined #crystal-lang
pawnbox has joined #crystal-lang
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has quit [Ping timeout: 256 seconds]
Philpax_ has joined #crystal-lang
HakanD__ has quit [Quit: Be back later ...]
HakanD__ has joined #crystal-lang
HakanD__ has quit [Ping timeout: 265 seconds]
mark_66 has quit [Quit: Leaving.]
HakanD__ has joined #crystal-lang
HakanD__ has quit [Quit: Be back later ...]
HakanD__ has joined #crystal-lang
HakanD__ has quit [Ping timeout: 250 seconds]
Philpax_ has quit [Ping timeout: 256 seconds]
soveran has quit [Remote host closed the connection]
HakanD__ has joined #crystal-lang
snsei has joined #crystal-lang
gloscombe has quit [Ping timeout: 244 seconds]
snsei has quit [Ping timeout: 244 seconds]
gloscombe has joined #crystal-lang
eizua has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax_ has quit [Ping timeout: 245 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vPD4c
<crystal-gh> crystal/master 8d326cc Tim Craft: Handle non array return values in Enumerable#flat_map (#3427)
kochev has joined #crystal-lang
Nik736 has joined #crystal-lang
Nik736 has quit [Client Quit]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 260 seconds]
elia has quit [Quit: Computer has gone to sleep.]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vPDEk
<crystal-gh> crystal/master 5c3ba1f chocolateboy: fix doc typo for Number#divmod
greengriminal has joined #crystal-lang
<FromGitter> <johnjansen> anyone know shorthand for the `map` segment of this `text.scan(regexp).map{|m|m[0]}`
<FromGitter> <jwoertink> `map(&:first)` does that work?
<FromGitter> <jwoertink> @johnjansen ^
<crystal-gh> [crystal] wontruefree closed pull request #2862: UUID Update (master...uuid) https://git.io/vou7I
sp4rrow has joined #crystal-lang
<BlaXpirit> johnjansen map &.[0]
onethirtyfive has joined #crystal-lang
<BlaXpirit> johnjansen, `map &.[0]`
daemonwrangler_ has quit [*.net *.split]
endou_ has quit [*.net *.split]
oddmunds has quit [*.net *.split]
Liothen has quit [*.net *.split]
Majost has quit [*.net *.split]
Kilo`byte has quit [*.net *.split]
danzilio has quit [*.net *.split]
mroth has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
[spoiler] has quit [*.net *.split]
pataphysics has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
jfontan has quit [*.net *.split]
maxpowa has quit [*.net *.split]
aarongodin has quit [*.net *.split]
go|dfish has quit [*.net *.split]
endou has joined #crystal-lang
pataphys1cs has joined #crystal-lang
dostoyevsky has joined #crystal-lang
Liothen has joined #crystal-lang
maxpowa has joined #crystal-lang
Kilo`byte has joined #crystal-lang
go|dfish has joined #crystal-lang
[spoiler] has joined #crystal-lang
oddmunds has joined #crystal-lang
daemonwrangler has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
Majost has joined #crystal-lang
aarongodin has joined #crystal-lang
mroth has joined #crystal-lang
<FromGitter> <jwoertink> ooo that's awesome
danzilio has joined #crystal-lang
emmanueloga has joined #crystal-lang
soveran has joined #crystal-lang
eizua has quit [Quit: Leaving]
gloscombe has quit [Ping timeout: 260 seconds]
soveran has quit [Ping timeout: 256 seconds]
gloscombe has joined #crystal-lang
<bmcginty> Is there any way to use a wildcard macro to catch any function call to an object before compilation? I was going to look into writing an ORM in crystal, but being able to do fn.someNameHere would be very nice...
<bmcginty> And that's probably in an FAQ somewhere. I'll go read that before asking again.
<travis-ci> crystal-lang/crystal#5c3ba1f (master - fix doc typo for Number#divmod): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/168677435
<bmcginty> sweet! crystal's got method_missing, or something close enough I can give this a shot!
<Papierkorb> bmcginty: Not a FAQ, but a book-like page: https://crystal-lang.org/docs/syntax_and_semantics/macros/hooks.html
<FromGitter> <johnjansen> thanks guys, @BlaXpirit that was the one i was looking for
<Papierkorb> A `sequel` clone would be much appreciated though...
soveran has joined #crystal-lang
<FromGitter> <johnjansen> @bmcginity this is not totally relevant, but you may also be interested in https://github.com/sdogruyol/tren
<bmcginty> Papierkorb: raydf: thanks.
<FromGitter> <raydf> And remember that https://github.com/crystal-lang/crystal-db is a work in progress :). I believe there's a lot of code left to do related to transactions, direct io and pooling management.
kulelu88 has joined #crystal-lang
<FromGitter> <fkchang> @sdogruyol thanks for the websockets code snippet the other day, finally got around to working with it, ended up going w/a Hash(Http::Websocket, int32) so I could have the proc.id per socket
<FromGitter> <fkchang> I still need to verify it works as desired, but at least it compiles and in theory does the right thing
<travis-ci> crystal-lang/crystal#8d326cc (master - Handle non array return values in Enumerable#flat_map (#3427)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/168670280
<DeBot> https://github.com/crystal-lang/crystal/pull/3427 (Handle non array return values in Enumerable#flat_map)
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> @fkchang that's great to hear
kochev has quit [Remote host closed the connection]
kochev has joined #crystal-lang
soveran has joined #crystal-lang
bjz has joined #crystal-lang
HakanD__ has quit [Quit: Be back later ...]
HakanD__ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
HakanD__ has quit [Ping timeout: 245 seconds]
<FromGitter> <johnjansen> am i right in assuming that class names reported as `SomeClassName+` indicates a class which has been monkey patched?
<FromGitter> <sdogruyol> it's a virtual class
<FromGitter> <johnjansen> ohhhh
<FromGitter> <sdogruyol> meaning it's descended from something
<FromGitter> <johnjansen> yeah, and its the “something” that i am trying to allow
<FromGitter> <sdogruyol> there you go
<FromGitter> <johnjansen> yeah … RTFM john
<FromGitter> <johnjansen> ;-)
<FromGitter> <sdogruyol> it's okay :)
Ven_ has joined #crystal-lang
<FromGitter> <johnjansen> how about this @sdogruyol ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=580685f7759f6d2436c4be01]
gloscombe has quit [Quit: Lost terminal]
greengriminal has quit [Quit: Leaving]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<BlaXpirit> johnjansen, that's... yeah, that just doesn't work that way
<BlaXpirit> i ran into that recently too
<BlaXpirit> : Xyz.class matches only that exact class
<BlaXpirit> worth asking to change this
<FromGitter> <johnjansen> did you get round it
<BlaXpirit> johnjansen, not really
<FromGitter> <johnjansen> i need subclasses of Common
<FromGitter> <johnjansen> goodie
<FromGitter> <johnjansen> :-)
elia has joined #crystal-lang
<BlaXpirit> i needed this for integers, so i implemented a function for each type of integer in a macro loop
<FromGitter> <johnjansen> happy its not me this time
<FromGitter> <johnjansen> is it ok for instances of a class
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <johnjansen> its weird cause this works https://play.crystal-lang.org/#/r/1cdr
<BlaXpirit> oh it does? hm then maybe it's a bug
<BlaXpirit> even more worth reporting
<FromGitter> <johnjansen> now im trying to figure out whats wrong with the other code (which is ruby spaghetti)
<FromGitter> <johnjansen> / was
<BlaXpirit> johnjansen, you mean you're still fighting with .class ?
<BlaXpirit> oh probably not
<FromGitter> <johnjansen> basically just want anything that works really
<FromGitter> <johnjansen> ;-)
HakanD__ has joined #crystal-lang
bjz has joined #crystal-lang
<FromGitter> <johnjansen> @BlaXpirit check this out https://play.crystal-lang.org/#/r/1cdu
vikaton has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<BlaXpirit> just put this in an issue lol
<FromGitter> <johnjansen> im glad im not going mad
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
pduncan has quit [Ping timeout: 256 seconds]
kochev has quit [Remote host closed the connection]
HakanD__ has quit [Ping timeout: 260 seconds]
pduncan has joined #crystal-lang
<FromGitter> <johnjansen> ive narrowed it right down @BlaXpirit ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5806931736d6422636837cb6]
<BlaXpirit> amazing
<BlaXpirit> thanks
<FromGitter> <johnjansen> even in a case statement etc
<FromGitter> <johnjansen> better still ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=580694e280020cc608f199dd]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ponga has quit [Quit: Connection closed for inactivity]
sp4rrow has joined #crystal-lang
sp4rrow has quit [Client Quit]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 256 seconds]
sp4rrow has joined #crystal-lang
soveran has joined #crystal-lang
sp4rrow has quit [Read error: Connection reset by peer]
sp4rrow has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
ruby_ has joined #crystal-lang
Philpax_ has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]