<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 π
<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>
<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>
<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) :)
<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>
<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>
<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>
<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 π
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> 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.
<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
<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>
<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?
<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> 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
<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]
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? π