ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.3 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 265 seconds]
Philpax has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 264 seconds]
<crystal-gh> [crystal] asterite closed pull request #3769: Update playground CodeMirror to v5.22 (master...playground-codemirror-5.22) https://git.io/vMvAA
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vMfDS
<crystal-gh> crystal/master ab4a68e Ary Borenszweig: Pointer: make copy_from/copy_to/move_from/move_to work well with unions of pointers. Fixes #3775
<binBASH> Hi, what's the Crystal equivalent of Rust usize?
<travis-ci> crystal-lang/crystal#4cc34b6 (master - Update CodeMirror to v5.22): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/186707299
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 248 seconds]
<travis-ci> crystal-lang/crystal#ab4a68e (master - Pointer: make copy_from/copy_to/move_from/move_to work well with unions of pointers. Fixes #3775): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/186707396
<DeBot> https://github.com/crystal-lang/crystal/pull/3775 (Fix to concat a union of arrays)
martinium has joined #crystal-lang
<TheGillies> RX14: Was away, yeah. Well I'm just learning about the C system and thought libsodium would be fun to mess with. I'm not attempting a full port or anything
<TheGillies> Taking it as a opportunity to learn c some more as I learn crystal. two birds and all that
mjago has joined #crystal-lang
onionhammer has joined #crystal-lang
matp has quit [Excess Flood]
matp has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 268 seconds]
<martinium> anyone have any examples of how to prettyprint json output using crystal?
martinium has quit [Ping timeout: 265 seconds]
dtzu has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
<TheGillies> How do you add a string value the end of a slice?
<TheGillies> to the end*
dtzu has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
matp has quit [Quit: ZZzzzZz...]
pawnbox has quit [Remote host closed the connection]
DavidAlexander[m has joined #crystal-lang
pawnbox has joined #crystal-lang
<TheGillies> Running into weird err, hrm
<TheGillies> If I try to create empty slice and use it raises SIGABRT
<TheGillies> but if i "puts" before I use it, it works fine
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 252 seconds]
<TheGillies> Woohooo
<TheGillies> Christmas present to myself heh
soveran has joined #crystal-lang
vivus-ignis has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lune has joined #crystal-lang
m94asr_ has joined #crystal-lang
wmoxam_ has joined #crystal-lang
rtl_ has joined #crystal-lang
early` has joined #crystal-lang
Liothen has quit [Ping timeout: 252 seconds]
yopp has quit [Ping timeout: 252 seconds]
early has quit [Ping timeout: 252 seconds]
DeBot has quit [Ping timeout: 252 seconds]
m94asr has quit [Ping timeout: 252 seconds]
onionhammer has quit [Ping timeout: 252 seconds]
wmoxam has quit [Ping timeout: 252 seconds]
rtl has quit [Ping timeout: 252 seconds]
jamie_ca has quit [Ping timeout: 250 seconds]
scottj has quit [Ping timeout: 250 seconds]
z64 has quit [Ping timeout: 250 seconds]
Liothen has joined #crystal-lang
Liothen has joined #crystal-lang
Liothen has quit [Changing host]
yopp has joined #crystal-lang
jamie_ca has joined #crystal-lang
onionhammer has joined #crystal-lang
scottj has joined #crystal-lang
scottj has joined #crystal-lang
scottj has quit [Changing host]
lacour has quit [Quit: Leaving]
soveran has quit [Remote host closed the connection]
scottj has quit [Read error: Connection reset by peer]
scottj has joined #crystal-lang
scottj has joined #crystal-lang
scottj has quit [Changing host]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Chronium has quit [Read error: Connection reset by peer]
CompanionCube has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
matp has joined #crystal-lang
DeBot has joined #crystal-lang
pawnbox has joined #crystal-lang
akwiatkowski has joined #crystal-lang
scottj has quit [Quit: leaving]
<crystal-gh> [crystal] ysbaddaden opened pull request #3781: Sockets: docs for IPAddress, Addrinfo + some helpers (master...std-sockets-docs-and-resolve-domains-as-array) https://git.io/vMJvU
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
crystal-lang303 has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
<crystal-lang303> Hello, its impossible to use gcc instead llvm?
pawnbox has joined #crystal-lang
vivus-ignis has quit [Quit: vivus-ignis]
pawnbox_ has quit [Ping timeout: 260 seconds]
vivus-ignis has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #3782: Add Regexp::MatchData#== (master...feature/regexp-matchdata/equals) https://git.io/vMJJV
<crystal-gh> [crystal] MakeNowJust opened pull request #3783: Add Regex::MatchData#captures, named_captures, to_a, to_h (master...feature/regex-matchdata/captures-named-captures) https://git.io/vMJkD
bjz has joined #crystal-lang
Ven has joined #crystal-lang
hako has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hako has quit [Ping timeout: 268 seconds]
bjz has joined #crystal-lang
dtzu has quit [Read error: Connection reset by peer]
crystal-lang303 has quit [Quit: Page closed]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 248 seconds]
soveran has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 248 seconds]
soveran has quit [Remote host closed the connection]
bjz_ has quit [Ping timeout: 252 seconds]
bjz has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
mjago has quit [Read error: No route to host]
hako has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vMJYc
<crystal-gh> crystal/master 3512d3c Julien Portalier: Fix: UNIXServer shouldn't delete path on bind failures...
hako has quit [Ping timeout: 260 seconds]
hako has joined #crystal-lang
<7YUAAYHQC> [crystal] asterite closed pull request #3774: Fix issue #3772 (master...fix-issue-3772) https://git.io/vMff3
<18WAA3VCH> [crystal] asterite pushed 1 new commit to master: https://git.io/vMJY4
<18WAA3VCH> crystal/master 7e9be8a Sijawusz Pur Rahnama: Fix issue #3772
<DeBot> https://github.com/crystal-lang/crystal/issues/3772 (Markdown parser mangles codeblocks placed immediately after a list)
<DeBot> https://github.com/crystal-lang/crystal/pull/3774 (Fix issue #3772) | https://github.com/crystal-lang/crystal/issues/3772 (Markdown parser mangles codeblocks placed immediately after a list)
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vMJYE
<crystal-gh> crystal/master 225ff0d TSUYUSATO Kitsune: Don't remove docs in block yielding of macro (#3778)
pcc54 has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #3782: Add Regexp::MatchData#== (master...feature/regexp-matchdata/equals) https://git.io/vMJJV
<crystal-gh> [crystal] asterite closed pull request #3737: Added HTTP::Server.run method (master...patch-1) https://git.io/vMJYr
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Client Quit]
mgarciaisaia has joined #crystal-lang
<travis-ci> crystal-lang/crystal#3512d3c (master - Fix: UNIXServer shouldn't delete path on bind failures): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/186784815
pawnbox has joined #crystal-lang
olek_poz has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 264 seconds]
<travis-ci> crystal-lang/crystal#7e9be8a (master - Fix issue #3772): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/186785143
<DeBot> https://github.com/crystal-lang/crystal/issues/3772 (Markdown parser mangles codeblocks placed immediately after a list)
<travis-ci> crystal-lang/crystal#225ff0d (master - Don't remove docs in block yielding of macro (#3778)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/186785432
<DeBot> https://github.com/crystal-lang/crystal/pull/3778 (Don't remove docs in block yielding of macro)
dtzu has joined #crystal-lang
sagax_ has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#74151a3 (master - Add Regexp::MatchData#==): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/186785703
olek_poz has quit [Ping timeout: 264 seconds]
pcc54 has quit [Ping timeout: 260 seconds]
olek_poz has joined #crystal-lang
<FromGitter> <raydf> @TheGillies, nice, and thanks for contributing the shard with the bindings.
pcc54 has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
olek_poz has quit [Quit: Konversation terminated!]
sagax_ has joined #crystal-lang
mgarciaisaia1 has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://github.com/crystal-lang/crystal/commit/3a81780e099609fac70386a7e544e5b55d989b85
<crystal-gh> crystal/master 3a81780 TSUYUSATO Kitsune: Iterator#flat_map returns an iterator...
vivus-ignis1 has joined #crystal-lang
vivus-ignis has quit [Ping timeout: 258 seconds]
vivus-ignis1 is now known as vivus-ignis
mgarciaisaia has quit [Ping timeout: 245 seconds]
Philpax_ has quit [Ping timeout: 258 seconds]
<travis-ci> crystal-lang/crystal#3a81780 (master - Iterator#flat_map returns an iterator): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/186812830
<FromGitter> <martinium> how do you save input from STDIN to a variable? Something that works for non-string values as well as strings
<FromGitter> <martinium> c++ it is simple std::cin >> variablename
<FromGitter> <martinium> I assuming ruby syntax has a simple way of doing that no?
<miketheman> martinium: is `gets` not doing the job?
<BlaXpirit> martinium, please don't base your expectations on C++, it has the weirdest I/O system not applicable to real life. no other language has that. it's almost always string-based input, which you can convert to whatever you like afterwards
<BlaXpirit> example: read 3 numbers. a, b, c = gets.not_nil!.split.map &.to_s
martinium has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
sagax_ has quit [Read error: Connection reset by peer]
sagax_ has joined #crystal-lang
<martinium> lets say I just want the save user input to a variable
<martinium> is the gets command all I need?
<martinium> I want to be able to save a number to a variable
sagax_ has quit [Remote host closed the connection]
<Yxhuvud> well, you'd have to convert it to one
<Yxhuvud> (number, that is)
<martinium> I keep trying gets.to_i and it gives me an error
<martinium> I created a function that takes a number as input
<Yxhuvud> what error do you get?
<martinium> so I want the user input converted to an integer or float
<martinium> undefined method 'to_i' for Nil (compile-time type is (String | Nil)) (did you mean 'to_s'?)
<FromGitter> <asterite> `num = STDIN.read_line.to_i`
<martinium> let me try that
<FromGitter> <asterite> Or: `num = STDIN.gets.not_nil!.to_i`
<FromGitter> <asterite> Though looking at your code you probably want `to_f` instead of `to_i`
<FromGitter> <martinium> STDIN.read_line.to_i worked
<FromGitter> <martinium> yeah I will use to_f
<FromGitter> <martinium> for a float
<FromGitter> <martinium> @asterite thanks for your help, you'd be surprised how some little things can be frustrating to find information for
vivus-ignis1 has joined #crystal-lang
vivus-ignis has quit [Ping timeout: 246 seconds]
vivus-ignis1 is now known as vivus-ignis
hako_ has joined #crystal-lang
<FromGitter> <asterite> @martinium No problem :-) . I think Crystal right now is more intuitive/familiar if you programmed some Ruby before. We are missing some tutorial that guides you through the language and standard library
<FromGitter> <martinium> yeah, I've been noticing. I am going to use well-grounded rubyist in the meantime but doing the exercises in Crystal to learn the actual differences etc.
hako has quit [Ping timeout: 248 seconds]
<FromGitter> <martinium> looks like this language can use a dataframes library as it is not only limited to web programming
<FromGitter> <asterite> what is a dataframe?
<FromGitter> <martinium> it is a table with named columns and organizes data sets nicely. It is useful for reading numeric data sets
<FromGitter> <martinium> it is commonly used in R and in Python pandas lib. Julia-lang also has a library for it as well
<FromGitter> <martinium> it is a data structure like an array that can have nil values whilst having named columns
Ven has quit [Ping timeout: 245 seconds]
Ven has joined #crystal-lang
<FromGitter> <martinium> @asterite this program I wrote would "look" better presented in a dataframe
Ven has quit [Ping timeout: 268 seconds]
lacour has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 252 seconds]
bjz has joined #crystal-lang
<TheGillies> is there any plans to have a centralized library repo like rubygems or npm or is it going to stay like go where you just pointto a github repo?
Ven has joined #crystal-lang
<FromGitter> <bcardiff> you have crystalshards.xyz as a discovery, but the idea is to be descentralized.
Ven has quit [Ping timeout: 250 seconds]
<TheGillies> Would be interesting to hear the rational behind that. what's the advantages/disadvantages of that decision?
* TheGillies searches for a blog post
<Papierkorb> TheGillies: Much easier (for now) to set up, as no one has to host a global shard server (which may be €€€). Though on the long run I'd also prefer having a shard server I can set up. Although I'm fine with a dependency on git (not github)
<FromGitter> <asterite> Imagine I choose to write mysql bindings. I name my gem "mysql". Then I abandon it. That name is forever taken and lost. Now someone has to come with "mysql2" or stuff like that... With a decentralized approach names can't be "taken"
<FromGitter> <asterite> (in fact in Ruby there's a mysql2 gem)
<FromGitter> <sdogruyol> yeah it's funny but true :D
<Yxhuvud> I havn't seen that being a big problem in practice. I also know people that actually use the mysql gem.
<FromGitter> <sdogruyol> there's also libxml2 or something
<Yxhuvud> for reasons <tm>
<Papierkorb> Has its pros and cons I guess, though rubys model (and every other language using that scheme) breaks the moment you have a company/private shard/gem/X server
<Yxhuvud> CPAN has namespaces. that could help somewhat even if it wouldn't help public clashes.
<FromGitter> <asterite> Also, no need to host a centralized server. And authors get a bit more recognition
<FromGitter> <asterite> But this issue is definitely not set in stone
<Papierkorb> Albeit it's arguably harder to use, fiddling with URLs is less fun than a simple `gem install whatever`
<Yxhuvud> I'm happy as long as it don't adapt the python solution of having a zillion different ways and being really fractured
<TheGillies> how do you do versioning?
<TheGillies> no crystal deps I've seen so far have been versioned
<Yxhuvud> you can specify the version in the shard file.
<TheGillies> oh right because version file is created when you init a project so there is already a concept of "version" baked in
<TheGillies> Is there a planned 1.0 release target, or whenever it's ready?
Ven has joined #crystal-lang
pcc54 has quit [Ping timeout: 246 seconds]
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
<TheGillies> Hrm.. Is there a way to rescue from a KeyError for ENV? I have it wrapped in a begin/rescue but it's still freaking out. Maybe because ENV is a macro?
<TheGillies> That's all I can think of
<TheGillies> doh nevermind
<TheGillies> looking at wrong ENV variable heh
pcc54 has joined #crystal-lang
Ven has quit [Ping timeout: 268 seconds]
hako_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
mjago has joined #crystal-lang
vivus-ignis has quit [Ping timeout: 248 seconds]
vivus-ignis has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adam12> lol
vivus-ignis has quit [Ping timeout: 258 seconds]
<FromGitter> <andreaTP> @asterite any thoughts on using jars? For reps management I mean, there is a quite successful story in the Java world...
pcc54 has quit [Quit: leaving]
<FromGitter> <bcardiff> @andreaTP the code needs to be available at compile time in crystal. There is no mechanism to build a library and ship it.
<crystal-gh> [crystal] schovi opened pull request #3784: Fix #830 .step() arguments (master...normalize-step-arguments) https://github.com/crystal-lang/crystal/pull/3784
<FromGitter> <andreaTP> @bcardiff scalajs ship it and there are webjars since jar are just a kind of zipped folders there is no technical limitation on that
<FromGitter> <andreaTP> The point here is that you can ship sources without any problem, if you feel comfortable to embrace the boilerplatr maven publishing will give you back
<FromGitter> <bcardiff> shards allows paths dependency, so actually a wget + tar could do a similar trick if you want.
<FromGitter> <andreaTP> Wget doesn't guarantee anything on versioning...
<FromGitter> <bcardiff> I am unfamiliar with that maven-like repo will provide that is not handled by git.
<FromGitter> <bcardiff> You would prefer to decouple the tracking of source changes and the released versions of the code?
<Papierkorb> Maven *shudders*
<FromGitter> <andreaTP> Having a central authority that will ship forever releases for the libraries you use is a strong guarantee ....
<FromGitter> <andreaTP> @bcardiff sure breaking changes should have different releases
<FromGitter> <andreaTP> And git tag are indeed a mutable thing
bjz has joined #crystal-lang
<Papierkorb> andreaTP, seems more like a convention that this JAR file is never changed anymore. You can do the same on git.
<FromGitter> <andreaTP> @Papierkorb love and hate usually... I'm not aware of a so solid ecosystem for shipping libraries....
<FromGitter> <bcardiff> I feel that descentralized is more robust architecture. Even on central repositories you might have stories like left-pad with the publish, unpublish and ununpublish.
<FromGitter> <andreaTP> It is not a convention on release repos updates are blocked on public servers anywhere
bjz has quit [Client Quit]
<FromGitter> <andreaTP> @bcardiff I prefer decentralized too, but there is nothing so popular to overcome maven right now...
<FromGitter> <andreaTP> IPFS is cool but is a niche
bjz has joined #crystal-lang
<FromGitter> <andreaTP> And maven prevent from liftpad like stories
<FromGitter> <bcardiff> .. yeah. I was going to say IPFS. but we are a couple of years before that is mainstream probably.
<FromGitter> <bcardiff> maven leftpad https://issues.sonatype.org/browse/MVNCENTRAL-218
<FromGitter> <andreaTP> Totally true, anyhow if you guys are interested
<FromGitter> <andreaTP> It is not the same....
<FromGitter> <bcardiff> version vs whole library, but it is not append only, but it should.
<FromGitter> <andreaTP> I can help here publishing on maven Crystal libs....
<FromGitter> <bcardiff> I feel comformatable with github as a source, because my experience in ruby. I see no harm in allowing more sources definitely.
<FromGitter> <andreaTP> That's true @bcardiff
<FromGitter> <andreaTP> Wow, you don't want a central repo and you believe on git tags on Github?
<FromGitter> <bcardiff> Either discuss pros/cons on mailing list or even at github.com/crystal-lang/shards to allow interested parties to participate.
<Papierkorb> I'd be fine with a mechanism that understands git and tar.gz, really. For the latter a stupid static httpd already suffices, which is a plus. As long that works, I don't care if other people add whatever as additional source
<FromGitter> <bcardiff> git tags are not flawless. It dependes on mainteiners decissions, it can be deleted for sure. So, no. I don't trust them blindness.
<FromGitter> <bcardiff> But from certain authors/sources I would trust.
<FromGitter> <andreaTP> What I mean is that having both sources could be beneficial?
<FromGitter> <andreaTP> I come from a very different background so I would like to hear Rubysts one :-)
<FromGitter> <bcardiff> In ruby worls, with bundler you can depend on path, git(hub), bitbucket and rubygems. rubygems as a central repo where you publish/yank the gem.
<FromGitter> <bcardiff> In ruby if I expect people to use the gem I would publish it in rubygems. But if it is for internal use I am ok with git.
<FromGitter> <andreaTP> What is missing in Crystal is the use of standard "gems" or am I wrong?
<FromGitter> <bcardiff> There is no defacto versioning server to where publish shards, so crystal only has part of that story.
<FromGitter> <bcardiff> what do you mean by "standard gems" ?
<FromGitter> <andreaTP> I'm not really aware of what a gem is sorry ....
<FromGitter> <andreaTP> Anyhow It will be interesting to look if it will be possible to use jar dependencies to shards
<FromGitter> <bcardiff> shards works by expanding the dependencies in ./lib after getting the source from the location stated in shard.yml.
<FromGitter> <bcardiff> so, using maven is probably doable/hackable if you are interested. But the other part of the story is about transitive dependencies, I am not sure how those are advertised in the .jar/maven repo.
<FromGitter> <andreaTP> They are managed in Maven of course :-)
<FromGitter> <bcardiff> as for ruby work, when you pulish in rubygems a `.gem` file is created that is essentially a TAR.
<FromGitter> <andreaTP> It essentially the same... It will be possible to publish Crystal gems?
<FromGitter> <bcardiff> Technologically possible yes. Interest/infraestructure, not sure.
<FromGitter> <bcardiff> I am fine with github as repo. I understand it's limits. But as I said, a discussion in shards or mailing list might offer better/deeper responses.
<FromGitter> <andreaTP> Why? Without that it will be hard to use Crystal for a long life app IMO
<FromGitter> <andreaTP> OK, sorry ;-)
<FromGitter> <andreaTP> I hope to have time in the next days to start it! @bcardiff thanks anyhow!
<FromGitter> <bcardiff> For example, something simpler is having a central documentation repo. There have been 2 projects to do that. the last one is docrystal.org . Nice infraestructure, but you need to maintain it in effort and money.
<FromGitter> <bcardiff> They were run by other than crystal-lang.org, and we are really happy, but as community/personal projects things are hard to keep them running.
<FromGitter> <bcardiff> crystal infraestructure is barely minimal and the resources go mainly to development time.
<FromGitter> <andreaTP> I can believe
<FromGitter> <bcardiff> @andreaTP I am happy to discuss pros/cons :-) and any kind of contribs are welcome. So go for it, but I would suggest further discussion so it is not only something you will be having fun with :-)
<FromGitter> <bcardiff> so a documentation server is way more simpler than a versioning.
<FromGitter> <bcardiff> But since there is no one right now, I for example did https://github.com/bcardiff/ghshard to publish some docs of shards outside std.
<FromGitter> <andreaTP> @bcardiff sounds good! Sorry I'm a totally newbie here, I come from Scala mainly and found Crystal really interesting, said that, right now, one big problem with scala is about ecosystem, so I'm digging it here (probably prematurely )
<FromGitter> <andreaTP> But I really enjoyed your arguments :-) thanks
<FromGitter> <bcardiff> no need for apologies. me too :-)
<crystal-gh> [crystal] kostya opened pull request #3785: JSON::ArrayBuilder#push_raw method (master...json_builder_push_raw) https://git.io/vMJrY
<Papierkorb> andreaTP, I think having a good ecosystem is a must-have (though one has to define what that means), I think this discussion was interested, even if only as starting point. Crystal is in its alpha/beta stadium, so right now there are shards with the somewhat simplest distribution solution. I expect a final-ish answer for the 1.0 though :P
<FromGitter> <andreaTP> @Papierkorb is it already expected?
<FromGitter> <andreaTP> :-)
<Papierkorb> Nope :D
<FromGitter> <andreaTP> XD
<FromGitter> <andreaTP> Not a real problem right now :-)
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<Papierkorb> Feel free to open an issue on github though
<FromGitter> <andreaTP> I need too... Also I have a couple of points on the first touch (I.e. the page showing how to compile docs before even installing Crystal compiler... )
<FromGitter> <andreaTP> I will do that in the next days anyhow!
<Papierkorb> Has anyone in here benchmarked crystals JSON parser to rubys JSON parser? Without object mapping
<Papierkorb> I'm transforming 25 million JSON objects into something I can feed (and actually use in) postgres, takes about 2hrs with ruby and the `oj` gem. With the stock parser it'd take at least twice as long. Now I'm wondering if crystal would be much faster for this. There's no number crunching, it's a kinda simple-ish transformation
<martinium> Papierkorb: crystal should be waaaayyyyyyy faster
<martinium> try to compile it to crystal. Probably need only make a few changes to the code for it to compile
<Papierkorb> I may in the coming days. I already cut it down from (approx) 8.5 days to 2hrs transform + ~2hrs COPY import, I'm fine with these times
<Papierkorb> with some hackery I could take it to 30mins, but that stuff is read-only data and I may update it every other week. Not too much of a concern atm ;)
soveran has quit [Remote host closed the connection]
<BlaXpirit> martinium, hey it's not always faster, if ruby has a battle-tested C implementation
<TheGillies> that's not really "ruby" though
<BlaXpirit> nobody said it had to be "really"
<Papierkorb> that not being ruby is like writing a bash script without using external programs. You can do it, but it's just awkward and slow.
<RX14> thats not really fair
<RX14> ruby without C extensions is perfectly usable, bash with pretty much all of the commands it's meant to be the thin layer between removed is not
<RX14> also crystal performed quite well in JSON speed tests iirc
<RX14> the implementation looks pretty efficient to me
<RX14> so I would be surprised if crystal wasn't a lot faster
<Papierkorb> Will try it later, for that it'd suffice to just read the entire thing (or rather, an excerpt) and compare that to rubys time. rigorous testing (lol) on my end showed that JSON parsing is the main time consumer in that process.
vivus-ignis has joined #crystal-lang
martinium_laptop has joined #crystal-lang
<RX14> well i'll be interested to see the results
bjz has quit [Ping timeout: 252 seconds]
bjz_ has joined #crystal-lang
martinium has quit [Ping timeout: 250 seconds]
<FromGitter> <jwoertink> Is there a way to get the current load path? Or even better, a way to get a list of all the libraries that have been required in the app already?
vivus-ignis has quit [Ping timeout: 248 seconds]
martinium_laptop has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RX14> i imagine that would only be useful in macros
<RX14> you can get the load path with {{ ENV["CRYSTAL_PATH"]? }}
martinium has joined #crystal-lang
hako_ has joined #crystal-lang
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 252 seconds]