<FromGitter>
<elorest> On that link I sent there’s a really simple readme so you should be able to get it up and running in about 3 minutes.
<FromGitter>
<elorest> I just changed the readme a bit so you might want to reload it.
_whitelogger has joined #crystal-lang
whomp has joined #crystal-lang
whomp has quit [Ping timeout: 240 seconds]
olbat has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
zipR4ND has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb>
why on earth do people use mysql
<Yxhvd>
because they were brought up that way
<Yxhvd>
(also, traditionally, the replication story was easier there even if pg has improved a LOT in this lately)
<FromGitter>
<akzhan> mysql has its own benefits like less pricey connections in the box. https://eng.uber.com/mysql-migration/ ⏎ ⏎ but it’s off topic.
<Papierkorb>
"less pricey connections"?
<FromGitter>
<akzhan> Cheaper
<Papierkorb>
...aha
bjz has joined #crystal-lang
bjz has quit [Client Quit]
Ven has joined #crystal-lang
Ven is now known as Guest38231
bjz has joined #crystal-lang
TheLemonMan has joined #crystal-lang
whomp has joined #crystal-lang
Guest38231 has quit [Ping timeout: 260 seconds]
whomp has quit [Ping timeout: 268 seconds]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
splitty__ has joined #crystal-lang
fedruantine has quit [Read error: Connection reset by peer]
splitty_ has quit [Ping timeout: 260 seconds]
Kug3lis has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
balduin has joined #crystal-lang
balduin has left #crystal-lang [#crystal-lang]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 246 seconds]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
whomp has joined #crystal-lang
whomp has quit [Ping timeout: 268 seconds]
<FromGitter>
<drosehn> I'm hoping to do some crystal-program using LMDB, if I can find the time.
<FromGitter>
<bararchy> I want to create a ModBus implementation :)
<FromGitter>
<drosehn> I should say "when I find the time", but I just spent the last 36 hours fighting off a DDoS on one of our web servers. That wasn't how I expected to spend this weekend.
<RX14>
oh dear
<RX14>
i havent been properly DDoSed yet so I don't know what it's like
<FromGitter>
<drosehn> This could have been much much worse than it was. There were probably less than a thousand machines in the attack. And of course it started at 5:10pm on Friday, when everyone but me had already left for the weekend. Most (it seems) for vacation-ish events which were far away from Troy.
<FromGitter>
<drosehn> At this point they've gotten bored and moved on to annoy someone else.
<FromGitter>
<drosehn> This weekend was our commencement, so staff who don't need to be on campus make a point of staying far away.
<FromGitter>
<bararchy> That's why you should pay for CloudFlare\Imperva ;)
<RX14>
that assumes you're hosting http/https only
<RX14>
well cloudflare at least
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 240 seconds]
sz0 has joined #crystal-lang
<FromGitter>
<drosehn> That's a decision would is made at a higher management level than mine. But I think I'm going to head back to sleep for awhile. I've had about eight hours of sleep since I woke up on Friday morning, and iirc I didn't get all that much sleep on Thursday night. (although that was due to a line of severe thunderstorms which rolled through our area and took out the power in my house).
<zipR4ND>
hey all, how can I make a Proc(T, K).new { |x| .... } recursively call itself ?
<zipR4ND>
like how do I get a handle of the Proc inside it's own body?
<RX14>
have you tried just `foo : Proc(T,K)` and then referencing it inside the proc
<RX14>
&block and ->method(Type) make a lot more sense to me
<Papierkorb>
I'd actually think about the code architecture, sounds wrong to actually need a recursive proc
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
<FromGitter>
<drosehn> yeah, I'm not sure I would even want try to do that unless I was really forced to.
<RX14>
recursive methods are fine, so taking a proc to one doesn't sound too bad
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter>
<drosehn> but it seems pretty odd to recurse in a `new` method.
bjz has joined #crystal-lang
<FromGitter>
<drosehn> the lambda-calculus video looks interesting, but I need some sleep before I watch the rest of it.
<FromGitter>
<bararchy> How would you avoid exsesive memory allocations when in need to read lots of small data packets in a tight loop ? ⏎ ~~~ ⏎ loop do ⏎ mem = Bytes.new(1024) ⏎ size = socket.read(mem) ... [https://gitter.im/crystal-lang/crystal?at=5921a34f2b926f8a6779552a]
<FromGitter>
<bararchy> This handler runs for each connecting client where I can have up tp 100K concurrent conncections from clients
<RX14>
it's not excessive memory allocation if each slice needs to be used in parallel
<RX14>
there's simply no other way
<RX14>
you could possibly make your own custom slice allocator but it might not buy you much
<FromGitter>
<bararchy> This is what I thought but the GC keeps complaning that this behavior might cause memory leaks etc ...
<RX14>
it shouldn't
<RX14>
at all
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RX14>
because it's not a large allocation
<FromGitter>
<bararchy> Oh, I used bigeer buffer (16k, 32k)
<RX14>
do you need a larger buffer?
<RX14>
well, do you need a fixed-size buffer?
<FromGitter>
<bararchy> Yes
<RX14>
you know the exact size before reading?
<FromGitter>
<bararchy> Sadly no , layer 3-4 traffic
<RX14>
@bararchy how about a realloc before you call the use_data
<RX14>
damn, realloc is only available on pointer
<RX14>
i should PR that in
<FromGitter>
<bararchy> How will reloc help me ? Is it more efficant ?
<RX14>
@bararchy i mean if it works fine you can just ignore the warning
<FromGitter>
<bararchy> Well , it works fine , just annoying messages to the STDOUT :/
<RX14>
don't think there's much you can do
<FromGitter>
<bararchy> Is there a way to supress the messages ? \
<RX14>
maybe
whomp has joined #crystal-lang
Philpax has quit [Ping timeout: 268 seconds]
balduin has joined #crystal-lang
whomp has quit [Ping timeout: 240 seconds]
<RX14>
there's likely an env var
pduncan has joined #crystal-lang
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<FromGitter>
<overnet> Hi All. Does Crystal lang support multi core CPU processing similar to Golang? If yes could someone please give an example of how it works in Crystal.