ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
* FromGitter * moe:busyloop.net has reached`@top_level`
<FromGitter> <Blacksmoke16> now on your way to `@bottom_level` :P
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp- has joined #crystal-lang
Sankalp- is now known as Sankalp
jhass has quit [Ping timeout: 265 seconds]
straight-shoota has quit [Ping timeout: 265 seconds]
straight-shoota has joined #crystal-lang
jhass has joined #crystal-lang
jmdaemon has quit [Ping timeout: 248 seconds]
_ht has joined #crystal-lang
alexherbo2 has joined #crystal-lang
<FromGitter> <rjnienaber> I have a few questions about my project, amazonite (https://github.com/rjnienaber/amazonite), an unofficial AWS SDK. For AWS SDKs in some other languages (e.g. javascript, ruby), there is a monorepo but the maintainers publish separate packages for each API, e.g. aws-sdk-s3, aws-sdk-dynamodb, etc to the package manager's website (e.g. npm, rubygems) . As I understand it, Crystal dependencies are managed via
<FromGitter> ... the VCS (Github for the most part) so you download the whole repo when you add a dependency. ⏎ ⏎ So my questions are: ⏎ ⏎ 1) Is there a downside to including all APIs in the repo from a compiled code size point of view? Will the compiler leave out the parts that are unused to create smaller binaries? ... [https://gitter.im/crystal-lang/crystal?at=63aecd37c4fec572d65f508f]
<FromGitter> <oprypin:matrix.org> @rjnienaber: all user-facing code should be under src. can be src/generated. codegen looks good to be outside of src
<FromGitter> <oprypin:matrix.org> you can test any theory regarding whether compiler leaves stuff out. both in terms of compile times and binary size. try adding and removing dirs and recompiling. try using most classes and then not using almost any classes and compare recompiling.
ht_ has joined #crystal-lang
_ht has quit [Ping timeout: 260 seconds]
ht_ is now known as _ht
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
<FromGitter> <moe:busyloop.net> oh i misunderstood, sorry. ⏎ but as the people on reddit wrote, it really doesn't sound like something you want to build yourself. would suggest to rather use one of the existing IT asset management tools (e.g. lansweeper or GLPI). or depending on your size/preferences, a plain old google sheet or airtable can go a long way.
<FromGitter> <moe:busyloop.net> much appreciated! an AWS SDK is really sorely missing from crystal. ⏎ (doing it all by hand with aws-signer.cr gets old quick...) ⏎ ⏎ godspeed to you. hope amazon will sling some sponsor-dollars your way when they see you doing their work. [https://gitter.im/crystal-lang/crystal?at=63aee39c3b37dd2c11562443]
<FromGitter> <moe:busyloop.net> > Is there a downside to including all APIs in the repo from a compiled code size point of view? Will the compiler leave out the parts that are unused to create smaller binaries? ⏎ ⏎ yes normally it does. i'd def start with just including all APIs - if it causes any issues later on then that can still be changed fairly easily.
alexherbo2 has joined #crystal-lang
<FromGitter> <rjnienaber> leaving `codegen` out of `src` seems like a good idea. i'm going to give that a go. thanks :)
<FromGitter> <rjnienaber> okay cool. thanks for the response :)
<FromGitter> <Blacksmoke16> if you structure the code so there's a file under `src` for each API. e.g. `s3.cr`, `dynamodb.cr`, etc. then the user could manually only require what they want
<FromGitter> <Blacksmoke16> e.g. `require "amazonite"` would be a file that requires each separate API file. but the user could also do like `require "amazonite/s3"` to explicitly require *just* s3 stuff
__ht has joined #crystal-lang
_ht has quit [Ping timeout: 268 seconds]
__ht is now known as _ht
hightower2 has quit [Ping timeout: 252 seconds]
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 260 seconds]
Starfoxxes has quit [Ping timeout: 265 seconds]
<FromGitter> <oprypin:matrix.org> in fact, consider not even providing a file that requires everything
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
hightower2 has quit [Ping timeout: 264 seconds]
hightower2 has joined #crystal-lang
<FromGitter> <michael-swan> I seem to be observing oddness relating to tuple literal parameter parsing: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ meanwhile adding a first argument: `f :foo, {1,2,3}` doesn't produce this error or adding parenthesis: `f({1,2,3})` also doesn't produce this error. [https://gitter.im/crystal-lang/crystal?at=63af2f7efb195421bd5fb425]
<FromGitter> <michael-swan> Am I doing something naive here, or is this a known/potential bug?
<FromGitter> <Blacksmoke16> basically same issue as https://github.com/crystal-lang/crystal/issues/7923
<FromGitter> <michael-swan> Huh interesting
<FromGitter> <Blacksmoke16> idk what the context is, but you could ofc do like `def f(*args : Int32)` then could just do `f 1, 2, 3`
<FromGitter> <Blacksmoke16> where `args` parameter would then be a tuple of the args you passed to the function
<FromGitter> <michael-swan> Gotcha, yeah no worries. I can find another way it's not a problem. Parsing a language such as this is pretty difficult I imagine
<FromGitter> <michael-swan> If it follows a comma it seems to not be ambiguous
<FromGitter> <michael-swan> I wonder how crazy changes to the parser would have to be to support differentiating cases such as this
<FromGitter> <Blacksmoke16> was mentioned in that issue, basically would need to support 3 level deep lookahead which is kinda :/
<FromGitter> <michael-swan> Yeah, interesting
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #crystal-lang
jmdaemon has joined #crystal-lang
<FromGitter> <benash> It seems to me that Crystal supports multiple dispatch. (I was excited to discover this code did what I wanted it to :) ): ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ But I didn't see this awesome feature mentioned much in the documentation. Are there any limitations to be aware of? The Julia community talks about its own support being hugely helpful for code reuse. [htt
<FromGitter> ... ps://gitter.im/crystal-lang/crystal?at=63af46f951d2482e91e4a0cc]
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
jmdaemon has joined #crystal-lang
<FromGitter> <benash> OK so the docs touch on it there in the section on overloading—but it's overloading that dispatches based on an arbitrary number of runtime types, right? It seems that very few languages do that.
<FromGitter> <Blacksmoke16> thats my understanding
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
<FromGitter> <benash> Pretty cool
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 252 seconds]
yxhuvud has quit [Remote host closed the connection]
yxhuvud has joined #crystal-lang
Starfoxxes has joined #crystal-lang
_ht has quit [Quit: _ht]
alexherbo2 has quit [Remote host closed the connection]
drakonis has joined #crystal-lang
_ht has joined #crystal-lang