ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.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
faustinoaq has joined #crystal-lang
illyohs has quit [Quit: Leaving]
<FromGitter> <sam0x17> is there a mechanism in crystal that allows dynamic mapping of unmatched methods on an Object to some method that I specify?
<FromGitter> <sam0x17> update: found what I need -- crystal has a method_missing macro, though this is compile time, this is actually what I need
<FromGitter> <paulcsmith> There is also the forward_missing_to macro which is a thin wrapper over method_missing
Kug3lis has quit [*.net *.split]
handicraftsman has quit [*.net *.split]
sevensidedmarble has quit [*.net *.split]
handicraftsman has joined #crystal-lang
Kug3lis has joined #crystal-lang
sevensidedmarble has joined #crystal-lang
yopp has quit [Ping timeout: 240 seconds]
yopp has joined #crystal-lang
DTZUZO has quit [Ping timeout: 268 seconds]
<FromGitter> <jwaldrip> Why are there two 0.24.1 tags?
vivus has quit [Quit: Leaving]
greengriminal has joined #crystal-lang
<FromGitter> <marksiemers> One has a `v` - I'm assuming that was a mistake
DTZUZO has joined #crystal-lang
faustinoaq has quit [Ping timeout: 240 seconds]
greengriminal has quit [Read error: Connection timed out]
greengriminal has joined #crystal-lang
<FromGitter> <HCLarsen> There's a 0.24.1 tag? Does that mean it's ready to install?
dhk has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
cyberarm has quit [Ping timeout: 268 seconds]
cyberarm has joined #crystal-lang
dhk has quit [Quit: Leaving]
<FromGitter> <bararchy> Pre-release @HCLarsen
<FromGitter> <HCLarsen> Ok.
<FromGitter> <HCLarsen> Got a question about shards, anyone here good with working the shards.yml file?
<FromGitter> <HCLarsen> Nevermind, got it.
_whitelogger has joined #crystal-lang
mbarbar has quit [Ping timeout: 272 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 264 seconds]
mark_66 has joined #crystal-lang
flaviodesousa has joined #crystal-lang
<olbat> hi there
rohitpaulk has joined #crystal-lang
<olbat> mjago, what do you mean by "combining accents" ?
<olbat> if it's about Unicode normalization, I think you should take a look to https://olbat.github.io/icu.cr/ICU/Normalizer.html
mbarbar has joined #crystal-lang
<FromGitter> <bararchy> @ylluminate Not sure if you are in gitter, but if you are, then let's discuss the need for Yet Another Concurrency github thread here instead in issues?
<FromGitter> <bararchy> @ylluminarious
DTZUZO has joined #crystal-lang
<FromGitter> <mjago> @olbat Thanks for replying - I mean the case of unicode where accents are added as a following codepoint to say ‘E’ or `e’ and then get counted as a character in String.size. Currently I delete such characters before checking size.
<FromGitter> <mjago> I’ve bookmarked your icu shard which looks very interesting, and will definately take a look when time allows!
<FromGitter> <mjago> *definitely
<FromGitter> <mjago> @olbat http://www.fileformat.info/info/unicode/char/0301/index.htm for instance
DTZUZO has quit [Ping timeout: 272 seconds]
claudiuinberlin has joined #crystal-lang
hellomyfellow has joined #crystal-lang
<hellomyfellow> hello! how can I restart a .each loop somehow? that hes doing it again
<olbat> okok, I think it depends on how the size is measured in Crystal (Ruby have String#size and String#bytesize for instance)
<hellomyfellow> theres no redo
<olbat> btw you may also be interested by https://en.wikipedia.org/wiki/Unicode_equivalence
<olbat> (there is an example with é and e+◌́)
<hellomyfellow> its not possible to restart a each loop?
<olbat> (they discuss your issue here too: https://sourceforge.net/p/icu/mailman/message/20444353/)
<FromGitter> <bew> Hellomyfellow put it in a loop?
<hellomyfellow> oh thank you very much
<FromGitter> <bew> Why would you want to restart a loop?
<hellomyfellow> reasons
<FromGitter> <lhz> better rewrite with `loop` or `while` then, as you're no longer just iterating.
<FromGitter> <lhz> makes it easier to spot something special going on when reading the code too
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
<Papierkorb> hellomyfellow: If you don't expect many redo's, you can also use recursion (Call the .each method in itself again)
<hellomyfellow> how do I do that?
<hellomyfellow> each()´?
<Papierkorb> Just call the method containing the each?
<hellomyfellow> no method is containing the each
<Papierkorb> Just put it into one?
<hellomyfellow> but why
<hellomyfellow> because then i am calling the each in the each
<hellomyfellow> and this is weird
<Papierkorb> That'd be simply recursion?
rohitpaulk has quit [Ping timeout: 264 seconds]
<Papierkorb> Saves you from having additional surrounding looping logic (the while loop) with its bookkeeping (using a "done" variable to track progress or using break somewhere manually to achieve the same)
<hellomyfellow> but now i have the problem again that i cant use the variables from the outside of the method. I will need to define them in the method. And if i call it then he redefines the variables. But i dont want that
<hellomyfellow> its annoying that you cant define @ variables on top level
<Papierkorb> Nah that's fine. Are you really writing just a script?
<hellomyfellow> yes
<hellomyfellow> why is that fine? maybe others have other types of how they write their programs. Then this is really bad
<Papierkorb> Just throw the code of your script into a class?
<hellomyfellow> i actually never do OOP
<Papierkorb> No it's not. ivars on the global scope don't make sense, as that'd make them globals. We threw globals out for good reasons.
<Papierkorb> Huh why no OOP? Crystal is a OOP lang, not imperative, and even in those code usually ends to use "object oriented" approaches
<hellomyfellow> im just not used to make OOP code
<hellomyfellow> and in my class i would just have one method except initialize.. and thats weird
<hellomyfellow> because i just have the each thing
rohitpaulk has joined #crystal-lang
DTZUZO has joined #crystal-lang
<hellomyfellow> how can I dynamiclly calculate something?
<hellomyfellow> like
<hellomyfellow> operator = "+" ; print 1operator1
<FromGitter> <bararchy> ```def add(x,y) ⏎ x+y ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5a3263f7a2be4668289e362f]
<FromGitter> <bararchy> ?
<Papierkorb> You don't. Use a case statement to map "function names" to an implementation
<FromGitter> <bararchy> oh, Maybe I didn't got the question
<FromGitter> <schoening> Does (or will there / can there) come VSCode support for crystal in the sense that I get errors inside the editor rather than only when I compile?
<FromGitter> <alehander42> usually hashtables are useful for mapping function names to functions too
<FromGitter> <alehander42> and if a name is available at compile time, maybe a macro
<crystal-gh> [crystal] straight-shoota opened pull request #5382: Time parser raises if timezone is missing (master...jm-time-parser-raise) https://git.io/vbVJw
<FromGitter> <demerphq> where would be the right place to post a critique of funny_hash()?
<FromGitter> <demerphq> that is: the hash function you guys use.
bmcginty has quit [Ping timeout: 268 seconds]
<FromGitter> <bararchy> Is there a way\shard\builtin way to work on arrays? (sum two arrays, etc..)
<Papierkorb> There has been a long running GH pullrequest/issue where we discussed that demerphq
bmcginty has joined #crystal-lang
<FromGitter> <demerphq> ive been trying to find the right one, i found a bunch of possibles...
<FromGitter> <demerphq> you guys sure chatter a lot on your PR's. :-)
<FromGitter> <demerphq> which is normally a good thing, just for me, i dont know which one to post on.
<FromGitter> <demerphq> but i definitely have some concerns you guys should be aware of.
<Papierkorb> demerphq, iirc it has already been merged. As such, I'd open a new GH issue instead of bumping a closed PR
<FromGitter> <demerphq> fwiw, i put a lot of effort into securing perls hash function.
<FromGitter> <demerphq> and making it fast. :-)
<Papierkorb> For security stuff that's not pants-on-fire bad for non-pre releases of Crystal, just open a public issue on Github
<FromGitter> <demerphq> ok.
<FromGitter> <demerphq> one thing that would help me write this up, can someone point me at the code that seeds the hash function? I do not know crystal at all.
<Papierkorb> https://github.com/crystal-lang/crystal/blob/master/src/crystal/hasher.cr#L84 And here it gets seeded by grabbing 2x64bit of memory and filling it up with Random::Secure bytes (Which should use the most secure source of randomness on the system)
<FromGitter> <demerphq> ok. I thought that was it. Thanks.
<FromGitter> <demerphq> FWIW, funny_hash() has a zero-trap. In that if the seed is 0, and the input nulls of any length where length mod 8 == 0, then you get a 0 hash.
<Papierkorb> Is that a general x-trap, in that if seed = x, and input.length is divisble by 8, the hash results in x?
<Papierkorb> Or is 0 somehow special?
<FromGitter> <demerphq> 0 seed is special.
<FromGitter> <demerphq> i realize it is in 1 in 2**128 chance, but from a theoretical POV a hash function shouldnt have any zero traps.
<Papierkorb> Is there something wrong when you'd simply disallow a 0 seed?
<Papierkorb> Cryptographically that is
<Papierkorb> (retrying it a few times in such a case and bailing on failure)
<FromGitter> <demerphq> ive used strategies like v ^= mask; v+=!v;
<FromGitter> <demerphq> I assume you seed the hash function at process startup.
alex`` has joined #crystal-lang
<Papierkorb> That code on lines 84/85 is run at startup, yes
<FromGitter> <demerphq> this hash function has other issues too. I guess i should just write them up.
<Papierkorb> Yup
<FromGitter> <demerphq> Can you give me some insight into what your priorities are?
<FromGitter> <demerphq> Speed? Security? Memory Footprint? Distribution?
<FromGitter> <bararchy> Speed and easy of use i'll say
<FromGitter> <bararchy> :)
<Papierkorb> Safety over run-time (Within reason of course) over memory consumption
<FromGitter> <bararchy> "Sleek like Ruby, fast as C"
<FromGitter> <demerphq> a hash function is a hash function. i wouldnt expect there to much difference in ease of use.
<Papierkorb> And sure enough the public API shouldn't have to change, but it shouldn't have to either
DTZUZO has quit [Ping timeout: 272 seconds]
<FromGitter> <demerphq> I see you expose hash values
<Papierkorb> In which way?
<FromGitter> <demerphq> dont you have a .hash method that returns the hash for a thing? Or am I misguessing about some of this code?
<Papierkorb> You can just call Object#hash and get a hash of anything, yes
<FromGitter> <demerphq> the problem with that, is if the hash value leaks to an attacker, the attacker can use it to do a seed discovery on your hash function.
<FromGitter> <demerphq> and it looks like you are using the 32 bit version of funny hash.
<FromGitter> <demerphq> which combines poorly.
rohitpaulk has quit [Ping timeout: 256 seconds]
<FromGitter> <demerphq> with perl we dont expose hash values.
<FromGitter> <demerphq> so they only have the low K bits of the hash value to attack, which makes it much harder.
<Papierkorb> that "Exposing" won't change, but the seed shouldn't be recoverable of course
<FromGitter> <demerphq> my point is more or less that because you expose the hashes you probably need a higher level of security.
<Papierkorb> Crystal is implemented in Crystal, to use Hash (the hashmap class), there has to be the hashing function available
<FromGitter> <demerphq> it sounds like you have a very similar operating model to Perl, other than this point.
<FromGitter> <demerphq> Hrm. You cant link to C for something like this?
<Papierkorb> No that would not be accepted.
<FromGitter> <demerphq> I see.
<Papierkorb> And doesn't make any sense for Crystal
<FromGitter> <demerphq> That makes life a little harder.
<oprypin> no it doesn't
<Papierkorb> I myself would be strongly against it. Crystal is not a black box like VM based languages
<FromGitter> <demerphq> I am not trying to suggest you change your rules or anything, please dont me wrong.
<FromGitter> <demerphq> I understand these decisions.
<Papierkorb> Is Perl that finicky that you can't get a quick hash from something if you need it?
<FromGitter> <demerphq> A quick hash from something?
<FromGitter> <demerphq> There are tons of modules to use for hashing.
<FromGitter> <demerphq> We dont expose the internals processes hash values.
<Papierkorb> We prefer the few good over the tons of questionable
<FromGitter> <demerphq> and we actively take measures to make it harder for an attacker
<Papierkorb> in terms of implementation
<Papierkorb> So that the next guy implementing something can rely on the solid implementation instead of having to home grow something, creating application-specific vulns
<FromGitter> <demerphq> i think i get you
<FromGitter> <demerphq> but its a question of tradeoffs.
<FromGitter> <demerphq> there is no one size fits all.
<FromGitter> <demerphq> if you want solid then you should use SipHash.
<FromGitter> <demerphq> But its slow.
<FromGitter> <demerphq> If you want fast then you should Tabular Hashing.
<FromGitter> <yxhuvud> yes, the speed was the deciding factor against siphash.
<FromGitter> <demerphq> But it requires a fair bit of ram.
<Papierkorb> static or dynamic?
rohitpaulk has joined #crystal-lang
<FromGitter> <demerphq> latest versions of perl use Tabular Hashing for keys under 24 bytes.
<FromGitter> <yxhuvud> it is a pity you weren't here while the 0.24 hash algo PRs was open. I'd love to see you discuss it with funnyfalcon
<FromGitter> <demerphq> the reason I am here is I occasionally vanity google smhasher and my name.
<FromGitter> <demerphq> you guys mentioned me.
<FromGitter> <demerphq> obviously I dont vanity google myself that often. ;-)
<FromGitter> <demerphq> So, if you want fast and secure then you have to pay with memory. So for instance, you are using 32 bit hashes, so for tabular hashing you would need 1k per byte you want to hash.
<Papierkorb> Static or dynamic?
<FromGitter> <demerphq> what do you mean static or dynamic?
<FromGitter> <demerphq> the state would be allocated at startup like you do now.
<FromGitter> <demerphq> with the seed.
<Papierkorb> static lookup tables, or dynamically per hashing operation?
<FromGitter> <demerphq> just it would be MUCH longer.
<FromGitter> <demerphq> static for process lifetime.
<FromGitter> <demerphq> tabular hashing is as secure as you can get, and properly seeded as random as your rng.
<Papierkorb> I don't see much issue with 4-8K of additional memory in today times. I doubt that anybody would notice lul. Though people have shown some interest to run Cr on µControllers, where people would actually care. Ah well.
<FromGitter> <demerphq> and fast as heck.
<Papierkorb> Is that basically a 32bit word per byte (256 * 4 = 1K), per position (hence per byte to hash), that get looked up and then XORed into one another?
<Papierkorb> Sounds like that
<Papierkorb> So you'd need 4K for 32 bit, but 16K of lookup for 64bit hashes due to the larger wordsize?
alex`` has quit [Ping timeout: 252 seconds]
<FromGitter> <demerphq> yeah.
<FromGitter> <demerphq> er
<FromGitter> <demerphq> (256 * sizeof(hash) * max_length_you_can_hash_this_way)
<FromGitter> <demerphq> that should be a division there
<Papierkorb> max "length" of input bytes?
<Papierkorb> Basically infinite
<FromGitter> <demerphq> no, you dont want to use tabular hashing for all strings.
<FromGitter> <demerphq> you want to fallback to something else once its longer than the size you decided.
<Papierkorb> We hash everything, not only String
<FromGitter> <demerphq> yes, i get it.
<FromGitter> <demerphq> to a hash function all data is a string.
<FromGitter> <demerphq> :-)
<Papierkorb> And we typically don't even easily know the total "length" of an object either
<FromGitter> <demerphq> so for instance blead-perl uses tabular hashing for strings up to 24 bytes, and then uses a block oriented hasher for longer strings, either Zaphod32 or StadtX.
alex`` has joined #crystal-lang
<FromGitter> <demerphq> for what its worth, tabular hashing tends to really win on short strings, as it doesnt need a finalizer.
<FromGitter> <LuckyChicken91_twitter> hello. what can i do here? :/ ⏎ Invalid memory access (signal 11) at address 0x7fffc40f2ff8
alex`` has quit [Ping timeout: 255 seconds]
lvmbdv has joined #crystal-lang
<FromGitter> <sam0x17> code plz @LuckyChicken91_twitter
Tom_Hardy has joined #crystal-lang
Tom_Hardy has quit [Client Quit]
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <codenoid> hi, is there any library for developing GUI with crystal
<FromGitter> <bararchy> @codenoid a few, mainly sfmlcr , QT5
rohitpaulk has joined #crystal-lang
<lvmbdv> Why can't I use lookbehind assertion in regex ;~;
<lvmbdv> e.g. /(?<=:)\w+/
<lvmbdv> it's definitely valid in PCRE
<oprypin> lvmbdv, it should work, maybe you're not using it correctly, or your system's PCRE is botched somehow
<oprypin> pls give complete example
<FromGitter> <codenoid> thank @bararchy
<lvmbdv> any pastebin you prefer oprypin?
<oprypin> lvmbdv, https://bpaste.net
<oprypin> lvmbdv, do you need text parsing functionality of StringScanner or just find something in a string?
<lvmbdv> I do need it
<lvmbdv> To parse IRC messages
<oprypin> lvmbdv, here's a tip https://carc.in/#/r/38pq
<lvmbdv> oh weird, so that's how the scanner behaves with non-capturing groups
<lvmbdv> thanks oprypin
<oprypin> lvmbdv, not sure if that's right
<lvmbdv> thanks for the lib recommendation too, but this is a learning project
<oprypin> i just think it's pinned to the current position in the stream
<oprypin> as if it had '^' at the beginning but '^' moves as you progress thru the string, if you know what i mean
<lvmbdv> i guess it tries to look behind /^/
<oprypin> eh ok now i fully confused you
alex`` has joined #crystal-lang
<lvmbdv> why, it makes sense
<oprypin> lvmbdv, it just cant jump forward, you know? https://carc.in/#/r/38ps
<FromGitter> <ArtLinkov> Crystal newbie here. How can I set an instance variable to be of a type that I determine? like say, from a specific array. I tried to do something like this: TYPE = [:a, :b, :c]. and in the initialize I write def initialize(parameter : TYPE= :a). but when I try to run I get an error "argument must have a default value". what am I missing?
<oprypin> ArtLinkov, 'TYPE' is not a type, and ':a' is not a type
<oprypin> this is just nonsense
<FromGitter> <unreadable> in this case use type1 | type2 | type3 so on
<FromGitter> <unreadable> he's looking to initialize object, but he's not sure what type could be
<FromGitter> <ArtLinkov> I wanted to avoid Enum to do it in the class itself
<FromGitter> <unreadable> did u try to use multiple types?
<FromGitter> <unreadable> like mytype = Int32 | String | etc
<FromGitter> <ArtLinkov> yes, but I want to create new types specific for this program
<FromGitter> <unreadable> Recursive types maybe?
<FromGitter> <unreadable> alias*
<oprypin> aren't all types outside of stdlib specific for this program?
<oprypin> maybe you'll just have to provide a better explanation because made up syntax is not doing it
mbarbar has quit [Ping timeout: 240 seconds]
<FromGitter> <ArtLinkov> lol as I said, newbie here :)
<FromGitter> <ArtLinkov> I'll try to explain the reasoning
<FromGitter> <unreadable> no it's ok, I'm newbie too
<FromGitter> <unreadable> are u trying to parse some data?
<FromGitter> <unreadable> I know I've run in this issue one time
<FromGitter> <ArtLinkov> I want to initialize a class that has a property, lets say the class is cat but it could be only white, grey or black. and depending on the color I want the initialization to be a bit different
<FromGitter> <ArtLinkov> is it possible?
<FromGitter> <unreadable> that sounds like multiple constructors
<FromGitter> <unreadable> not that sure if you can overload the constructor in crystal
<FromGitter> <unreadable> lemme check the docs
<oprypin> it really should be multiple classes!
<FromGitter> <unreadable> or use inheritance
<oprypin> ArtLinkov, it's not possible to distinguish methods by the provided values, only by their types
<FromGitter> <ArtLinkov> @FromIRC multiple classes will be very code inefficient in my case
<FromGitter> <ArtLinkov> I see, thanks for the help guys :) I'll try enum
<FromGitter> <unreadable> every problem could be solved in at least 2 ways
<FromGitter> <unreadable> there's should be something you're looking for
<FromGitter> <unreadable> paste the enum example and I'll try to help you
<oprypin> yeah maybe show us some suboptimal but actually working solution then we'll try to improve it
<FromGitter> <unreadable> @ArtLinkov you can also paste what you're looking to achive in c/c++/js/python/go/java/ruby
<FromGitter> <LuckyChicken91_twitter> i want to check if ARGV[0] is empty. But crystal doesnt even lets me check it because it directly says its out of bounds when i write ARGV[0]
<FromGitter> <paulcsmith> @LuckyChicken91_twitter ARV[0]?
<FromGitter> <bararchy> @ArtLinkov something along the lines of multiple `def initialize` where each had initialize(foo : Bar) , initialize(foo : Too) etc.. In one class ? Of so you can create multiple initialize functions , and what ever type is sent into the .new will call the relevant initialize function
<FromGitter> <paulcsmith> The `?` at the end tells Crystal that it might be `nil`
<oprypin> LuckyChicken91_twitter, so check ARGV.size before that
<FromGitter> <ArtLinkov> I think I solved it. I make an array of symbols before initialization like colors = [:grey, :white, :etc] then when initializing I request that the color instance variable will be a symbol and if it's not in my list I raise an exception. Not sure it's the most elegant solution but it works :)
<FromGitter> <LuckyChicken91_twitter> oh ok thank you very much
<FromGitter> <unreadable> @LuckyChicken91_twitter what about checking the size 😄 ?
<FromGitter> <unreadable> nvm, it's fixed
hightower3 has joined #crystal-lang
hightower2 has quit [Read error: Connection reset by peer]
<FromGitter> <sdogruyol> it's interesting and amazing to see that Crystal allows no parens with single line block method calls like this https://play.crystal-lang.org/#/r/38q2
<FromGitter> <unreadable> indeed
<FromGitter> <yxhuvud> @sdogruyol: does it work for variables too or is it only for integer literals? ruby fails for variables but work for integers.
<FromGitter> <yxhuvud> I guess because there is no ambiguity in the latter case
ua__ has quit [Ping timeout: 260 seconds]
ua__ has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> can someone tell me what the name of the thing was where for example the letter "i" is a 127 or so and the "o" is a 39 etc.. every single letter to a number and number back again to the letter
mark_66 has quit [Remote host closed the connection]
<FromGitter> <LuckyChicken91_twitter> aaah yes chr!
<FromGitter> <LuckyChicken91_twitter> exactly
<FromGitter> <LuckyChicken91_twitter> thank you
DTZUZO has joined #crystal-lang
DTZUZO has quit [Read error: Connection reset by peer]
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> @LuckyChicken91_twitter you can use Chr.ord to get the numbers
<FromGitter> <marksiemers> @sdogruyol - I read the blog post about the state of crystal results and I wanted to ask about these points: ⏎ ⏎ > WHAT CAN WE MAKE TO MAKE YOU WELL INFORMED ABOUT CRYSTAL’S FUTURE? ⏎ > - More blog posts ⏎ > - Monthly development updates ... [https://gitter.im/crystal-lang/crystal?at=5a32b81d87680e623010f2b0]
<FromGitter> <marksiemers> What about more guest blog posts. Even having themed months. For example, January could be about web frameworks, and get a guest blog post about Kemal, Amber, Lucky, and maybe raze or router.
<FromGitter> <marksiemers> Looking through awesome-crystal, there is at least a year's worth of themed months that could be done.
<oprypin> marksiemers, i'm not aware of rejected guest blog posts. just do it, then!
<oprypin> and uhh. february could be ... also about web frameworks, and then march about hmmm... web frameworks maybe?
<FromGitter> <ylluminarious> @bararchy sorry, you sent that message to me about concurrency when it was 3 in the morning here :P
<FromGitter> <marksiemers> oprypin - I was thinking about having a coordinated effort - so 3-4 guest posts per month about a certain topic. I'm betting @paulcsmith and @sdogruyol would be willing. ⏎ I think web frameworks will be the most popular, but crystal is very useful in other areas too. Like it could displace python in the data science world.
<FromGitter> <marksiemers> Who do we even contact about a guest post? Manas, @sdogruyol ?
<oprypin> marksiemers, that would be a quality problem to have. any spontaneous guest posts is already very good
<FromGitter> <marksiemers> RTFS
<FromGitter> <bararchy> @marksiemers I really hope to showcase some really cool Neural Network technology very soon, something we have done in NeuraLegion and will release as OpenSource when its ready
<FromGitter> <bararchy> My dream is that somewhere in the future Crystal can be taken seriously as a Data science option
<FromGitter> <bararchy> As we can see that Ruby failed to fill this spot
<FromGitter> <sam0x17> yes @marksiemers would love to see that dream come to fruition -- good work!
rohitpaulk has quit [Ping timeout: 260 seconds]
<FromGitter> <marksiemers> @bararchy - I don't know nearly enough about Data Science or AI/Machine Learning - are they pretty tightly related? Like AI requires a lot of data?
<Papierkorb> ML sometimes does. ML is part of AI, it's *not* the same
<Papierkorb> AI is such a vast field outside of machine learning, it's a shame that some texts on the internet claim those to be the same
<FromGitter> <marksiemers> Yeah, they have definitely been conflated.
<FromGitter> <bararchy> AI is the field of using machines to think, machine learning is a more narrow field that is included inside AI as general , Neural Networks are one set of tools inside the Machine learning field
<FromGitter> <bararchy> But, Machine learning and "Big data" are very closely related because Big data can only be analyzed using Machine Learning tools
<FromGitter> <marksiemers> I think AI has the connotation of machines taking over the world. ⏎ Machine learning sounds more acceptable - I think that's why they get conflated. Its a PR thing
<Papierkorb> ..Whatever "Big Data" is anyway
<FromGitter> <bararchy> Well, big data is the field of working with huge chunks of unsorted data and the processes involving in categorizing it and store it
<Papierkorb> marksiemers, PR is bullshit for those who are paid to rule and not to know. We're devs. We're generally paid to know. Don't buy into PR speak.
* Yxhuvud works with distributing press releases
<FromGitter> <greenbigfrog> `/usr/bin/ld: cannot find -lz` Getting this error, anytime I try to run anything on a deb 9 VPS. how to fix?
<FromGitter> <marksiemers> Papierkorb, I'm not condoning it. Just throwing out a hypothesis about the terminology getting homogenized.
<Papierkorb> greenbigfrog, try installing zlib1g-dev
woodruffw has quit [Ping timeout: 268 seconds]
<FromGitter> <greenbigfrog> Thanks... why is it sometimes so hard to find the appropiate lib package...
<Papierkorb> That in particular is debians fault
<Papierkorb> Usually, it's just libfoo and libfoo-dev. And sometimes, it's not.
<Papierkorb> greenbigfrog, this may help you in general https://askubuntu.com/a/1912
woodruffw has joined #crystal-lang
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
<FromGitter> <greenbigfrog> thanks
flaviodesousa has quit [Ping timeout: 240 seconds]
<FromGitter> <paulcsmith> @marksiemers That's a great idea. I'd love to write a blog post
<FromGitter> <HCLarsen> It would be a good idea to get more blogs out there about Crystal.
<hellomyfellow> "With Colorize you can change the fore- and background colors and text decorations when rendering text on terminals supporting ANSI escape codes"
<hellomyfellow> this is what colorize docs says. Can I somehow check if it supports ANSI escape codes?
<hellomyfellow> the terminal
<FromGitter> <marksiemers> Will 1.0 be waiting for Parallelism and Windows support? Any chance that one will be pushed to 2.0? ⏎ Are there deal-breaker advantages for having built-in parallelism? ⏎ I think for anyone using Crystal for HTTP applications, using multiple processes and `reuse_port` will cover most use cases (see https://groups.google.com/forum/#!topic/crystal-lang/kPAwJJe7Ruo)
<Papierkorb> Any terminal should support those honestly. Those which don't aren't generally terminals as in TTy's, so `stdout.tty?` can tell you that
<Papierkorb> hellomyfellow:
<Papierkorb> hellomyfellow: I'm not sure if Colorize detects this by itself automatically
<Papierkorb> Apparently it doesn't.
<hellomyfellow> Error in line 1: undefined local variable or method 'stdout'
<hellomyfellow> ooh STDOUT ok
<Papierkorb> `STDOUT`
<hellomyfellow> soo STDOUT.tty says false. So when its false i better dont print colored things, right? can I see all the things i can check at STDOUT?
<hellomyfellow> i didnt found it in the docs
<Papierkorb> if #tty? is false, you're not printing into a TTy (Or PTY), so you can assume that it doesn't support ANSI escape sequences
<Papierkorb> STDOUT is at least a IO::FileDescriptor, check that
aroaminggeek has joined #crystal-lang
<FromGitter> <faustinoaq> I don't if this post has been shared before but look interesting 👍
<FromGitter> <LuckyChicken91_twitter> how can I print out the bit of an integer directly?
<FromGitter> <LuckyChicken91_twitter> without if int.is_a?(Int16) etc
<FromGitter> <faustinoaq> @LuckyChicken91_twitter `print(int.as(Int16))`or `print(int.to_i16)` ?
<FromGitter> <LuckyChicken91_twitter> this was an example
<FromGitter> <LuckyChicken91_twitter> i dont want to convert a integer to 16bit and print it
<FromGitter> <LuckyChicken91_twitter> i want to print if its 16 bit or 32 bit or 64 bit or 8 bit
<FromGitter> <LuckyChicken91_twitter> but without a whole if query
<oprypin> LuckyChicken91_twitter, that.class
<FromGitter> <LuckyChicken91_twitter> oooh
<FromGitter> <LuckyChicken91_twitter> i forgot
<FromGitter> <LuckyChicken91_twitter> thx!
aroaminggeek is now known as aroaminggeek[awa
hightower3 has left #crystal-lang ["Leaving"]
aroaminggeek[awa is now known as aroaminggeek
claudiuinberlin has joined #crystal-lang
hightower2 has joined #crystal-lang
greengriminal has joined #crystal-lang
alex`` has quit [Ping timeout: 272 seconds]
hellomyfellow has quit [Quit: Page closed]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
greengriminal has quit [Quit: Leaving]
thews has quit [Ping timeout: 255 seconds]
thews has joined #crystal-lang
thews has joined #crystal-lang
thews has quit [Changing host]
thews has quit [Read error: Connection reset by peer]
thews has joined #crystal-lang
thews has quit [Changing host]
thews has joined #crystal-lang
greengriminal has joined #crystal-lang