ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.2 | 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> <fgimian> In case anyone is interested (bosed on the question I had yesterday re VS Code), I've started writing an extension that actually does exactly what I was hoping for. Here's a look at the code for the moment which works, but I just need to clean up the package and actually publish it πŸ˜„
duane has quit [Ping timeout: 256 seconds]
wontruefree has quit [Quit: bye]
<FromGitter> <eliasjpr> Thank you guys for the live session today.
zachk has joined #crystal-lang
kp666[m] has joined #crystal-lang
braidn[m] has joined #crystal-lang
cptaffe has joined #crystal-lang
Renich has joined #crystal-lang
fifr[m] has joined #crystal-lang
byteflame has joined #crystal-lang
kixune[m] has joined #crystal-lang
zachk has quit [Quit: Leaving]
<FromGitter> <eliasjpr> So I can conclude that Crystal Team and Community main focus (Roadmap) should be: Not in specific order. ⏎ ⏎ 1) Compiler Improvements (Core/Community) ⏎ 2) Windows (Core) ⏎ 3) Parallelism (Core) ... [https://gitter.im/crystal-lang/crystal?at=5b206f2128965a566fe08a6b]
wontruefree has joined #crystal-lang
<FromGitter> <S-YOU> Change Parallelism to Concurrency, then it is done. Fiber and GC are not compatible with Threads IMO, or anyone have idea?
<FromGitter> <Daniel-Worrall> @RX14 https://gist.github.com/Daniel-Worrall/7240ac50b63204b861140b1c36bea841 this is from building on your windows branch. Not sure what to make of this. Is this a fault of my env?
wontruefree has quit [Quit: bye]
<FromGitter> <codenoid> is QA session already uploaded on yuotube ?
<FromGitter> <bew> looks like this one! https://www.youtube.com/watch?v=wGQ8QqAqHOE
<FromGitter> <sam0x17> any idea why `crystal --version` might throw "GC Warning: Out of memory - trying to allocate less ⏎ Insufficient memory for GC_all_nils" when there is 1.7 gigs of ram free
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 264 seconds]
duane has joined #crystal-lang
greengriminal has joined #crystal-lang
Philpax has joined #crystal-lang
<FromGitter> <sam0x17> after a little digging, I have found that this is thrown by boehm-gc which crystal uses
greengriminal has quit [Quit: This computer has gone to sleep]
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
rohitpaulk has joined #crystal-lang
duane has quit [Ping timeout: 264 seconds]
<FromGitter> <fgimian> Hey guys, scry doesn't compile with the latest release of Crystal
<FromGitter> <fgimian> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b20ab43a0161836cb16a912]
<FromGitter> <fgimian> any thoughts?
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <Val> ``````
marius has quit [Quit: baj]
marius has joined #crystal-lang
<FromGitter> <Val> Got this error now: ⏎ ⏎ ```> crystal build --release --no-debug -o tuco samples/main.cr``` ⏎ ⏎ Works. ... [https://gitter.im/crystal-lang/crystal?at=5b20bccb32618e705eb61772]
<FromGitter> <Val> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b20c0438864a936cc8408aa]
<FromGitter> <MKRhere> Hey guys :) I'm new here.
pabs has quit [Ping timeout: 248 seconds]
pabs has joined #crystal-lang
<FromGitter> <bararchy> @Val What's the code?
<FromGitter> <bararchy> @MKRhere Welcome :)
<FromGitter> <bendietze_twitter> @MKRhere πŸ‘‹
<crystal-gh> [crystal] straight-shoota closed pull request #4772: Add JSON.def_to_json (master...jm-def-to-json) https://git.io/v7RGl
<FromGitter> <bararchy> @bcardiff so.... bin signing today?
<FromGitter> <bcardiff> crossing fingers. it's not on my plate, but pushing it.
flaviodesousa has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<travis-ci> crystal-lang/crystal#3ec6667 (ci/increase-linux-timeout - Increase no_output_timeout to 20m for linux builds): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/391645764
rohitpaulk has joined #crystal-lang
sz0 has joined #crystal-lang
<FromGitter> <bararchy> πŸŽ‰
<FromGitter> <bararchy> @bcardiff Who do I need to harass to get this done? ;) is it @mgarciaisaia fault?
<FromGitter> <bararchy> hahah
ua has quit [Ping timeout: 268 seconds]
<FromGitter> <bcardiff> Nop. The key is kept in some dungeons, with some dragons, and the nuisance of over scheduled meetings.
<FromGitter> <bcardiff> :-) I'm sorry it's taking so long.
<FromGitter> <bendietze_twitter> @S-YOU about parallelism vs concurrency: have you reconstructed (due code-reading etc.) HOW Go is doing this and what EXACTLY Go does? I think Go could be the best choice / implementation to compare (and to become nearby or beat) in this? Other opinions @all? :) What Language / concept is prefered to come close to? :)
<FromGitter> <bararchy> lol I get it, it's Nico's fault then, I'll have a talk with him about all those meetings
<FromGitter> <bararchy> @bcardiff All good, just really excited to try new features
<FromGitter> <bcardiff> you are playing "who is who" :-P. No, it's neither nico. It's in all of us since there is a SPODelay with the current flow.
<FromGitter> <bendietze_twitter> @schoening are you getting closer? (your game) :)
cmalfroy has joined #crystal-lang
cmalfroy_ has joined #crystal-lang
cmalfroy has quit [Ping timeout: 260 seconds]
<cmalfroy_> is this channel active ?
<FromGitter> <bendietze_twitter> @cmalfroy sure :)
<FromGitter> <Val> @bararchy sorry I was in a *meeting* I'll try to isolate some code to reproduce it
<FromGitter> <bararchy> cmalfroy_ yeha
<FromGitter> <bararchy> it's also connected to a Gitter channel
<FromGitter> <straight-shoota> @bararchy just use the nightly builds ^^
<FromGitter> <straight-shoota> a few more hours shouldn't hurt after we've been waiting for a new release for months
<FromGitter> <bararchy> true
<FromGitter> <bararchy> are the nightly build bins avilable somewhere to download?
<FromGitter> <bendietze_twitter> πŸ˜‚
<FromGitter> <bendietze_twitter> 😊
<FromGitter> <bendietze_twitter> As a newbie since two or three weeks the gitter and irc chats are talking endlessly about 25.. is it out? No. Now? No. 25? No. Now?? No. YES!! Where? No. Not? No. But ... wait ... No.
<FromGitter> <bendietze_twitter> 😁
<FromGitter> <bendietze_twitter> If somebody gets X icons: just smileys ;)
<FromGitter> <bararchy> lol
cmalfroy_ has quit [Ping timeout: 260 seconds]
TCZ has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <silentworks> Is it possible to compile a crystal project to an executable where it doesn't require llvm or crystal installed on the users machine to run the executable?
<FromGitter> <MKRhere> Yes, that's the idea I believe
<FromGitter> <MKRhere> Currently you cannot target Windows, but there's an issue open on that
<FromGitter> <silentworks> @MKRhere but its currently possible for macOS and Linux?
<FromGitter> <bendietze_twitter> @MKRhere maybe helpful: https://github.com/crystal-lang/crystal/wiki/Platform-Support
<FromGitter> <MKRhere> Great, so `x86_64-pc-windows-msvc` compiler is already done?
<FromGitter> <MKRhere> Tier 3, but yeah. :)
<FromGitter> <MKRhere> That's good progress
<FromGitter> <bendietze_twitter> :)
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <bendietze_twitter> Ups, sorry, wrong @MKRhere should be @silentworks ;)
<FromGitter> <straight-shoota> @silentworks You don't need LLVM or Crystal installed to run the binaries
<FromGitter> <straight-shoota> @bararchy I have a script to retrieve the nightly builds from circle-ci: https://gist.github.com/straight-shoota/a2f4b29203936c04c578d6f6a1ad5f9b
<FromGitter> <bendietze_twitter> @silentworks if you are just asking with other meaning: if your binary for a supported platform is compiled correctly, there is no need for anything else - it runs natively ;)
<FromGitter> <straight-shoota> Seem's there is no easier way...
<FromGitter> <straight-shoota> @bendietze_twitter well, you typically need some dynamic libraries, depending on what is used by the binary (unless compiled statically)
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter> <j8r> omg @straight-shoota sorry but your script is terrible :(
<FromGitter> <bendietze_twitter> @straight-shoota thanks, can you give me something for example, a list or overview about? πŸ‘ :)
<FromGitter> <straight-shoota> @j8r but it works.
<FromGitter> <straight-shoota> you don't have to use it, though :P
<FromGitter> <j8r> haha :-)
<FromGitter> <straight-shoota> why do you think it's terrible?
<FromGitter> <hmans> Asterite has deleted his Reddit account?
<FromGitter> <straight-shoota> @bendietze_twitter https://crystal-lang.org/docs/using_the_compiler/
<FromGitter> <j8r> it isn't posix at all (lots of unnecessary bashisms), inline python code, no python version specified (`python` is `python3` on Arch and `python2` on Debian). Most of `echo ... | grep `can be replaced by string manipulation like `${var#to_remove}`
<FromGitter> <j8r> @straight-shoota In the point of the script, better do directly write a python script πŸ˜‰
<FromGitter> <bararchy> Seems to not download anything for me
<FromGitter> <bendietze_twitter> @straight-shoota ok, yes, we are conform :) @silentworks look at using_the_compiler above to read more about dynamically and static linking if it is needed πŸ‘
rohitpaulk has joined #crystal-lang
<FromGitter> <straight-shoota> @bararchy seems like the package names have changed? maybe...
<FromGitter> <straight-shoota> try with `ARCH=linux-x86_64`
TCZ has quit [Quit: Leaving]
<FromGitter> <straight-shoota> @j8r yeah, it has grown, initially it didn't use any python but then I needed to paginate through the JSON API. It would probably be better to rewrite it completely in python, but I don't care
<FromGitter> <straight-shoota> as longs as it works... and it usually does. I can use a freshly build compiler all the time =)
<FromGitter> <bendietze_twitter> @j8r maybe you have time to rewrite for all of us? Thx to @straight-shoota πŸ˜œπŸ‘
<FromGitter> <silentworks> Thanks everyone for your replies
<FromGitter> <bendietze_twitter> @silentworks good feeling with Crystal πŸ˜πŸ˜‰
<FromGitter> <j8r> @bendietze_twitter that's a good idea. If rewritten, it will be in Crystal πŸŽ‰
<FromGitter> <j8r> with a how to to compile it statically
<FromGitter> <j8r> or maybe with static binaries available - don't know
<FromGitter> <straight-shoota> Well, let's hope we won't need it for long because nightly build will be available trough an official channel 😍
* FromGitter * straight-shoota dreaming
<FromGitter> <S-YOU> @bendietze_twitter The concurrency I am referring to is Fiber. It may be not exactly same as Go. Well, that's what you have in the language, and I don't need to know implementation detail to talk about that.
<FromGitter> <bendietze_twitter> @S-YOU no, do not understand me wrong, i am just asking you because you started with... I looked at Go from March - Mai, the language does coroutines enormous good, you can start the coroutines just as you want and they have enormous power :) But, Go itself isnt mine, syntax isnt mine. So, because of the good implementation of the concept i thought its a very good blueprint. I do not know enough to
<FromGitter> ... compare to Crystal, but the concept of fibers is mostly the same as coroutines? Are they not comparable? I thought, though? :)
<FromGitter> <Val> @bararchy you need binaries of latest release (0.25.0), what's your distribution ?
<FromGitter> <bararchy> Arch
<FromGitter> <bararchy> Arch Linux 64-bit
<FromGitter> <Val> Or else https://gist.github.com/straight-shoota/a2f4b29203936c04c578d6f6a1ad5f9b from @straight-shoota
<FromGitter> <bendietze_twitter> @S-YOU because you wrote: Fibers and GC are not compatible with Thread ... Thats why i am thinking about... Go is multithreaded since 1.5, has GC and coroutines and all of this runs pretty good :) but i dont know the implementation, too :)
<FromGitter> <S-YOU> Simple because Fiber use stack switching, stack cannot be shared with other thread.
<FromGitter> <bendietze_twitter> @S-YOU ok :) does anybody know about coroutines? Its interesting, but maybe for most of you always written about 10.times ;)
<FromGitter> <S-YOU> I know go have GOMAXPROCS to use other cpu(not in detail), so I guess it is real multithread I believe, thats why I mentioned it may not exactly same as Go.
<crystal-gh> [crystal] RX14 closed pull request #6184: Fix: use Crystal::System::Random in Crystal::Hasher (master...fix-dont-use-random-secure-in-prelude) https://git.io/vhrmk
<FromGitter> <andrenth> Hello
<FromGitter> <andrenth> Does crystal have any features that help with shared mutable state problems in concurrent code?
<FromGitter> <bendietze_twitter> @S-YOU Yes, before Go 1.5 GOMAXPROCS was limited to 1, then changed to available cores. The goroutines/coroutines runs on stack, too (segmented stack)... Dont want to start a big discuss here
<FromGitter> <S-YOU> Yes, I really need to read Go source code to talk about Go. :)
<FromGitter> <bendietze_twitter> I havent done too :)
<FromGitter> <bendietze_twitter> In real, if Go would help us, i think the core team would already know about ;) There are big discussions about parallelism and concurrency in Crystal, were Go is involved, buts to much to read for me at this time 😟
alex`` has joined #crystal-lang
<travis-ci> crystal-lang/crystal#ebef46b (master - Fix: use Crystal::System::Random in Crystal::Hasher (#6184)): The build was fixed. https://travis-ci.org/crystal-lang/crystal/builds/391736236
<DeBot> https://github.com/crystal-lang/crystal/pull/6184 (Fix: use Crystal::System::Random in Crystal::Hasher)
duane has joined #crystal-lang
p0p0pr37 has quit [Remote host closed the connection]
p0p0pr37 has joined #crystal-lang
<FromGitter> <bendietze_twitter> gitter broken? .. Something i want to clear out but maybe i forgot is the way Go does: it runs (thousands of) it goroutines (coroutines) in a single thread, but if one blocks, the scheduler is able to move the courotines to another non blocking thread so they can run and will not be blocked. Is this imposible with Crystal fibers? So - i just want to understand - why are we using fibers instead of
<FromGitter> ... coroutine-implementation? Because of this, are we limited compared to Go? What is the orgin benefit of using fibers? :)
rohitpaulk has quit [Ping timeout: 248 seconds]
greengriminal has joined #crystal-lang
<FromGitter> <S-YOU> For fiber, if one blocks, the scheduler is able to move to the another fiber. That's what my understanding.
greengriminal has quit [Quit: This computer has gone to sleep]
<FromGitter> <bendietze_twitter> Just because very good material about Dmitry Vyukovs work on the Go scheduler: https://morsmachine.dk/go-scheduler and https://rakyll.org/scheduler/ which both talks about his technical work: https://golang.org/s/go11sched about concurrency and parallelism... But i think everybody knows
<FromGitter> <bendietze_twitter> I think is already talked about in Crystal parallelism and concurrency discussions
greengriminal has joined #crystal-lang
<FromGitter> <bcardiff> Articles about the overall design and technical details are always good to share. Don't undestimate them!
<FromGitter> <bendietze_twitter> :) dont want to spam with
<FromGitter> <bcardiff> Feel free to do so with the good ones as PM/email if you feel more comfortable :-). In the beginning we just through lots of papers in a dropbox folder with waj and ary to discuss differences in type system and designing the language.
<FromGitter> <bendietze_twitter> Every way is ok for me as long it feels i can contribute to Crystal, but there are so many discussions already done, it feels i need one million years to be up to date :)
<FromGitter> <asterite> A fiber is like a goroutine. Parallelism and concurrency will work exactly like in Go (so far). I don't understand why there's so much confusion around this. And it of course means that if you accidentally share mutable data, you'll get a nice segfault
<FromGitter> <asterite> The existing branches in the Crystal repo are about the above (job stealing between threads, tuning the runtime and GC to support multiple threads, etc.)
<FromGitter> <asterite> but they are unfinished, and the end result is that code executes slower than in a single thread. For me, that's good enough. The language has to be prepared for multiple threads, even if it's slower than in a single thread. Later on, someone crazy enough can come and send a PR to optimize everything
snsei has joined #crystal-lang
<FromGitter> <j8r> Is the multi-threads we are talking is about scheduling fibers across multiple threads?
sz0 has joined #crystal-lang
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 265 seconds]
<FromGitter> <bcardiff> yes
snsei_ has quit []
<FromGitter> <bendietze_twitter> I dare not ask anymore: and across cores?
<FromGitter> <bcardiff> As long as the OS allocate threads across cores, yes.
Philpax has quit [Ping timeout: 268 seconds]
<FromGitter> <bendietze_twitter> Topic closed πŸ˜„ πŸ‘
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
<z64> @j8r in an issue you mentioned jrei/crystal-alpine, this isn't your image is it?
wontruefree has joined #crystal-lang
<FromGitter> <j8r> yes it is
<z64> cool. i've not worked with --static at all, but i seem to be getting SIGBUS on GC_find_limit_with_bound when running the resulting binary. any hints as to how i might debug this?
<FromGitter> <j8r> it was about static compilation. I think it would be good to have an official way to do it, via Docker Alpine. This will remove issues that relates more about the distribution packaging than the language itself
<FromGitter> <j8r> The only thing is bdwgc - it's not compiled with `enable_large_config`
<FromGitter> <j8r> maybe it's the problem
<FromGitter> <rishavs> Question about using bcrypt. `.new(password : Bytes, salt : Bytes, cost = DEFAULT_COST)` why would the salt be in Bytes? I am not able to understand the use case here. (PS. i know I can use the normal string salt. I am ust curious about the bytes bit)
<z64> i see. i don't get this with just a "hello world" script, its something brought about by something the library i'm using does or my small script on top of it
<FromGitter> <j8r> You can solve this by either adding the flag to https://github.com/alpinelinux/aports or compiling gc yourself with the flag
<z64> okay, thanks. i don't know much about the gc, do you know what would cause this flag to be required?
<FromGitter> <j8r> this flag enable large config - it all the app to use more memory - I suppose
<FromGitter> <j8r> the GC to allocate more memory, or something like that
<FromGitter> <gdotdesign> @j8r I've come across the same problem using the docker image to statically compile
<FromGitter> <gdotdesign> nice to have some information about it πŸ‘
<FromGitter> <j8r> I can create an image with a custom compiled gc-dev if you want - that's not hard https://raw.githubusercontent.com/DFabric/apps-static/master/source/gc-dev/build.sh
<FromGitter> <bendietze_twitter> @rishavs maybe because its alias of slice due to performance reasons i guess
<z64> hm okay. i'll try to look into it more later when i'm at my home PC. IIRC my typical heap size is around 55-60MB
<FromGitter> <gdotdesign> let me try to reproduce it
<FromGitter> <j8r> We should not have the problem so z64 :|
<FromGitter> <gdotdesign> can reproduce by compiling Mint statically
<FromGitter> <gdotdesign> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b21460a37a2df7bed39da44]
<z64> the full application is https://github.com/y32/dex/tree/master/broker (client.cr) if you'd like to see
<crystal-gh> [crystal] MakeNowJust opened pull request #6192: Work formatting semicolon after block paren (master...fix/crystal-format/6164) https://git.io/vhKH7
DTZUZO has quit [Ping timeout: 255 seconds]
<FromGitter> <j8r> I will test on my side when back home
<FromGitter> <j8r> this occurs directly when running the binary?!
<z64> yes @j8r. it compiles just fine, no warnings/errors, when i run `bin/broker` it immediately segfaults
<FromGitter> <gdotdesign> @j8r yes
Raimondi has quit [Quit: WeeChat 1.9.1: Β‘Chau!]
<FromGitter> <faustinoaq> Hi all, is `result.to_json(context.response)` faster than string return `return result.to_json`?
<FromGitter> <bararchy> @j8r I just use @ysbaddaden GC for Crystal
<FromGitter> <faustinoaq> @bararchy Wow πŸ‘ ✨
<FromGitter> <bararchy> well, it's stable for me for more month~ now
<FromGitter> <bararchy> and it's standalone, static
<FromGitter> <bararchy> so not dependencies
<FromGitter> <bararchy> nothing, no leaks, no segfaults
<FromGitter> <bararchy> nothing
<FromGitter> <bararchy> and it's more aggrasive then Bohem
<FromGitter> <bararchy> at least for me
sz0 has quit []
<FromGitter> <faustinoaq> Just Wow!, πŸ˜„ , I have read @ysbaddaden 's GC README and looks like it works, but still lacks of some features πŸ˜…
<FromGitter> <faustinoaq> ^^ https://github.com/ysbaddaden/gc/#design
<FromGitter> <bararchy> Yeha, and still it's really good
<FromGitter> <bararchy> I didn't feel any diff, and I don't get the anoying "allocations might cause memory leaks" warnings
<z64> that's cool to hear. i'll have to try it myself. (though, with reference to what we're talking about before, it doesn't support musl yet)
<FromGitter> <bararchy> z64 are you sure about it?
<z64> quite sure :p
<z64> GC: unsupported target (only <arch>-linux-gnu is supported)
<z64> there is an open issue about it
<FromGitter> <bararchy> oh
<FromGitter> <bararchy> didn't notice
<FromGitter> <bararchy> not sure how hard it will be to add TBH
<FromGitter> <j8r> @bararchy 0 dependencies? I see it's written in C - we will still need a least a C compiler like Clang/gcc
<FromGitter> <bararchy> @j8r OI wouldn't call that a dep
<FromGitter> <bararchy> and I meant no runtime dep
<FromGitter> <bararchy> libgc not needed
<FromGitter> <j8r> but gc/immix needed :)
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vhKFJ
<crystal-gh> crystal/master 20d3549 TSUYUSATO Kitsune: Fix formatting semicolon after block paren (#6192)...
<FromGitter> <faustinoaq> http://www.agner.org/optimize/
<FromGitter> <faustinoaq> ^^ Interesting optimization resources here πŸ˜„
<FromGitter> <bararchy> @j8r only at compile time, it's a static lib
Raimondi has joined #crystal-lang
<FromGitter> <faustinoaq> @S-YOU Would be possible to add your h2o.cr examples (https://github.com/S-YOU/h2o.cr/tree/master/examples) to TFB (https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Crystal)? Are your bindings not ready yet? πŸ˜…
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
zachk has joined #crystal-lang
<travis-ci> crystal-lang/crystal#20d3549 (master - Fix formatting semicolon after block paren (#6192)): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/391858076
<DeBot> https://github.com/crystal-lang/crystal/pull/6192 (Fix formatting semicolon after block paren)
zachk has quit [Changing host]
zachk has joined #crystal-lang
<FromGitter> <j8r> I have discussed with a colleague who code in Java, and told me about the advantages to use chained arrays for my text editor. Is there something like this in Crystal / does it makes sense to have something similar in the language?
<wontruefree> I did a quick google search and it seem like chained arrays is term for having a chain methods that all return arrays. Is that what you are talking about?
<wontruefree> ie. `x.filter(z).find_all(q).delete_all(p)`
DTZUZO has joined #crystal-lang
<FromGitter> <j8r> I don't know much about them. He just told me that (in Java) I can use them instead of standard arrays
<FromGitter> <rishavs> Hi. I am trying to understand password hashing in Crystal. Generally when we hash passwords, we use a serverside salt/random string to make it extra secure. but `Crypto::Bcrypt::Password.create("super secret", cost: 10)` doesnt uses salts. Or is Crystal taking my mac address or some other parameter as the salt under the hood?
rohitpaulk has joined #crystal-lang
That_Guy_Anon has joined #crystal-lang
<z64> its generated from Random::Secure.random_bytes as a salt
<FromGitter> <rishavs> This is probably gonna sound stupid but is this salt going to be the same on different machines? ⏎ For example, i have separate office and home systems. I use git to work on the same codebase. Now if I add some hashed passwords from one machine running crystal, will it still work when git pull my codebase on another machine and run the server there?
<z64> not sure what you mean. its a randomly generated sequence of bytes, every time, at runtime
<z64> it will be different every time you run the program that does Password.create, let alone what machine it is run on
sz0 has joined #crystal-lang
<z64> @rishavs if you're intending to create a password on one machine, then check it from another, you need to save this hashed password to "re-create" the Password later on the other machine, then check input against this; https://carc.in/#/r/4a8s
<z64> see the docs on Password for other details
<FromGitter> <rishavs> thanks. πŸ‘
<z64> np :)
<FromGitter> <faustinoaq> Hi, Do crystal uses an event machine for concurrency or just CSP model?
<FromGitter> <paulcsmith> @rishavs BCrypt generates and stores a salt automatically: https://stackoverflow.com/questions/6832445/how-can-bcrypt-have-built-in-salts
<FromGitter> <paulcsmith> So you shouldn't have to worry about. One of the things I love about Bcrypt!
<FromGitter> <rishavs> Thats exactly my question, articulated much better. Thanks!
<FromGitter> <rishavs> I learned something new today πŸ˜„
rohitpaulk has quit [Ping timeout: 265 seconds]
duane has quit [Ping timeout: 248 seconds]
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Quit: Bye]
FromGitter has joined #crystal-lang
oprypin has joined #crystal-lang
<FromGitter> <hugoabonizio> @paulcsmith but how does it prevent rainbow tables when the salt and the cipher text are available to an attacker?
<FromGitter> <hugoabonizio> I didn't get that part
<FromGitter> <paulcsmith> Unfortunately I don't know it well enough to say
<FromGitter> <hugoabonizio> I'll search a little more, thanks for pointing that SO question, it's really interesting!
<z64> @hugoabonizio how are you figuring that attackers get the salt/ct? the bcrypt strings should only ever be accessible by the server, clients should be making password attempts over tls
<FromGitter> <hugoabonizio> @z64 if you your database is leaked, for example, you should be prepared for that
<FromGitter> <hugoabonizio> but I understood now, the cipher text was generated using this random salt, so even with access to the salt value this way does prevent rainbow table attacks πŸ˜„
<z64> i could be wrong, but i believe the idea is to have a big enough cost that time to crack practically defeats RT attacks
<z64> google seems to agree
<crystal-gh> [crystal] bcardiff closed pull request #5734: Documenting `Indexable#zip` and `Indexable#zip?` methods. (master...rp-add-docs-to-indexable-zip-methods) https://git.io/vA0OI
<FromGitter> <j8r> @gdotdesign @z64 this is not related to the `enable_large_config` thing of bdwgc. I'm prettyt sure it's related to the GC, but don't know why it segfault. You can create an issue
wontruefree has quit [Quit: bye]
<FromGitter> <hugoabonizio> @z64 yes, but they are different features of bcrypt that makes it more secure
<FromGitter> <j8r> before create the issue, I recheck again
<FromGitter> <hugoabonizio> what I'm saying is: both big costs and salts make RT impratical
<FromGitter> <j8r> You can also use Argon2, which is even better
<FromGitter> <j8r> @gdotdesign @z64 I confirm - not related to the size of the heap. What's strange is I don't experience the issue with my project, but yours you have it
greengriminal has quit [Quit: This computer has gone to sleep]
wontruefree has joined #crystal-lang
<travis-ci> crystal-lang/crystal#bb89684 (master - Documenting `Indexable#zip` and `Indexable#zip?` methods. (#5734)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/391919471
<DeBot> https://github.com/crystal-lang/crystal/pull/5734 (Documenting `Indexable#zip` and `Indexable#zip?` methods.)
wontruefree has quit [Quit: bye]
faustinoaq has quit [Quit: IRC client terminated!]
duane has joined #crystal-lang
faustinoaq has joined #crystal-lang
greengriminal has joined #crystal-lang
wontruefree has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Read error: Connection reset by peer]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Ping timeout: 268 seconds]
greengriminal has quit [Quit: Leaving]
zachk has quit [Quit: Leaving]
<FromGitter> <fgimian> Hey there guys, sorry to ask again. Is scry working on the latest Crystal release for you? Having trouble compiling here and wanted to know if it was just me or if it needs an update? πŸ˜„