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
<FromGitter> <foi> @fridgerator @oprypin thanks!
moei has quit [Quit: Leaving...]
alex`` has quit [Ping timeout: 244 seconds]
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <DanilaFe> So why is the "yield" keyword used both in yielding values to blocks AND fibers?
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 264 seconds]
Raimondii is now known as Raimondi
Creatornator has joined #crystal-lang
<FromGitter> <aisrael> Thank you for implicit object syntax in `case` .. `when`
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has joined #crystal-lang
moei has joined #crystal-lang
<FromGitter> <bew> @DanilaFe what do you mean "yielding values to block/fiber"?
alex`` has quit [Ping timeout: 268 seconds]
moei has quit [Ping timeout: 256 seconds]
snsei has quit [Ping timeout: 256 seconds]
moei has joined #crystal-lang
<Yxhuvud> groogy: the problem is that a priority queue implemented that way just isn't good enough. It needs a specialized structure instead of being mashed into Array.
alex`` has joined #crystal-lang
ashirase has quit [Ping timeout: 240 seconds]
ashirase has joined #crystal-lang
Frank[m] has quit [Changing host]
Frank[m] has joined #crystal-lang
Frank[m] has joined #crystal-lang
Frank[m] is now known as fifr[m]
salvor has quit [Ping timeout: 248 seconds]
salvor has joined #crystal-lang
asterite_ has joined #crystal-lang
Connor[m]1 has quit [Ping timeout: 240 seconds]
dannyAAM has quit [Ping timeout: 240 seconds]
greenbigfrog has quit [Ping timeout: 240 seconds]
khubo has quit [Ping timeout: 240 seconds]
asterite has quit [Ping timeout: 240 seconds]
asterite_ is now known as asterite
sagax has joined #crystal-lang
dannyAAM has joined #crystal-lang
greenbigfrog has joined #crystal-lang
<FromGitter> <DanilaFe> I meant, we use yield to pass a value to a block. But then a fiber can also yield to other fibers
<FromGitter> <DanilaFe> I guess it's different since yield is a function in the context of fibers
Creatornator has joined #crystal-lang
<FromGitter> <straight-shoota> `yield` is a keyword, `Fiber.yield` is a method.
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 264 seconds]
Raimondii is now known as Raimondi
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
<FromGitter> <bararchy> And `yield Fiber.yield` is a cool thing hahah
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Harikiri has joined #crystal-lang
<FromGitter> <sdogruyol> I've started working on an AWS SDK based on @taylorfinnell s awesome work
<FromGitter> <bew> 🎉
<FromGitter> <bew> Shouldn't AWS & SQS be in uppercase though?
<FromGitter> <sdogruyol> I've thought of that and kept it this way
<FromGitter> <sdogruyol> the aws-ruby-sdk also follows the same idiom
<FromGitter> <bew> But why? Those identifiers are acronyms, it doesn't make sense to me to make them like names.. E.g HTTP, JSON, XML etc.. Are all in uppercase
<FromGitter> <sdogruyol> Those are not external and only used by the SDK itself
<oprypin> bew, what are you talking about, the repository name?
<FromGitter> <sdogruyol> no, the class names like `Aws::Sqs` -> `AWS::SQS`
<FromGitter> <bew> ^
<FromGitter> <sdogruyol> I prefer the first one, he prefers the second
<FromGitter> <sdogruyol> time to bikeshed :metal:
<oprypin> ok well that's just silly
<FromGitter> <jwoertink> I've never heard the term "bikeshed" until just now...
<FromGitter> <sdogruyol> @oprypin wow didn't know we had something like that lol
<FromGitter> <sdogruyol> I meant the acronym section
<FromGitter> <straight-shoota> @jwoertink https://en.wiktionary.org/wiki/bikeshedding
<FromGitter> <jwoertink> yeah, I looked it up. Just crazy I hadn't heard it before.
<FromGitter> <sdogruyol> I'm surprised that you hadn't
<FromGitter> <straight-shoota> it comes up quite regularly in discussions on the issue queue
<FromGitter> <sdogruyol> it's most common reason of developer procrastination
<FromGitter> <jwoertink> haha
<FromGitter> <bew> Ahah didn't know that word but can complete relate to it ^^
<FromGitter> <straight-shoota> Although I doubt it is always accurately applied in it's original sense
<FromGitter> <straight-shoota> like this `Aws` vs. `AWS` question... yes, it doesn't matter too much in the grand scheme
<FromGitter> <straight-shoota> but then naming things is one of the hardest problems in programming... and doing that consistently, even more so
<FromGitter> <jwoertink> Yeah, I had a hard enough time trying to name my character for D&D, coming up with shard/class/method names is damn near impossible for me sometimes
<FromGitter> <fridgerator> ha
<FromGitter> <fridgerator> I just use Linux distro names for D&D characters, there are enough of them
<FromGitter> <bew> D&D?
<FromGitter> <fridgerator> dungeons & dragons
<FromGitter> <bew> Ah x)
<FromGitter> <jwoertink> That's not a bad idea lol. I'll make my next character name "Lindows" (which by the way was amazing back in the day)
<FromGitter> <sdogruyol> @jwoertink have you deployed that Lucky project to prod yet?
<FromGitter> <jwoertink> yup :)
<FromGitter> <sdogruyol> Awesome, would really love to read a post-mortem blog post haha
alex`` has quit [Ping timeout: 240 seconds]
<FromGitter> <jwoertink> it's technically been in production a few weeks now, but not really pointed DNS yet. However, we are pointing the first domain over today to see how it handles traffic
<FromGitter> <sdogruyol> fancy
<FromGitter> <jwoertink> We were given the task of benchmarking metrics against a major competitor
<FromGitter> <jwoertink> so we had to complete that before going full live
<FromGitter> <sdogruyol> how's the result
<FromGitter> <jwoertink> 😄
<FromGitter> <sdogruyol> woot, that's fantastic :O
<FromGitter> <sdogruyol> are you using Nginx e.g for static assets?
<FromGitter> <sdogruyol> probably some CDN too
<FromGitter> <jwoertink> the app is all running on elasticbeanstalk with a CDN
<FromGitter> <jwoertink> that test comes from https://www.webpagetest.org/ by the way
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 240 seconds]
z64 has left #crystal-lang ["WeeChat 2.0.1"]
z64 has joined #crystal-lang
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 240 seconds]
ua has joined #crystal-lang
akaiiro has joined #crystal-lang
ua_ has quit [Ping timeout: 244 seconds]
<Groogy> Yxhuvud well yeah but as Crystal is right now I have to implement it myself
<Groogy> and the response from the team was that "these kind of things should not be in the standard library"
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Quit: Bye]
<Yxhuvud> groogy: from the issue, my take was that it was only that the helper method on array shouldn't. I've seen noone claim the stdlib shouldn't have some priority queue (though I suppose some prefer minimal stdlib and may prefer not to have it)
<Yxhuvud> basically a temporary place until I have figured out what to do with it, but still. It maybe should have a repo of its own instead of being part of the heap repo
oprypin has joined #crystal-lang
<Groogy> that only let's me associate a priority with a value though
<Groogy> I'd prefer something more akin to how std::priority_queue works
<Groogy> IT's still quite cumbersome to do sorted insert on array or deque which is what I am using currently
<Yxhuvud> huh? It should accept anything that implements <.
<Groogy> and a heap can very easily be implemented inside of an array
<Groogy> at least it's my prefered way
<Yxhuvud> a binary heap have worse complexities for some of the actions though. They tend to be O(logn) for everything - this one is better at some actions)
<Groogy> well yeah that's a binary heap, but heap in itself as a structure let's you put it in a sequential list regardless if it is binary or not
<Groogy> though I haven't looked exactly what implementation you've done
<Yxhuvud> tbh I'm not aware of any implementation of heaps that isn't binary heaps that fit in a sequential list.
<Groogy> Tenary heaps?
alex`` has joined #crystal-lang
alex`` has quit [Client Quit]
<Groogy> any *ary heaps fits into a sequential list
alex`` has joined #crystal-lang
<Groogy> I think you can fit fibonacci heap into an array as well?
alex`` has quit [Client Quit]
alex`` has joined #crystal-lang
<Groogy> I mean the point is the rules are very strict how the nodes are placed in a heap meaning you can always engineer where the next child is
<Yxhuvud> well ok, but that is just a generalization of binary heaps.
<Groogy> though most heaps can be put in a sequential list doesn't that every structure benefits from it, just as a small disclaimer
<Groogy> but as long as it is a heap you can squeeze it in I believe
<Yxhuvud> fibonacci is probably hard to put in an array. delete and decrement actions may be hard to handle
<Groogy> yours looks like a fibonacci
<Yxhuvud> it is not, but it is related. see https://en.wikipedia.org/wiki/Pairing_heap
<Groogy> aah
<Groogy> no I just remember it from school as a "fibonacci is the numbers following in a sequence"
<Groogy> and it's sortofish what the data strcture do
<Groogy> I don't remember the array data structure but there is one that would fit for fibonacci/pairing heap
<Groogy> and still be... sort of sequential in memory
<Groogy> cyclic array? Hmmm no
<Groogy> Also Crystal should have cyclic array and hybrid arrays
<Yxhuvud> but then, there is no shortage of data structures that probably should exist in stdlib. There is for example no linked list of any kind (though there are several places that use ad hoc implementations).
<Groogy> well Deque is a linked list technically isn't it?
<Yxhuvud> no, it doesn't have deletion at O(1) in the middle of it
<Groogy> ooooh
Creatornator has joined #crystal-lang
<Groogy> but it's not a circular array either
<Yxhuvud> well, it is a deque.
<Groogy> no but I mean if you not doing it as a linked list one way to implement one is as a circular array
<Groogy> or maybe it is a circular array, since you can rotate it
<Groogy> and rotation is not part of a deque structure usually
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akaiiro has quit [Remote host closed the connection]
akaiiro has joined #crystal-lang
alex`` has quit [Ping timeout: 248 seconds]
Creatornator has joined #crystal-lang
abm has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang