<FromGitter>
<tenebrousedge> I'm surprised that didn't happen a long time ago
<FromGitter>
<tenebrousedge> a while back, `&.` was proposed by some Crystallists for inclusion in Ruby
<FromGitter>
<ilanpillemer> Anyway.. tomorrow I will try understand better.
<FromGitter>
<tenebrousedge> kk
<FromGitter>
<ilanpillemer> and what happened?
<FromGitter>
<tenebrousedge> people hated it
<FromGitter>
<tenebrousedge> "Waaaagh why change Ruby? This is so illogical!"
<FromGitter>
<tenebrousedge> "Not intuitive! It sux!"
<FromGitter>
<tenebrousedge> I may be overstating the intelligence of the responses. It was profoundly disappointing, particularly in light of crazy decisions they've made since
alex``` has quit [Ping timeout: 240 seconds]
absolutejam has joined #crystal-lang
absolutejam has quit [Ping timeout: 240 seconds]
f1refly has quit [Ping timeout: 246 seconds]
f1refly has joined #crystal-lang
teardown has quit [Read error: Connection reset by peer]
teardown has joined #crystal-lang
<FromGitter>
<asterite> It was me who proposed &. for Ruby but they said it's not consistent, I don't know why
<FromGitter>
<asterite> Also, I think we could add sort_by to Hash, keys are stored in a separate Array, sorted by insertion. So sorting that secondary array would be really easy
<FromGitter>
<asterite> I might give it a try one of these days
<FromGitter>
<tenebrousedge> :plus1:
<FromGitter>
<asterite> Also, I forked Ruby because I recently found a bug in irb for Ruby 2.7 so I sent a PR some hours ago
<FromGitter>
<tenebrousedge> do you read everything that happens here?
<FromGitter>
<asterite> Haha, it sounds scary said like that ^_^
<FromGitter>
<watzon> Question. Is there a way to create an Array of class type definitions using the `Array(Type.class).new` method instead of `[] of Type.class`. Obviously it fails because `Type.class` isn't seen as a constant, so I assume I could just create a constant and pass that in.
<FromGitter>
<watzon> But is there a better way?
<FromGitter>
<asterite> I enter from time to time to read what you are all up to, maybe give a hand with something
<FromGitter>
<asterite> Most of the time I learn something new I didn't know about Crystal :-P
<FromGitter>
<tenebrousedge> o_O
<FromGitter>
<asterite> Like, ways to do algorithms, or clever macros
<FromGitter>
<asterite> Or cool usages of annotations
<FromGitter>
<tenebrousedge> @watzon don't all constants have to exist at compile time?
<FromGitter>
<watzon> Annotations are awesome
<FromGitter>
<asterite> I think Array(Type.class) should work
<FromGitter>
<watzon> Oh wait, you know what I think I made a mistake in my code
<FromGitter>
<watzon> Lemme check
<FromGitter>
<watzon> Yep, this is the problem with creating classes that have the same name as built-ins lol
<FromGitter>
<ImAHopelessDev_gitlab> "A PROGRAMMER'S BEST FRIEND"
<FromGitter>
<ImAHopelessDev_gitlab> that's how I feel with Crystal, well.. prob because I started with Crystal not Ruby. But damn that's so true.
<FromGitter>
<ImAHopelessDev_gitlab> There definitely is something with the elegance of the syntax the resonates with you
ht_ has quit [Quit: ht_]
<FromGitter>
<watzon> Crystal is pretty great
absolutejam has joined #crystal-lang
absolutejam has quit [Ping timeout: 276 seconds]
ma_ has joined #crystal-lang
dwdv_ has joined #crystal-lang
ma_ has quit [Read error: Connection reset by peer]
livcd has quit [Quit: Lost terminal]
absolutejam has joined #crystal-lang
<FromGitter>
<bajro17> @watzon I still wait to become your colleague
<FromGitter>
<bajro17> :D
<FromGitter>
<bajro17> to we work in same company
jrayhawk has quit [Quit: migration]
jrayhawk has joined #crystal-lang
livcd has joined #crystal-lang
Yxhuvud has quit [Read error: Connection reset by peer]
FromGitter has quit [Read error: Connection reset by peer]
FromGitter has joined #crystal-lang
flaviodesousa has joined #crystal-lang
absolutejam has quit [Ping timeout: 265 seconds]
<FromGitter>
<cserb> For how long does play.crystal-lang.org keep the code saved?
<oprypin>
cserb, this probably hasnt been given much thought, so "forever"
absolutejam has joined #crystal-lang
dwdv_ has quit [Ping timeout: 245 seconds]
<FromGitter>
<mavu> Morning, I am looking for an example/code for something I have not done before: β I am considering using Crystal to interface with Cisco UCCX CTI which is a protocol used in Cisco callcenter agent software. β This protocol is "bytes on a wire" over TCP, and I have never done such low level implemetation. β Could someone suggest a place where I can see some best practices and patterns how this kind of thing
<FromGitter>
<sam0x17> if it's over TCP and not over UDP, then it isn't really that low level. My advice is to make a bunch of structs to describe the different packets, and maybe use channels as an abstraction before you send/receive from network, so you can easily spoof the network for testing
<FromGitter>
<sam0x17> or whatever abstraction you like, channels sound fun though
<FromGitter>
<sam0x17> with a channel, you can have it accept only your packet structs, so it will be impossible to send invalid data in theory
<FromGitter>
<sam0x17> @mavu
<FromGitter>
<sam0x17> there are some really good java examples floating around for that
<FromGitter>
<sam0x17> as a lot of 300-level cs networking classes do that stuff
<FromGitter>
<sam0x17> things like implementing a UDP chat client (though you are over TCP)
<FromGitter>
<sam0x17> you'll have to do an unsafe_as cast most likely to get the raw bytes of the struct when sending
<FromGitter>
<sam0x17> in terms of best practices, just bear in mind that even with TCP, you can end up receiving arbitrary garbage at any time (especially in the case of a malicious client), so even if you trust the client, you should design things such that you are handling every possible error (or at least gracefully failing)
<FromGitter>
<sam0x17> that said, TCP guarantees data integrity to a certain extent, but in practice clients don't behave so you still have to distrust everything
<FromGitter>
<sam0x17> be careful if there are strings involved, that takes special handling when working with a binary protocol
<FromGitter>
<sam0x17> that's my 2 cents xD
<FromGitter>
<mavu> @sam0x17 thank you, those are helpful concepts. β So, I would make structs and add a custom serialization method that produces the bytes to send, or is there some mechanism already builtin to structs?
<FromGitter>
<mavu> Using channels as an abstraction layer is also nice too. I'll definitely do that.
alex``` has joined #crystal-lang
davic has quit [Ping timeout: 250 seconds]
dwdv_ has joined #crystal-lang
dwdv_ has quit [Ping timeout: 268 seconds]
<FromGitter>
<fenicks> Hi guys,
<FromGitter>
<fenicks> I'm trying to use db connection and my password (I can't change it now) has a '@'. How can protect the first '@' id db uri ?
<FromGitter>
<tenebrousedge> @andrius is this json data totally without any sort of schema?
<FromGitter>
<andrius> without schema, it is an further "event filter" vs real events. the only condition: it is a hash of stings or hash of hashes of strings
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter>
<andrius> in most of the cases I will use 'type' in filters but not always, other fields could be random
<FromGitter>
<andrius> and value for type is always a string
<FromGitter>
<tenebrousedge> the elegant way is to use JSON::Serializable or the `mapper` to put your data into structs
<FromGitter>
<tenebrousedge> beyond that, @Blacksmoke16 probably has some ideas
DTZUZO has joined #crystal-lang
<FromGitter>
<andrius> I am thinking on that but that would work only for first level, so ... ;)
<FromGitter>
<andrius> and this ```# Set custom event handler for event "ChannelStateChange" and channel β β #channel_id β β event_filter = JSON.parse(%({"type": "ChannelStateChange", ... [https://gitter.im/crystal-lang/crystal?at=5da5bba880e62056e40b0b31]
<FromGitter>
<Blacksmoke16> there is a dig method you could use maybe
<FromGitter>
<Blacksmoke16> otherwise, how many event types are there?
<FromGitter>
<sdogruyol> Hey everyone π Long time no see, how's it going?
<FromGitter>
<Blacksmoke16> o/
<FromGitter>
<sdogruyol> Hey @Blacksmoke16, thanks a lot for all the PRs and issues π
<FromGitter>
<sdogruyol> can't keep up with you :P
<FromGitter>
<Blacksmoke16> think you might have the wrong person :p
<FromGitter>
<sdogruyol> probably...haven't been sleeping well hahah
<FromGitter>
<mavu> Ok, I feel stupid, but how do I get from a Int(i.e. 42) to a 4 byte representation that is part of a protocol I'm trying to 'speak' to a server. β The server expects for example a message header with 4 bytes of content length and then 4 bytes of message ID. β how do I construct a Slice that has 4 bytes and represents the number 42 or whatever.
<FromGitter>
<mavu> I'm sure I am missing something completely obvious, but I cant see it.
<FromGitter>
<Blacksmoke16> if you're planning on using annotations for anything (serialization/validations for example) afaik granite is the only one that supports that
<FromGitter>
<andrius> @Blacksmoke16 sorry, were out, work meetings. There is about 50 events
<FromGitter>
<Blacksmoke16> ouch, yea deserializing the data into a struct or something would be most ideal
<FromGitter>
<Blacksmoke16> i assume most of those events have diff properties?
<swin>
@Blacksmoke16 Thanks! I've tried `clear` but it didn't work on my machine (said I need to install a library), I will try it again.
<FromGitter>
<Blacksmoke16> what library?
<swin>
@Blacksmoke16 `/usr/bin/ld: cannot find -lgmp (this usually means you need to install the development package for libgmp)`
<FromGitter>
<Blacksmoke16> does crystal work for you?
<swin>
Yes, I tried with `Kemal`
<FromGitter>
<Blacksmoke16> crystal uses that lib internally for some math related stuff
<FromGitter>
<andrius> yes, and I already have events
<FromGitter>
<Blacksmoke16> id imagine that wouldnt work locally for you, which clear is prob using big to support some column types
<FromGitter>
<Blacksmoke16> so would just have to install libgmp as it says
<FromGitter>
<andrius> now I implement event filters for callbacks/hooks. I want to get them triggered only when certain event with conditions will occur. I made `json_includes?` that does perform search
<FromGitter>
<sam0x17> happy to report that crystal is being used in a research capacity within the DoD ^_^
<FromGitter>
<tenebrousedge> whoo boy
<FromGitter>
<sam0x17> some scientists have a lot of autonomy, and use things like Rust etc, and one asked me several crystal questions
gangstacat has quit [Quit: Δis!]
<FromGitter>
<kinxer> @sam0x17 I assume you can't give more info than that (e.g. which lab/office)?
<FromGitter>
<sam0x17> nope ^_^
<FromGitter>
<vlazar> what's DoD?
<FromGitter>
<sam0x17> U.S. department of defense
<FromGitter>
<kinxer> A'ight. :) I use Crystal at work as a contractor, so it would be nice to know if our company could make some Crystal connections on the government side.
<FromGitter>
<sam0x17> @kinxer there is no general approval, but it is in use by a few isolated groups with autonomy, think national labs, AFRL, NRL type situations, etc
<FromGitter>
<kinxer> That makes sense. It's encouraging to know.
<FromGitter>
<vlazar> @sam0x17 I guess Crystal popularity can skyrocket soon? ;)
<FromGitter>
<sam0x17> 90% of that is rust but seems to be a little bit of crystal
<FromGitter>
<sam0x17> hah, well I would argue that python's skyrocketing is due to it being installed by default on all DoD machines, which steered AI research in the direction of python for the past 20 years
<FromGitter>
<sam0x17> and you can peg that on apt and a few package managers deciding to use python
<FromGitter>
<rishavs> Need some help. I am trying to parse html and get the url to embedded images from a site url. If the url itself is a path to the image, I would just take that. β I am getting an SSL error, which I am not able to grok; β `Unhandled exception: SSL_shutdown: error:14094123:SSL routines:ssl3_read_bytes:application data after close notify (OpenSSL::SSL::Error)` β β Here is a quick repl.it with the code
<FromGitter>
<sam0x17> @kinxer in the mean time, your best bet is to use something that can compile to an approved language like C++ (I think nim can?)
gangstacat has joined #crystal-lang
<hypercore>
is crystal as performant as go?
<FromGitter>
<sam0x17> its close enough that it depends on whatever skewed benchmark methodology you decide to use, am I right?
<FromGitter>
<kinxer> We mostly use C++ and Java, but one project uses Crystal, and I've had the chance to create some development support tools for the company in Crystal.
<FromGitter>
<sam0x17> gotcha
<FromGitter>
<sam0x17> acquisition people won't know what crystal is
<FromGitter>
<sam0x17> there is a 1% chance they will know what rust is
<FromGitter>
<kinxer> I've also been looking into Rust, since it can be compiled into a shared object that you can use from C, but I don't know if and when I'll be able to try using it.
<FromGitter>
<sam0x17> but its going to be probably over a decade before you can start getting gov contracts to use that stuff
<FromGitter>
<kinxer> Yeah, which is a bummer.
<FromGitter>
<kinxer> An understandable bummer, but a bummer nonetheless.
<FromGitter>
<sam0x17> but like I said, encourage the authors of your favorite language to add the ability to compile to C++
<FromGitter>
<sam0x17> then your conversation with acquisitions is just "it's in C++"
<FromGitter>
<sam0x17> stuff that runs on bytecode also has an in, so Kotlin is probably usable
<FromGitter>
<tenebrousedge> hypercore, you can Google for benchmarks. The ones I've seen are generally in the same ballpark, but Go seems to have an edge
<FromGitter>
<sam0x17> it's one of those things where it's almost always a benchmark specific difference (e.g. programmer knows one language better than the other and doesn't know how to take advantage of X optimization, so benchmark is biased)
<hypercore>
they're both LLVM, does that mean performance is theoretically similar?
<FromGitter>
<sam0x17> right
<FromGitter>
<sam0x17> all the compiled LLVM languages are within the same magnitude of performance
<hypercore>
how does amber/lucky compare to phoenix?
<hypercore>
when would you use one over the other?
<FromGitter>
<rishavs> @tenebrousedge , i should be able to use blocks with Client.get as is shown here https://crystal-lang.org/api/0.31.1/HTTP/Client.html#get(url:String%7CURI,headers:HTTP::Headers?=nil,body:BodyType=nil,tls=nil,&block)-class-method
<FromGitter>
<rishavs> @kinxer , your code works but I am more confused now. AM i not supposed to use the block version of Http::client.get?
<FromGitter>
<tenebrousedge> Maybe you should be able to, but if it throws an error...
<FromGitter>
<kinxer> @rishavs I'm not sure. I suspect it has something to do with the block ending before the SSL context expects it to end, though.
<FromGitter>
<rishavs> Should I log this as a bug?
<FromGitter>
<tenebrousedge> SSL issues are usually misconfiguration rather than a problem with Crystal
<FromGitter>
<tenebrousedge> which is not to say filing an issue would be a bad idea, but it's probably good to research this issue thoroughly first to make sure that this is incorrect behavior
davic has quit [Read error: Connection reset by peer]
<FromGitter>
<vlazar> > <hypercore> wow rocket (the rust framework is has a terrible score on that benchmark) β β not necessarily mean it's good benchmark, can be some misconfiguration
<FromGitter>
<vlazar> I mean implementation for rocket
<FromGitter>
<Blacksmoke16> the image var is kinda useless
<FromGitter>
<rishavs> I am trying to use pretty much no libraries if I can help it. On the client side, I've got vanilla js going on without using any bundler
<FromGitter>
<naqvis> @rishavs your initial code is failing due to abnormal IO termination, if your main intention is to validate the URL then I would suggest to go with `head` instead of `get`
<FromGitter>
<sam0x17> TLDR: minify css, javascript, and/or HTML directly from within crystal, without having nodejs installed. Duktape is a lightweight c++ based runtime environment for javascript, and duktape.cr provides very complete bindings
<FromGitter>
<sam0x17> thanks for the tip, I wasn't aware
<FromGitter>
<sam0x17> the tricky part is finding a version with npm stripped out
<FromGitter>
<sam0x17> *node
<FromGitter>
<sam0x17> has to be vanilla ES5
<FromGitter>
<vlazar> I see
return0e_ has quit [Remote host closed the connection]
<FromGitter>
<vlazar> how is the speed of Duktape btw, is it good enough compared to v8?
return0e has joined #crystal-lang
<FromGitter>
<sam0x17> I think they have benchmarks on their site. It's fast
<FromGitter>
<sam0x17> best part is its basically a single header file
<FromGitter>
<sam0x17> versus V8 which is like LOL
<FromGitter>
<sam0x17> I wouldn't use it to directly serve a live page though, more like cache the result in a variable and only re-minify if there is a change, or just minify at compile time sort of thing
<FromGitter>
<sam0x17> but that goes for all minification imo
<FromGitter>
<Blacksmoke16> `[arr of options].any? { |val| str.ends_with? val }`
<FromGitter>
<rishavs> Thanks!
dwdv_ has joined #crystal-lang
<FromGitter>
<sam0x17> for optimality, you should extract the file extension, use a `Set` of the file extensions you want, and see if `set.includes?(ext)` to avoid the if chain.
<FromGitter>
<Fryguy> `File.extname` gets you the extension
<FromGitter>
<kinxer> It's strange to me that the constant tuple is slower than the literal tuple...
<FromGitter>
<ilanpillemer> in `Go` they dont bother to provide Set. The docs just say use Hash.
<FromGitter>
<ilanpillemer> isnt a constant compiled at compile time?
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
<FromGitter>
<tenebrousedge> yes
dannyAAM has joined #crystal-lang
<FromGitter>
<ilanpillemer> so normally constants are faster, unless a compiler can work out that a literal can be changed to a constant during optimisation?
<FromGitter>
<ilanpillemer> unless I am just still too much of a novice at language hacking
<FromGitter>
<kinxer> I thought that non-class constants were inlined, so I'd expect the constant and literal tuple to be about equivalent in speed.
<FromGitter>
<tenebrousedge> I think that tuples are fast because they have a defined size
<FromGitter>
<kinxer> Yeah, I'm not surprised that tuples are the fastest, but I am surprised about how much of a difference there is between using a constant tuple and a literal tuple.
<FromGitter>
<kinxer> And that the literal tuple is faster.
<FromGitter>
<tenebrousedge> I mean, a constant is a reference, right?
<FromGitter>
<asterite> @Fryguy bad benchmark, you should create Set, array, etc., outside of the block, otherwise you are benchmarking creating those structures too
<FromGitter>
<Fryguy> that was intentional
<FromGitter>
<kinxer> I thought that it was a reference when its type inherited from `Reference` or `Object` and inlined when its type inherited from `Value` (as `Tuple` does).
<FromGitter>
<asterite> ah, okay
<FromGitter>
<Fryguy> I moved 1 set out of the block into a const and the tuple is technically static as well
<FromGitter>
<kinxer> @Fryguy Did you run your benchmark with `--release`?
<FromGitter>
<Fryguy> was just trying to get a comparison with building it over and over
<FromGitter>
<Fryguy> @kinxer yes
<FromGitter>
<kinxer> Hm... I'll change my benchmark so it doesn't use `File.extname`.
<FromGitter>
<Fryguy> yeah I removed the File.extname because that would hav eto be done regardless, so it's noise in the benchmark
<FromGitter>
<kinxer> Though it is more indicative of how much actual effect differing the data structure will have.
<FromGitter>
<ilanpillemer> this is clearly *not* idiomatic, but how do you these do until strange conditions in idiomatic crystal?
<FromGitter>
<tenebrousedge> `while` should generally be used when the maximum number of iterations cannot be known
<FromGitter>
<tenebrousedge> here there seems to be a knowable maximum
<FromGitter>
<Fryguy> if there's a knowable count, then one can also do `counter.times {}` or `1.upto(counter) {}`
<FromGitter>
<tenebrousedge> or `(0...str.size).map`
<FromGitter>
<tenebrousedge> which it seems that the index is being used here
<FromGitter>
<Fryguy> that screenshot reminds me of hacker movies where the hacker hooks up a device to a computer or a safe and it slowly rips through individual digits until it figures out the password
<FromGitter>
<tenebrousedge> I would probably create an iterator that would yield up the initial-zero hashes
<FromGitter>
<tenebrousedge> but @ilanpillemer may be tired of me saying, "create an iterator" by now
<FromGitter>
<ilanpillemer> there isnt a knowable maximum
<FromGitter>
<Blacksmoke16> im not sure i see the problem
<FromGitter>
<lbarasti> The type signature of the function really should prevent a user from calling a non-existing method on it, no matter what its runtime is
<FromGitter>
<Blacksmoke16> `A` doesnt make any promise there should be a method to call
<FromGitter>
<Blacksmoke16> `def f` is within the class not related at all to `A`
<FromGitter>
<Blacksmoke16> https://carc.in/#/r/7t79 is what you should do if you want to ensure includers implement that method
<FromGitter>
<lbarasti> I don't mean to ensure includers to implement a method, I mean to ensure that users of a function are restricted in the methods they can call on the input parameter
<FromGitter>
<Blacksmoke16> wouldnt that just work by default tho?
<FromGitter>
<Blacksmoke16> compiler would know x doesnt implement method y and error
<FromGitter>
<lbarasti> let me explain my rationale for this. In golang they have the concept of read-only channels, write-only channels and regular channels
<FromGitter>
<lbarasti> in a function signature, they will use channel type that makes sense in the context of the function
<FromGitter>
<lbarasti> this way, a regular Channel passed by the caller is seen as either a read-only or a write-only one
<FromGitter>
<lbarasti> I thought they'd achieve that by having Channel inherit from both the other two, they might be taking a different approach, though
<FromGitter>
<lbarasti> anyhow, it would be good to find another compiler that behaves like the crystal one in this scenario, just to check general expectation
<FromGitter>
<Blacksmoke16> use overloaded methods one for each channel type?
<FromGitter>
<lbarasti> yes, I could make them private in a subclass of Channel, but that looks a bit off to me
<FromGitter>
<Blacksmoke16> sorry im still not sure i see the problem, isnt that what you want?
<FromGitter>
<Blacksmoke16> allow both types thru but error if the method they want isnt defined?
<FromGitter>
<lbarasti> No, I'd like the function signature to dictate what methods can be called on the parameters. I really appreciate you looking into this BTW @Blacksmoke16
<FromGitter>
<bajro17> @ilanpillemer I just sometimes scare that crystal is not stable enough or I worry how to find libraries but I work with crystal long time for myself, also I scare how to suggest to clients crystal and its still not version 1.0. But when I see a lot of big websites in production using crystal also some important people in IT world use it I be more motivated to keep use it
<FromGitter>
<lbarasti> @asterite I'm thinking it's OK that the compiler analyses the subtypes, but it could then `ceil` the parameter type to the type in the function signature, that sounds doable, right? It would use the same mechanism, just on a superclass/module
<FromGitter>
<ilanpillemer> @tenebrousedge that fails to get the right answer⦠but I will see if I can get it working
<FromGitter>
<ilanpillemer> whatβs the point of abstract classes then?
<FromGitter>
<absolutejam_gitlab> It's a contract for child classes to full
<FromGitter>
<absolutejam_gitlab> fill*
<FromGitter>
<lbarasti> alternatively, `a : A = B.new` could be expanded to `a = B.new.as(A)` π₯
<FromGitter>
<Blacksmoke16> id rather just add the .as(A) manually
<FromGitter>
<Blacksmoke16> are cases where you dont want that to happen
<FromGitter>
<ilanpillemer> @tenebrousedge managed to fix first bug
<FromGitter>
<ilanpillemer> but the second I am unsure about.
<FromGitter>
<ilanpillemer> is not necessarily the first 8
alex``` has quit [Remote host closed the connection]
ht__ has quit [Quit: ht__]
<FromGitter>
<sam0x17> @lbarasti I think that has to do with how crystal supports unspecified types on method params and in other places, and then bases things off of what methods you call on the object
<FromGitter>
<sam0x17> I am also surprised that that compiles, however
<FromGitter>
<ilanpillemer> is there a method to give the most common value in an array?
<FromGitter>
<ilanpillemer> ie the mode?
<FromGitter>
<tenebrousedge> you could do `max_by {|v| arr.count(v) }` but the performance will be terrible
<FromGitter>
<ilanpillemer> I dont quite get the max by last?
<FromGitter>
<tenebrousedge> the last value in the tuple
<FromGitter>
<ilanpillemer> so tally gives a hash
<FromGitter>
<ilanpillemer> Max by changes to tuples?
<FromGitter>
<tenebrousedge> `max_by` yields up the values of the hash as `{Key, Value}`
<FromGitter>
<tenebrousedge> (a tuple)
<FromGitter>
<ilanpillemer> just like a to_a?
<FromGitter>
<tenebrousedge> yes
<hypercore>
should "Postinstall script/precompile_tasks" take a while? (one of the outputs after fetching shards)
<hypercore>
i've only ever used dynamic languages before, is this just slow because crystal is compiled?
<oprypin>
hypercore, this is entirely specific to the shard
<oprypin>
could be a C library being compiled or literally anything
<oprypin>
(incl. deleting everything on your disk π¬)
<hypercore>
oh ok, well it's the dependencies for the lucky framework
<hypercore>
taken about 5 minutes so far
<oprypin>
that doesnt sound good
<hypercore>
it is running on a tiny vps, not sure if that matters or not
<oprypin>
oh yes it does
<oprypin>
the poor thing coulve ran out of RAM long ago and struggling on swap
<hypercore>
oprypin: ah that could be why then...
<oprypin>
crystal needs a ton of ram
<hypercore>
does crystal have higher hardware requirements than elixir? i saw some benchmarks where the "RAM used" for crystal was much lower than that for elixir, but elixir runs fine on a $5 VPS
<hypercore>
or is that just for the compilation step?
<oprypin>
compilation
<hypercore>
gotcha
<hypercore>
trying with 2GB now
<FromGitter>
<ilanpillemer> how you refer to the top namespace?
<FromGitter>
<Blacksmoke16> `::Type`
<FromGitter>
<ilanpillemer> if I want to refer to a variable in the top namespace?
<FromGitter>
<Blacksmoke16> `::var` would prob do it
<FromGitter>
<ilanpillemer> so class_property is like property but for @@?
<FromGitter>
<bew> yep
<FromGitter>
<ilanpillemer> nice
<FromGitter>
<bew> @Blacksmoke16 what's your timezone? it looks like you're "always there"^^
<FromGitter>
<Blacksmoke16> US east coast
<FromGitter>
<bew> oh, so it's the end of the afternoon for you now ~ ?
<FromGitter>
<Blacksmoke16> 6:45pm yea
DeBot has quit [Quit: Crystal IRC]
asterite has quit [Quit: Bye]
jhass has quit [Quit: Bye]
<FromGitter>
<bew> that explains it, in europe timezone even if I try to stay late you'll always be there :P I really need to sleep now, it'll makes me stop saying uninteresting things
<FromGitter>
<Blacksmoke16> :p
absolutejam has quit [Ping timeout: 240 seconds]
<FromGitter>
<Blacksmoke16> plus i keep it up at work so it seems like that haha
<FromGitter>
<bew> I did that at my last internship, but I think I spent a bit too much time on crystal when I should be working... now I try to reduce my time exposed to my github notifications if I want to work