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
<FromGitter> <faustinoaq> <Papierkorb> πŸ‘
<FromGitter> <krypton97> Sessions or JWT authentication? What's more secure
<wmoxam> Papierkorb: nice!
<FromGitter> <faustinoaq> <Papierkorb> Just curiosity, What code editor are you using in the screenshot?
<FromGitter> <krypton97> Atom
<FromGitter> <krypton97> That is its color scheme :P
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<watzon> So it’s basically ready then eh Papierkorb?
<watzon> πŸ˜‚
snsei has quit [Remote host closed the connection]
w-p has joined #crystal-lang
<FromGitter> <fridgerator> πŸ‘
rohitpaulk has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <codenoid> sup, how to prevent error from `Expected Array for # (index : Int), not Nil (Exception)`
<wmoxam> πŸ€”
<FromGitter> <codenoid> simple tha begin rescue :#
<FromGitter> <sevk> [done] gc x86_64-w64-mingw32.static 9392 KiB 0m33.451s
<FromGitter> <fridgerator> @sevk whats that?
<FromGitter> <fridgerator> what did you compile with mingw?
<FromGitter> <sevk> I am making this : https://github.com/crystal-lang/crystal/pull/3582
rohitpaulk has joined #crystal-lang
w-p has quit [Ping timeout: 240 seconds]
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5993c288c101bc4e3a20da67]
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <codenoid> thanks
A124 has quit [Quit: '']
<FromGitter> <codenoid> `require "crypto/md5"` wont work
<FromGitter> <codenoid> md5 is missing in 23.1 :O
<FromGitter> <codenoid> moved to digest
<FromGitter> <sevk> why not make a link from digest to md5 . and give a warning ?
alex`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9]
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <konovod> @sevk isn't there problems with exception handling on mingw? Or you have solved it?
rohitpaulk has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<FromGitter> <sevk> solving ...
<FromGitter> <sevk> make MXE_TARGETS=x86_64-w64-mingw32.static gcc gc libevent libiconv 48.08s user 2.58s system 84% cpu 59.898 total
mark_66 has joined #crystal-lang
hightower3 has quit [Ping timeout: 248 seconds]
<FromGitter> <sevk> need 1.8G memory to build crystal win branch .
<FromGitter> <sevk> 1) Build the crystal compiler OK . But can't build foo.cr : Error in foo.cr:1: while requiring "windows-prelude"
<oprypin> sevk, for what purpose do you want to build a Windows branch?
hightower2 has joined #crystal-lang
<FromGitter> <sevk> thank you , I just to try :)
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/v7boH
<crystal-gh> crystal/master 53c4431 TSUYUSATO Kitsune: Parser: allow to use trailing comma after named arguments in index notation (#4784)...
<Papierkorb> faustinoaq, that's atom-editor. not the best, but the least worst
greengriminal has joined #crystal-lang
<travis-ci> crystal-lang/crystal#53c4431 (master - Parser: allow to use trailing comma after named arguments in index notation (#4784)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/265063246
greengriminal has quit [Quit: This computer has gone to sleep]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
<FromGitter> <konovod> my atom has broken after last update (`crystal-ide` conflicts with `language-crystal-actual` or something like this) 😟 Tried to use vscode but it's too painful. Sublime looks fine. Git support is much worse, but autocomplete and formatting works like charm.
linuksz has joined #crystal-lang
<linuksz> how can i access command line arguments?
<FromGitter> <sdogruyol> @linuksz https://play.crystal-lang.org/#/r/2jdr
<linuksz> thanks
<FromGitter> <sdogruyol> A great response from Manas about donations https://groups.google.com/forum/#!topic/crystal-lang/BEQSAUAZ_pE
DTZUZO has quit [Ping timeout: 246 seconds]
<FromGitter> <cevarief> @faustinoaq How to integrate scry with vscode-crystal-lang? Compiling scry got me error. Missing a lot dependency of requires.
greengriminal has joined #crystal-lang
gloscombe has joined #crystal-lang
bmcginty has quit [Ping timeout: 248 seconds]
bmcginty has joined #crystal-lang
w-p has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
<Papierkorb> konovod, is sublime OSS or even free software?
<FromGitter> <bararchy> It's not
<FromGitter> <bararchy> it's free like winrar is free, every x saves it will ask you to buy a license, though it wont stop working
<Papierkorb> "like winrar free" while true, is in itself a kinda hilarious statement. "Free as in beer" "free as in winrar"
<FromGitter> <bararchy> XD
<FromGitter> <bararchy> yeha lol
<FromGitter> <straight-shoota> I really like sublime but I've also come to like vscode, especially for better Crystal support and git integration. @konovod why is it painful?
<FromGitter> <bararchy> vscode ? or the linux version ... I think it's called code
<Papierkorb> I also "discovered" a memory leak in atom over the last two days, occuring when you're updating files from outside while having them open at some point during the lifetime of the process. That those files are comparably huge doesn't help. OTOH, atom did display a "ENOMEM" error without crashing, so that was nice.
<FromGitter> <krypton97> There's bunch of sublime licenses on the internet
<Papierkorb> How bad is it? It accumulated about 25GiB of residential memory by that point.
<FromGitter> <bararchy> How do I install the Crystal tools for vscode ?
<FromGitter> <konovod> @straight-shoota i don't know. maybe it's personal taste. But everything that is nice in atom is broken in vscode. Terminal is littered with special symbols, terminal window don't scrolls down automatically, no autoformatting on save, no highlighting of changed files in project, alt-shift shortcuts don't work on cinnamon (calls menu instead). and many such small things. And it's not "duck syndrome" - i haven't
<FromGitter> ... tried sublime before too, but it feels "right", the only thing it lacks is git integration.
snsei has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
snsei has quit [Ping timeout: 246 seconds]
DTZUZO has joined #crystal-lang
<FromGitter> <bararchy> @konovod what Crystal plugin do you use in Aom ?
<FromGitter> <konovod> `crystal-ide`, but it don't works without `language-crystal-actual`.
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> @konovod Can it work with scry ?
<FromGitter> <konovod> according to scry readme, yes. But for now it doesn't works for me at all.
<FromGitter> <bararchy> Hm... did anyone tried using Sublime with scry ?
DTZUZO has joined #crystal-lang
w-p has quit [Ping timeout: 246 seconds]
<FromGitter> <krypton97> How can I execut a function right before I close the app?
<FromGitter> <krypton97> e
<FromGitter> <krypton97> Something like defer in go
<FromGitter> <sdogruyol> @krypton97 you should use `at_exit`
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> How can I create a type that includes other types ? like JSON::Any ⏎ ⏎ So, Foo which is String + Int
<FromGitter> <bararchy> for example
<FromGitter> <bararchy> or more correctly, String or Int32
<FromGitter> <sdogruyol> `alias Foo = String | Int32`
<FromGitter> <bararchy> Nice !
<FromGitter> <bararchy> thanks :)
<FromGitter> <sdogruyol> πŸ‘
<FromGitter> <sdogruyol> alias <3
<FromGitter> <r3bo0t> guys do fill the Crystal Survey https://docs.google.com/forms/d/e/1FAIpQLSeDXN0jZJFgXHUZXOBsOtKlWxXV9XxtCURmFz8xx5V0FWfJZg/viewform. ⏎ cc: @sdogruyol
<crystal-gh> [crystal] ysbaddaden pushed 1 new commit to master: https://git.io/v7Ne1
<crystal-gh> crystal/master e5b6efe Oleh Prypin: Fix parsing of '!=' after an identifier (#4834)...
<FromGitter> <sdogruyol> please πŸ™
office_boy has joined #crystal-lang
<travis-ci> crystal-lang/crystal#e5b6efe (master - Fix parsing of '!=' after an identifier (#4834)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/265134409
<FromGitter> <faustinoaq> > that's atom-editor. not the best, but the least worst ⏎ ⏎ Papierkorb, πŸ˜… ⏎ ⏎ > vscode ? or the linux version ... I think it's called code ... [https://gitter.im/crystal-lang/crystal?at=599441429acddb2407973807]
<FromGitter> <faustinoaq> > Tried to use vscode but it's too painful. ⏎ ⏎ @konovod 😟 Maybe you can open a issue https://github.com/crystal-lang-tools/vscode-crystal-lang/issues ⏎ ⏎ Why did you consider painful? πŸ˜… [https://gitter.im/crystal-lang/crystal?at=5994431e2723db8d5ead01f6]
<FromGitter> <krypton97> Oo, thanks! I thought that's specific for kemal lol
<FromGitter> <faustinoaq> @konovod My VSCode extension for crystal have bunch of features, I just need to document them better: https://github.com/crystal-lang-tools/vscode-crystal-lang/wiki
<FromGitter> <cevarief> > @konovod My VSCode extension for crystal have a bunch of features, I just need to document them better: https://github.com/crystal-lang-tools/vscode-crystal-lang/wiki ⏎ ⏎ How can we get the scry binary?
<FromGitter> <cevarief> > Scry server isn't distributed with this extension. You need to install it from scry repo and configure on settings.json
<travis-ci> crystal-lang/crystal#e5b6efe (master - Fix parsing of '!=' after an identifier (#4834)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/265134409
<FromGitter> <faustinoaq> Clone the Scry repo and compile it
<FromGitter> <faustinoaq> Then configure the path for scry executable on settings.json
<FromGitter> <faustinoaq> @cevarief But I recommend you to use the extension with `"crystal-lang.problems": "build"`
<FromGitter> <faustinoaq> Scry is still on development
<FromGitter> <konovod> @faustinoaq I don't have problems with your extension, it is awesome (well, except maybe autoformatting on save). i have problems with vscode in general
<FromGitter> <bararchy> @faustinoaq does this makes sense as a config for sublime: ? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5994449bee5c9a4c5fc7bb1d]
<FromGitter> <cevarief> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=599444a676a757f808added3]
<FromGitter> <cevarief> ups sorry
<FromGitter> <cevarief> > @cevarief But I recommend you to use the extension with `"crystal-lang.problems": "build”` ⏎ Ok thanks.
<FromGitter> <faustinoaq> @konovod πŸ‘ I do use auto formatting on save and works well, Are you using some specific settings? ⏎ ⏎ @bararchy I think so, However, as long I know Sublime LSP only supports go to definition and linting, not formatting. ⏎ ⏎ @cevarief Scry compiles well, you need llvm installed in your enviroment. ... [https://gitter.im/crystal-lang/crystal?at=599445fe76a757f808ade60b]
<FromGitter> <bararchy> LSP should also supprt Hover by looking at there wiki, but it seems not to really work
<FromGitter> <faustinoaq> No, Scry LSP Hover is not in master yet. Hover works with Node.js backend.
<FromGitter> <bararchy> Oh....
<FromGitter> <bararchy> Ok, thanks :)
w-p has joined #crystal-lang
<FromGitter> <faustinoaq> You need to remove `"crystal-lang.server": "/absolute/path/bin/scry"` from your settings to enable Node.js backend. Otherwise Scry is called.
<FromGitter> <faustinoaq> For questions about scry you can use https://gitter.im/crystal-scry/Lobby πŸ˜…
<FromGitter> <konovod> > I do use auto formatting on save and works well ⏎ hmm, what setting controls it? I installed it and didn't changed anything, and it don't formats on save, only by calling command (alt-shift-f, and this shortcut isn't working).
hightower2 has quit [Ping timeout: 240 seconds]
<FromGitter> <konovod> hmm, what setting controls it? I installed it and didn't changed anything, and it don't formats on save, only by calling command (alt-shift-f, and this shortcut isn't working).
<FromGitter> <krypton97> Try alt+shift+i
<FromGitter> <konovod> i want ctrl-s πŸ˜„
<watzon> Why aren't there build instructions for Scry? It seems like every time I try to build it I hit hangups
<watzon> `main_module:(.text+0x26d48): undefined reference to `ERR_load_crypto_strings'`
<watzon> I have openssl installed, so idk what's going on
<FromGitter> <faustinoaq> > Why aren't there build instructions for Scry? ⏎ ⏎ I will write some documentation the next weekend πŸ˜… ⏎ ⏎ > mm, what setting controls it? ... [https://gitter.im/crystal-lang/crystal?at=59944b0eee5c9a4c5fc7dfa1]
<FromGitter> <konovod> thank you, i will try
<watzon> Thanks @faustinoaq any clu why I'd be getting libcrypto linking errors?
<FromGitter> <faustinoaq> watzon: First, Let me try to reproduce your problem. Maybe we can use static linked binaries at https://github.com/crystal-lang-tools/scry/releases
<watzon> That sounds like a good idea
<FromGitter> <codenoid> days 2, scrapping a BIG MarketPlace with Crystal HTTP Client and JSON parser <3
<FromGitter> <faustinoaq> πŸ‘
office_boy has quit [Remote host closed the connection]
office_boy has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
gloscombe has quit [Ping timeout: 240 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
gloscombe has joined #crystal-lang
rohitpaulk has joined #crystal-lang
office_boy has quit []
<FromGitter> <bararchy> Trying to create an Array of hash kind of thing in json
<watzon> So I'm on Arch (actually Manjaro) and can't build anything with Crystal that requires openssl
<watzon> Pretty sure that's why scry isn't compiling
<FromGitter> <zatherz> is there some sort of library to aid in writing `run` macro scripts?
<FromGitter> <zatherz> like a source code builder of sorts
<FromGitter> <bew> maybe use `require "compiler/crystal/syntax"` ? using AST nodes, and using #to_s to get the final result
<oprypin> watzon, Arch does not have this problem. Manjaro is broken
<FromGitter> <zatherz> @bew Thanks, that works
<FromGitter> <zatherz> I wish Crystal had a better macro system
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <zatherz> even the ability to `def` inside macros for macro functions would be useful
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
gloscombe has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <muhajirframe> Guys, is this kind of feature exist in crystal ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ or what's the crystal way of doing this? [https://gitter.im/crystal-lang/crystal?at=599461bc80d90ca024056fa2]
<FromGitter> <bew> `x.zero?` ?
<FromGitter> <zatherz> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=599461e7162adb6d2e003831]
<FromGitter> <krypton97> Fastest way to find out is compiling, but there's no defmodule keyword
<FromGitter> <bew> @zatherz won't work for float numbers I think
<FromGitter> <zatherz> why?
<FromGitter> <bew> nvm it works
<FromGitter> <bew> was thinking: `self` & `0` are different types
<FromGitter> <zatherz> crystal has operator overloading
<FromGitter> <bew> can be*
<FromGitter> <mgarciaisaia> @muhajirframe I think the pattern matching you're looking for isn't there
<FromGitter> <mgarciaisaia> That's too typical of functional languages, though
<FromGitter> <zatherz> what's the name of the `x[0]` AST node? I can't find it for the life of me
<FromGitter> <bew> @muhajirframe you can use method overloading though: `def zero?(x : Int); ...; end`
<FromGitter> <bew> @zatherz you can use `{% puts some_ast_node.class_name %}` to help you
<FromGitter> <zatherz> ah so it's `class_name`
<FromGitter> <zatherz> oooh, it's Call
<FromGitter> <zatherz> which makes sense because `a[1]` is `a. (1)`
<FromGitter> <muhajirframe> I am little bit confused with answer hehe. Well, it's my bad, not asking specific question. My main point is here the `when` keyword. It's like overloading `def` we have in crystal. But conditional like `is_integer`.
<FromGitter> <bew> @zatherz you can find available macro methods in https://crystal-lang.org/api/0.23.1/Crystal/Macros/Call.html
<FromGitter> <bew> @muhajirframe look at how method overloading works
<FromGitter> <bew> here is an example: https://carc.in/#/r/2jex
<FromGitter> <bew> full documentation is available here: https://crystal-lang.org/docs/syntax_and_semantics/overloading.html
gloscombe has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
Mole[m] has joined #crystal-lang
Mole[m] has left #crystal-lang ["User left"]
<watzon> oprypin: any idea how to fix it on Manjaro?
snsei has joined #crystal-lang
<linuksz> is there any oppurtunity to convert a string containing unicode chars to a string containing only ascii characters, but replaces every unicode character with an ascii variant? e.g. i want to convert "Ñéíóúőüâ" to "aeiououo"
<watzon> Pretty sure you'd have to write a shard for that linuksz
<watzon> Looks like this rubygem has already done most of the hard work for ya https://github.com/norman/unidecoder
<Papierkorb> linuksz: that can be done with unicode folding. dunno if String has something for that though
<FromGitter> <johnjansen> @linuksz String.encode uses iconv to encode, iconv can do this, so a little monkey patching and you might be in the money ⏎ ⏎ see https://stackoverflow.com/questions/1975057/bash-convert-non-ascii-characters-to-ascii and https://github.com/crystal-lang/crystal/blob/e2a1389e8165fb097c785524337d7bb7b550a086/src/string.cr#L1167
<FromGitter> <delef> Hi! What are the alternatives for [0xAB, 0xCD, 0xEF].pack("C*")?
<FromGitter> <delef> (ruby)
<FromGitter> <delef> and .unpack("C*")
<FromGitter> <delef> for String
rohitpaulk has quit [Ping timeout: 240 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <delef> is anybody here?
<FromGitter> <krypton97> Yeah
<FromGitter> <krypton97> But I guess nobody has a clue about it
<oprypin> watzon, nah i'm only good at hating on manjaro
<oprypin> Papierkorb, actually unicode folding is far from everything needed. this can only be done with a full manual mapping, unfortunately
<oprypin> linuksz, here's some thoughts on the topic https://stackoverflow.com/a/8935169
gloscombe has quit [Quit: WeeChat 1.9]
snsei has quit [Remote host closed the connection]
<FromGitter> <zatherz> trying to write something big with macros in crystal is sucking the life force out of me
<FromGitter> <bew> Are you sure you need macros to do it?
<FromGitter> <zatherz> JSON parser generator, like JSON.mapping but with a lot more features that I need for https://gitlab.com/zatherz/dcr
<FromGitter> <bew> Oh
<FromGitter> <zatherz> I wonder how much would have to be changed to make it possible to use `def`s in macros
<FromGitter> <zatherz> the main problem is that I have to copy paste a lot in the macro code
<FromGitter> <krypton97> copy paste is fun
<FromGitter> <zatherz> and then if I change it I have to appropriately change it everywhere it's copy pasted
<FromGitter> <bew> Do you have an example?
<oprypin> zatherz, you can have macros that produce macro calls
<FromGitter> <zatherz> yeah, but you can't execute macros inside macros
<oprypin> yeah, but you can have macros that produce macro calls
<FromGitter> <zatherz> I thought about that, I'll end up with macros that produce macros that produce macros lol
<FromGitter> <zatherz> but it may be worth it, even if it doesn't look too good
<FromGitter> <bew> Do you have an example where copy/pasting is need for you?
<FromGitter> <zatherz> not in code (I deleted it to rewrite it) but I can explain one particular example
<FromGitter> <zatherz> basically, I want the generator to have the ability to extract "dependency" fields that have to be extracted before other fields
<FromGitter> <zatherz> then those other fields can use the dependency fields in their constructors etc
<FromGitter> <zatherz> there are a couple of ways to do that, but let's say I want to do it the "naive" way, i.e. doing pull_parser.read_object two times
<FromGitter> <zatherz> I have to copy the code that decides where to call from_json (the converter? the type? the union?) two times
<FromGitter> <zatherz> and if I e.g. want to add some extra converter options, I have to remember to change it in two places
<FromGitter> <zatherz> oprypin: how would I solve this need for duplication with macros that produce macros? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5994942c614889d47555a0f6]
<FromGitter> <zatherz> the above code doesn't work
<FromGitter> <zatherz> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5994943d80d90ca024069396]
<FromGitter> <zatherz> oh god ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=599497e3bc464729748dfe43]
<FromGitter> <zatherz> I mean it works, but...
<FromGitter> <zatherz> okay this is a lot better https://gist.github.com/zatherz/cc0c377f8d759e842f88276e14797a3a
<FromGitter> <krypton97> Hmm, can you make dynamic struct with macros?
<FromGitter> <zatherz> you mean like `x = DynamicStruct.new; x.a = 0; x.b = 1; puts x.a + x.b`?
<FromGitter> <krypton97> I mean let's say you have the name of the fields and the values
<Yxhuvud> macros are compiletime, so by definition they won't be dynamic
<FromGitter> <krypton97> I'ma try something
<FromGitter> <zatherz> I don't understand
<FromGitter> <sdogruyol> @krypton97 have you checked record
<FromGitter> <krypton97> haven't used macros before but they look promising
<FromGitter> <krypton97> nvm
<FromGitter> <krypton97> record did the trick
<FromGitter> <sdogruyol> πŸ‘
<FromGitter> <zatherz> is there a better way to pass a compiletime constant with a typeless value (`Symbol => Nil`) to runtime? ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=59949bccc101bc4e3a253a47]
<FromGitter> <zatherz> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59949bd59acddb24079924d1]
<FromGitter> <zatherz> ignore the indirection
<FromGitter> <krypton97> πŸ‘
<FromGitter> <zatherz> `String => Nil` above should be `Symbol => Nil`
<FromGitter> <zatherz> what that does is check if the constant has no elements, if it does (the only case where a type has to be specified) return `{} of Symbol => Nil`, otherwise return the literal and let Crystal infer the type
<FromGitter> <zatherz> the reason it has to have a typeless value is because it's a symbol to type map
<FromGitter> <krypton97> Has anyone used this https://github.com/cyx/shield?
<FromGitter> <krypton97> I'm looking to port it to crystal
<FromGitter> <krypton97> Couldn't find an auth package
linuksz has quit [Quit: Leaving.]
<FromGitter> <HCLarsen> I was just reading that there's no central repository for shards, and that you get them straight from github. If that's the case, then how do you know what kinds of shards are out there?
<FromGitter> <johnjansen> crystalshards.xyz
<FromGitter> <zatherz> http://crystalshards.xyz
<FromGitter> <krypton97> Is therey anyone running in production with authenticaion systems/?
<FromGitter> <johnjansen> all my stuff is either public or private, nothing in between
<FromGitter> <crisward> @krypton97 what do you mean by auth systems? We're using bcrypt against mysql, I'm also using oAuth2 with Google.
<FromGitter> <johnjansen> im assuming he means a β€œDevise” for crystal … but it could do with some clarification
<FromGitter> <krypton97> User authentication
<FromGitter> <krypton97> yep
<FromGitter> <krypton97> Or passport js for node
<FromGitter> <krypton97> oAuth2 is good, but it's 3rd party
<FromGitter> <crisward> We just use a standard email / password form, which runs a bcrypt check against the encrypted password in the database - ie - https://crystal-lang.org/api/0.23.1/Crypto/Bcrypt/Password.html
<FromGitter> <LuckyChicken91_twitter> but for what is this encrypting? everyone could easily uncrypt it and then he is having the message
ephemera_ has quit [Quit: No Ping reply in 180 seconds.]
<FromGitter> <fridgerator> How would you easily unencrypt it?
<FromGitter> <fridgerator> Are you asking what's the point of encryption?
<FromGitter> <LuckyChicken91_twitter> yea i mean it must be possible to unencrypt it with the thing i encrypted it
ephemera_ has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> im sure there is a unencrypt method somewhere
<FromGitter> <fridgerator> No
<FromGitter> <LuckyChicken91_twitter> and a hacker for example could use this then
<FromGitter> <fridgerator> That's the point
<FromGitter> <LuckyChicken91_twitter> n no?
<FromGitter> <LuckyChicken91_twitter> ooooH! you need to make your own thing to unencrypt it again right?
<FromGitter> <johnjansen> its a one way hash
<FromGitter> <bew> There's no point to unencrypt it
<FromGitter> <fridgerator> It can only encrypt another password and see if the hash matches
<FromGitter> <johnjansen> @bew, @LuckyChicken91_twitter was under the impression it was a 2 way crypt and therefore insecure given the key
<FromGitter> <bew> Yeah thanks, need some rest ^^
<FromGitter> <johnjansen> haha … it should be assumed around here that anyone saying anything out of character can be blamed on that ;-)
<FromGitter> <LuckyChicken91_twitter> someone know this https://carc.in/#/r/2ji5/edit
<FromGitter> <LuckyChicken91_twitter> im sure i can get this somehoe
<FromGitter> <johnjansen> in this case you want every 3rd element?
<FromGitter> <LuckyChicken91_twitter> i just want to know the passing number
<FromGitter> <LuckyChicken91_twitter> how often he runned through this block now
<FromGitter> <johnjansen> ahhh … the test is `i ==2` correct?
<FromGitter> <LuckyChicken91_twitter> yea this has nothing todo with this its just an example
<FromGitter> <LuckyChicken91_twitter> this should show that i always need to define and use my own variable
<FromGitter> <johnjansen> so you want the index, not the item?
<FromGitter> <LuckyChicken91_twitter> eeh yees
<FromGitter> <johnjansen> hold on
<FromGitter> <johnjansen> https://carc.in/#/r/2ji9
<FromGitter> <LuckyChicken91_twitter> mhh.. what
<FromGitter> <johnjansen> look at the last few lines
<FromGitter> <LuckyChicken91_twitter> i know but i dont understand them
<FromGitter> <LuckyChicken91_twitter> uh i think it wasnt the index. its the item
<FromGitter> <johnjansen> so you only want items that pass the test?
<FromGitter> <johnjansen> use `Array.select`
<FromGitter> <faustinoaq> > So I'm on Arch (actually Manjaro) and can't build anything with Crystal that requires openssl ⏎ ⏎ *watzon:* lol, I use Manjaro too as main OS since 2015 and I'm still trying to reproduce your problem
<FromGitter> <faustinoaq> And my computer is not powerfull at all
<FromGitter> <krypton97> I'm using solus and seems to be stable
<FromGitter> <krypton97> Had a lot of issues with ubuntu
<FromGitter> <faustinoaq> For me almost any distro works well with crystal, I have Alpine, Ubuntu, CentOS and Manaros all of them running latest Crystal without problems😎
<FromGitter> <krypton97> I wasn't reffering to crystal at all
<FromGitter> <faustinoaq> > Arch does not have this problem. Manjaro is broken ⏎ ⏎ *oprypin:* lol, I use Manjaro as main OS and I don't have problems with Crystal installation/compilation at all. In fact, I can compile some static binaries using Manjaro.
<FromGitter> <krypton97> more like kernel issues
onionhammer has quit [Ping timeout: 240 seconds]
onionhammer has joined #crystal-lang
onionhammer has quit [Client Quit]
<Papierkorb> .... openssl issues sound like issues with the openssl installation.
<FromGitter> <delef> I'm so sorry. https://crystal-lang.org/api/0.23.1/IO/ByteFormat.html it an alternative to Ruby [].pack. ⏎ But "\xAB\xCD\xEF".unpack("G") or .unpack("C*") has alternative?
<oprypin> delef, again you are assuming everyone knows ruby. if you had specified a proper question, I would be able to answer many hours ago, otherwise I can't
<FromGitter> <bararchy> There are moments where I really hate the type system lol ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5994c0b3162adb6d2e02254d]
<oprypin> that's not right
<oprypin> delef, anyway, the example is at the very top. `IO::ByteFormat::LittleEndian.decode(Bytes[0xAB, 0xCD, 0xEF])`
<oprypin> `IO::ByteFormat::LittleEndian.decode(Float64, Bytes[0xAB, 0xCD, 0xEF])`
<FromGitter> <bararchy> I think I'll open a bug, it seems that no matter what fool proff logic I put there the compiler still complains on wrong types
<oprypin> delef, I must put an accent on the fact that Strings in Crystal must not store arbitrary bytes, that's why String has no participation here, instead it's a Slice of bytes
<oprypin> bararchy, if you can isolate it, sure. i dont believe this is possible, as is
<FromGitter> <bararchy> oprypin, what do you mean ? as in that it only happens at my env because of complex code leading up to it ?
<FromGitter> <bararchy> If so, then I can't sadly dump all the project to the issue
<FromGitter> <bararchy> haha
<oprypin> well exactly, that's why you have to chop off parts of it until it's suitable for an issue
<FromGitter> <bararchy> damn ...
<FromGitter> <bararchy> lol
<FromGitter> <crisward> @bararchy I'm using client.get without issue, though I'm not using .is_a? before it
w-p has quit [Ping timeout: 255 seconds]
<FromGitter> <crisward> my code look like this if it helps ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5994c2c676a757f808b079b1]
<FromGitter> <bararchy> @crisward I got a chance to have another type in there, that's why the check
<FromGitter> <bararchy> Trying to recreate
<FromGitter> <bararchy> got to another error
<FromGitter> <bararchy> why is this a dynamic set?
<FromGitter> <bararchy> lol nvm typo
ihaveaquestion has joined #crystal-lang
<FromGitter> <bararchy> I'm too tired to debug this right now :/ I'll try to trace tomorrow
Groogy has joined #crystal-lang
<Groogy> Hiya!
ihaveaquestion has quit [Quit: Page closed]
<Papierkorb> Yo Groogy
<Groogy> Went on vacation, came back and my brain suddenly figured out why >2.0 GL versions doesn't work
<Groogy> because I need to reload the library after creating the opengl context somehow
<Papierkorb> So if for nothing else, vacation helped ;P
<Groogy> I could potentially also I guess make a intermediary C lib I guess that handles it for you I guess?
<Groogy> probably better than to figure out how to abuse DL module in Crystal
<Papierkorb> Well technically, you *can* use libdl from Crystal
<Groogy> I know, but I think it is more complex than that, because of the architecture of OpenGL
<Papierkorb> You just have to abuse Proc, but god bless it has an #initialize you can use to explicitly set the function pointer and context (which is probably irrelevant for C)
<Groogy> and I can't really just use GLEW I think in Crystal
<Papierkorb> is it that magic?
<Groogy> yeah
<Groogy> that's what is missing
<Papierkorb> C macro magic?
<Groogy> yepp
<Papierkorb> >_>
<Groogy> so thinking of doing a C lib that runs GLEW and let's you that way access the functions in Crystal
<Groogy> unless you have some awesome magic trick I could do to make it even easier ^^
<Papierkorb> Generate as much as possible
<Papierkorb> But never used GLEW, no idea about it
<Groogy> not exactly sure what it does, but it requires you to include it in correct order with GL headers. So yeah macro magic happens
hightower3 has joined #crystal-lang
hightower4 has quit [Ping timeout: 260 seconds]
ragmaanir has joined #crystal-lang
<ragmaanir> just stumbled upon this. is that correct or a mistake?: https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/codegen/ast.cr#L26