ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.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
alex``` has quit [Ping timeout: 240 seconds]
alex``` has joined #crystal-lang
alex``` has quit [Quit: WeeChat 2.6]
alex`` has joined #crystal-lang
<FromGitter> <christopherzimmerman> Hey all, I'm running into a bit of trouble converting a `Range(Nil, Int32)` to a `Range(Int32, Int32)` where the first element is zero. Here is what I have: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I'm not sure how to make the range *not* be a mixed type. [https://gitter.im/crystal-lang/crystal?at=5d9fd746f1c89c0758c96b3b]
<FromGitter> <tenebrousedge> there's always `as(Range(Int32, Int32))` but there should be a way to do that without that
<FromGitter> <ilanpillemer> well I got the react tests passing. But the code is so bad.
<FromGitter> <tenebrousedge> @ilanpillemer I believe you
<FromGitter> <ilanpillemer> anyway.. at least I can go to sleep knowing the tests pass
<FromGitter> <tenebrousedge> show me tomorrow
<FromGitter> <ilanpillemer> 💤
<FromGitter> <tenebrousedge> bonus nachos :)
<FromGitter> <christopherzimmerman> @tenebrousedge yea I was hoping something like that would work but the cast fails :/
<FromGitter> <tenebrousedge> @christopherzimmerman can you do a quick example in Crystal Playground ?
<FromGitter> <christopherzimmerman> @tenebrousedge I moved the cast from the range itself to the individual pieces and it works like a charm! Thanks for the tip
<FromGitter> <tenebrousedge> well
<FromGitter> <tenebrousedge> okay :)
<FromGitter> <tenebrousedge> glad it worked
<FromGitter> <Blacksmoke16> Where does nil begin come from? Pretty sure they're not the same
<FromGitter> <christopherzimmerman> I need to pass ranges down a `c` library, so I have to fill in the zero, but I want to be able to use the syntax of the `nil` range so it's consistent with other crystal data structures.
<FromGitter> <Blacksmoke16> Gotcha
<FromGitter> <Blacksmoke16> And I'm assuming your use of the range requires it not have a beginning versus just being 0?
<FromGitter> <christopherzimmerman> It's for matrix slicing. With crystal arrays, `arr[...2]` and `arr[0...2]` are the same thing, but the c library I pass the indexing down to needs the start and end to be integers, it can't infer.
<FromGitter> <christopherzimmerman> I need to be able to use `m[...2, ...3]` and `m[0...2, 0...3]` interchangeably
<FromGitter> <Blacksmoke16> if you're using it as a range to access array values, why not just use `0` in both?
<FromGitter> <Blacksmoke16> because `...2` and `0...2` are not the same thing , they just happen to be the same for your use case
<FromGitter> <christopherzimmerman> Is there ever a case where `...2` and `0...2` will behave differently when indexing an array?
<FromGitter> <christopherzimmerman> That's the use case I have, I just want the syntax to match crystal as closely as possible.
<FromGitter> <Blacksmoke16> then use `0...2`
<FromGitter> <Blacksmoke16> an array is going to always going to start at `0`
<FromGitter> <tenebrousedge> is the initial index a variable or...?
<FromGitter> <Blacksmoke16> you dont need a beginless range to represent that
<FromGitter> <christopherzimmerman> This is a user facing feature, and I expect users to try and index my array the same way they access crystal arrays
<FromGitter> <Blacksmoke16> right which would be `0...n`
<FromGitter> <Blacksmoke16> `...n` includes all numbers less than `n
<FromGitter> <Blacksmoke16> goes to negative infinity
<FromGitter> <Blacksmoke16> just happens to work in an array since the lowest value is 0
<FromGitter> <Blacksmoke16> i.e. you cant have an index of `-1`
<FromGitter> <Blacksmoke16> (you can but it means something diff)
<FromGitter> <christopherzimmerman> I pretty much have been treating `n...` and `...n` as meaning "from `n` until the end", and "from the beginning until `n`" in terms of array indexing, most languages I've used use that syntax. Is that wrong in crystal?
<FromGitter> <Blacksmoke16> `n...` means from `n to positive infinity`, `...n` means from `negative infinity to n`
<FromGitter> <Blacksmoke16> which works for an array
<FromGitter> <Blacksmoke16> i always do `0...-1` but to be fair that syntax is prob more clear
return0e has joined #crystal-lang
<FromGitter> <christopherzimmerman> Those types of distinctions are the hardest part of learning a new language, I feel like I have so many tiny things that are going to need refactored :P
<FromGitter> <Blacksmoke16> but yea for an array it works, but its not specific to the array syntax
<FromGitter> <tenebrousedge> @christopherzimmerman next time write perfect code like the wrest of us do ;p
return0e has quit [Ping timeout: 276 seconds]
<FromGitter> <Blacksmoke16> think of it as a way to define a value that is *at leat* or *at most* n
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 264 seconds]
DTZUZO has quit [Quit: WeeChat 2.0]
chemist69 has quit [Ping timeout: 276 seconds]
chemist69 has joined #crystal-lang
return0e has joined #crystal-lang
return0e has quit [Ping timeout: 265 seconds]
DTZUZO has joined #crystal-lang
nowhereFast has joined #crystal-lang
<nowhereFast> as far as arguments, named arguments and named arguments with types go.. which is preferred if we're optimizing for performance?
return0e has joined #crystal-lang
ht__ has quit [Remote host closed the connection]
absolutejam4 has joined #crystal-lang
<FromGitter> <tenebrousedge> that's pretty much the last consideration for performance
<FromGitter> <tenebrousedge> if that makes a difference to your app, congratulations
<FromGitter> <ilanpillemer> there must be a way to have only one init method.
<FromGitter> <tenebrousedge> I think generics are possible
<FromGitter> <tenebrousedge> but maybe not with those test cases
return0e has quit [Ping timeout: 268 seconds]
<FromGitter> <ilanpillemer> all the other community examples seem to do the same hack
<FromGitter> <tenebrousedge> yes
<FromGitter> <tenebrousedge> I did mention that
<FromGitter> <ilanpillemer> yeah. I assumeed you meant most
<nowhereFast> fair enough, then as a matter of style, what is considered most idiomatic?
<FromGitter> <tenebrousedge> if you look at the standard library, most methods use plain arguments
<FromGitter> <tenebrousedge> a few, like `Time#shift` use named arguments
<FromGitter> <tenebrousedge> `Time#shift` also provides an alternative without named arguments
<FromGitter> <tenebrousedge> if named arguments is semantically appropriate, use them
<FromGitter> <tenebrousedge> usually that would be if there are a wide variety of potential arguments
<FromGitter> <tenebrousedge> if only one or two, normal args are fine
<FromGitter> <tenebrousedge> the Crystal standard library almost entirely omits type restrictions
<FromGitter> <tenebrousedge> if you are writing the Crystal standard library definitely do similarly
<FromGitter> <tenebrousedge> if you are not writing the standard library, consider the value of type restrictions
<FromGitter> <ilanpillemer> Time#shift does not seem to take process with multiple input params
<FromGitter> <tenebrousedge> @ilanpillemer I was responding to nowhereFast
<FromGitter> <ilanpillemer> aha! that explains my confusion
<nowhereFast> alright, then for cases where types need to be defined, I've seen this done at the getter/setter macros, is there a preferrence there?
<FromGitter> <tenebrousedge> macros usually have more type restrictions because the compiler has a harder time inferring those
<nowhereFast> that is, at arg or at getter/setter
<FromGitter> <tenebrousedge> there's no hard rule. If you can use `getter` with a block argument, feel free to do so
<FromGitter> <tenebrousedge> the most flexible way to write code is to use modules which operate primarily on `self`
<FromGitter> <tenebrousedge> which sidesteps the question of type restrictions
<nowhereFast> do you perhaps have some material I can chew on, on this?
<FromGitter> <tenebrousedge> I mentor students on Exercism (https://exercism.io) but haven't written a book yet. There is a Pragmatic Programmers book on Crystal that I haven't read yet. If you have specific questions then this is almost certainly the best place to raise them
<FromGitter> <tenebrousedge> @ilanpillemer when it's possible to control the calling code, I would think that generics would be the solution: one could do `ComputeCell(Int32, Int32).new(cell1, cell2) {|x, y| x + y }`
<nowhereFast> thanks tenebrousedge, appreciate the insight.
nowhereFast has left #crystal-lang [#crystal-lang]
early has quit [Ping timeout: 240 seconds]
<FromGitter> <tenebrousedge> @nowhereFast seekers of wisdom are flowers in the desert. If there's any way that any of us can be of service, feel free to ask
<FromGitter> <tenebrousedge> @ilanpillemer have you used Ruby?
early has joined #crystal-lang
<FromGitter> <ilanpillemer> not really
<FromGitter> <ilanpillemer> I looked at it once about 10 years ago, briefly
<livcd> how is now the parallelism story in Crystal ?
<FromGitter> <tenebrousedge> @ilanpillemer it has the same syntax, better metaprogramming, but more importantly it doesn't have typed procs
<livcd> well now it kinda does
absolutejam4 has quit [Ping timeout: 240 seconds]
<FromGitter> <tenebrousedge> @livcd oh?
<FromGitter> <tenebrousedge> I forget what all is looming in 2.7
<livcd> sorbet happened
<FromGitter> <tenebrousedge> @livcd true parallelism is currently behind a compiler flag, but is otherwise a thing in Crystal
<FromGitter> <tenebrousedge> oh, well. A third-party type checker seems a bit less restrictive / powerful by comparison
<livcd> But how useful is that parallelism. I imagine it is not as good as Go's
<livcd> sorbet should be incorporated in Ruby 3. Or at least a lot of it should be there by default
<livcd> (as optional)
<FromGitter> <tenebrousedge> a non-duck-typed (https://devopedia.org/images/article/24/2998.1514520209.jpg) Ruby seems like an interpreted C
<livcd> btw there's already a Ruby on LLVM but it is a commercial product
<livcd> I'd like to run some benchmarks against Crystal this weekend
<FromGitter> <tenebrousedge> I would assume that neither are as performant as Go for multiprocessing
<FromGitter> <tenebrousedge> but Crystal and Ruby are more optimized for development speed than execution speed
<livcd> RubyMotion execution speed should be on par with Swift
<livcd> at least that's the claim
<FromGitter> <tenebrousedge> well, a rising tide lifts all boats
absolutejam4 has joined #crystal-lang
absolutejam4 has quit [Ping timeout: 240 seconds]
<FromGitter> <watzon> (x) Doubt
<FromGitter> <tenebrousedge> about which?
<FromGitter> <watzon> The RubyMotion one
<FromGitter> <watzon> I mean it's possible, just doubtful
<FromGitter> <tenebrousedge> how fast is Swift supposed to be/
<FromGitter> <watzon> It's supposed to be faster than Objective C, at least according to Apple
<FromGitter> <tenebrousedge> Ruby 3 was supposed to be at least 3x faster
<FromGitter> <tenebrousedge> if PHP can pull a speedy rabbit out of a hat I don't know why Ruby couldn't do similarly
<livcd> why do you doubt it ?
<FromGitter> <tenebrousedge> well, I, being someone who ♥️ Ruby as much as anyone, would have to admit that it's the slowest interpreted language, and that this is to some degree inherent to the language: technically every method is dynamically dispatched
gangstacat has quit [Quit: Ĝis!]
gangstacat has joined #crystal-lang
absolutejam4 has joined #crystal-lang
absolutejam4 has quit [Ping timeout: 240 seconds]
absolutejam4 has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
dwdv_ has joined #crystal-lang
<FromGitter> <yxhuvud> Huh? Python has been slower for a long time now. (but yeah, it is slow. Just not the slowest)
return0e has joined #crystal-lang
absolutejam4 has quit [Ping timeout: 265 seconds]
absolutejam4 has joined #crystal-lang
alex`` has quit [Ping timeout: 276 seconds]
alex`` has joined #crystal-lang
absolutejam4 has quit [Ping timeout: 276 seconds]
alex`` has quit [Ping timeout: 240 seconds]
absolutejam4 has joined #crystal-lang
alex`` has joined #crystal-lang
dom96 has quit [Ping timeout: 245 seconds]
absolutejam4 has quit [Ping timeout: 268 seconds]
dom96 has joined #crystal-lang
<FromGitter> <mavu> Quick question: does it actually matter in which file I requrire for example "openssl" ? ⏎ I just noticed that I had forgotten to do it in a file in which I used it but it still worked because it was used in another file in the same project.
absolutejam4 has joined #crystal-lang
<jhass> mavu: kind off, you can imagine all the code to be concatenated into one huge file, that is require replaces itself (metaphorically speaking) with the code of the file unless there already was a require for the same file in which case it replaces itself with nothing
<jhass> so it doesn't matter for something to be available in the scope of the file, it matters for something to be available before its used
ma_ has joined #crystal-lang
<FromGitter> <mavu> @jhass thanks, makes sense then.
dwdv_ has quit [Ping timeout: 268 seconds]
ma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ma_ has joined #crystal-lang
ma_ has quit [Client Quit]
ma_ has joined #crystal-lang
ma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sagax has quit [Ping timeout: 265 seconds]
sagax has joined #crystal-lang
hypercore has joined #crystal-lang
<hypercore> is there a way to increase compile time for lucky while developing? takes about 10 seconds per change to reload the server
<FromGitter> <tenebrousedge> to *increase* compile time?
<hypercore> sorry, to reduce it
<hypercore> or is the only way to buy a better laptop
<hypercore> this one is quite old to be fair
<FromGitter> <tenebrousedge> I'm not personally aware of any way to do that.
<FromGitter> <j8r> remove `--release` :3
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
hypercore has quit [Ping timeout: 260 seconds]
Human_G33k has quit [Ping timeout: 250 seconds]
HumanG33k has joined #crystal-lang
DTZUZO has quit [Quit: WeeChat 2.0]
Human_G33k has joined #crystal-lang
hypercore has joined #crystal-lang
HumanG33k has quit [Ping timeout: 268 seconds]
hypercore has quit [Ping timeout: 260 seconds]
hypercore has joined #crystal-lang
hypercore has quit [Quit: hypercore]
<FromGitter> <andrius> Few questions: guys, how do you: 1) publish crystal docs with github pages: using master branch or separate repository dedicated for docs? 2) if you have quite a lot of samples – I think it is better to use separate repository for them?
<FromGitter> <Blacksmoke16> separate branch that gets handled by CI
<FromGitter> <tenebrousedge> ^
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5da0960939e2ef28adc405b8]
<FromGitter> <Blacksmoke16> for travis
<FromGitter> <tenebrousedge> I would go a long way to avoid having two repositories. But that's just me
<FromGitter> <naqvis> I'm in sync with @tenebrousedge on this, fortunately travis & github pages does the auto-magic of managing `gh-pages branch`, thus sparing developer to manage two different branches
Raimondi has quit [Quit: WeeChat 2.5: ¡Chau!]
ht_ has joined #crystal-lang
absolutejam4 has quit [Ping timeout: 265 seconds]
<FromGitter> <j8r> Even if everyone does it, I recommend against using github tokens
<FromGitter> <andrius> Thanks and samples? I am thinking to publish them as a micro-projects/apps; it is possible to do so within the same repo (won't it use more space on project that use my lib?) or in separate repo
<FromGitter> <Blacksmoke16> is an outstanding issue with GH actions, that once done will allow things to just work with an internal key
<FromGitter> <j8r> GH tokens is like giving your GH password
<FromGitter> <repromancer_gitlab> @j8r The fact that GitHub does not have detailed permissions control features for auth tokens just blows my mind.
<FromGitter> <kinxer> Yeah, that seems like it should be high-priority functionality.
<FromGitter> <firejox> Can we use *class variable* and *annotation* together?
<FromGitter> <firejox> This annotation is attached to class, not variable.
<FromGitter> <Blacksmoke16> No, not sure if it just hasn't been implemented yet or if there is a technical reason
<FromGitter> <firejox> Hope that is not implemented
<FromGitter> <firejox> And the error report is quite odd. https://play.crystal-lang.org/#/r/7s47
<FromGitter> <firejox> `ThreadLocal` is used to attach to the class variable.
<FromGitter> <naqvis> @firejox Crystal has both `class` and `field` level annotations. Refer to `JSON::Serializable` where `Field` annotation is applied on fields while `Options` can be applied at class level. ⏎ Your code need to include module `Foo` for it to compile. https://play.crystal-lang.org/#/r/7s4l
<FromGitter> <Blacksmoke16> i think he means you cant apply annotations to class ivars
<FromGitter> <naqvis> aahh oops
<FromGitter> <naqvis> thanks @Blacksmoke16
<FromGitter> <Blacksmoke16> why would including that module help if the annotation is applied to the class tho?
<FromGitter> <Blacksmoke16> seems like a bug imo
<FromGitter> <naqvis> seems like requirements for compiler to infer that, as even in `JSON::Serialiazable` docs, class level annotation is preaching the including of module
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7s4r it shouldnt matter
<FromGitter> <Blacksmoke16> @firejox id make a bug about it, https://play.crystal-lang.org/#/r/7s4w
<FromGitter> <Blacksmoke16> only happens if the first thing in the class is a class variable
<FromGitter> <firejox> this case report error https://play.crystal-lang.org/#/r/7s4s
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5da0ace7f88b526fb91f0c52]
<FromGitter> <Blacksmoke16> is minimal example
<FromGitter> <firejox> @Blacksmoke16 👍
<FromGitter> <naqvis> interesting enough its `check_class_var_annotations` method, which is raising that error ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5da0ae87dbf676673440dd39]
<FromGitter> <Blacksmoke16> issue is class annotations are bleeding into the class
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7s5f
<FromGitter> <Blacksmoke16> deff a bug
<FromGitter> <naqvis> 👍
<FromGitter> <firejox> 👍
Raimondi has joined #crystal-lang
deavmi has joined #crystal-lang
alex`` has quit [Ping timeout: 252 seconds]
alex`` has joined #crystal-lang
deavmi has quit [Ping timeout: 265 seconds]
<FromGitter> <jwoertink> I'm trying to figure out the best way to handle when you have an array of some parent type, but you don't know the names or how many children there are, so you type as the parent...
<FromGitter> <jwoertink> I can't "monkey patch" `OtherLib` here.
<FromGitter> <jwoertink> And it will return an `Array(Sub)` but it could also return `Array(OtherSub)`
<FromGitter> <jwoertink> Since I know of `Base`, I can't do `yield of Base` or` yield.as(Array(Base))`
<FromGitter> <jwoertink> so what's the best way to handle this?
<FromGitter> <Blacksmoke16> `.map(&.as(Base))`?
<FromGitter> <jwoertink> oh, interesting. That seems to work. I wonder if there's any performance hit with that, or if it's just one of those things that come along with the territory
<FromGitter> <Blacksmoke16> the ideal thing would be to do `[Sub.new] of Base` but i think you said you cant do that?
<FromGitter> <jwoertink> Yeah, definitely the ideal way, but I don't have access to do that
<FromGitter> <Blacksmoke16> are Sub and OtherSub the only child types?
<FromGitter> <Blacksmoke16> could just type to a union of those
<FromGitter> <jwoertink> There's an unknown number of subs
<FromGitter> <jwoertink> I was trying to see if there's a way I could dynamically build a union
<FromGitter> <jwoertink> but not really sure how to do that
<FromGitter> <jwoertink> I'll roll with the simple solution for now, and see how that goes. Thanks!
<FromGitter> <Blacksmoke16> you could
<FromGitter> <Blacksmoke16> something like `{{"Union(#{Base.subclasses.map(&.id).splat})".id}}`
<FromGitter> <jwoertink> oh sweet. I'll try that
<FromGitter> <Blacksmoke16> 👍
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
ma_ has joined #crystal-lang
dwdv_ has joined #crystal-lang
ma_ has quit [Ping timeout: 250 seconds]
Yxhuvud has joined #crystal-lang
absolutejam4 has joined #crystal-lang
hypercore has joined #crystal-lang
<hypercore> hey all, i'm getting this error when running lucky dev -> https://glot.io/snippets/fgt6qhh2in
<hypercore> could it be caused by using avram 0.12.0? i noticed that the latest release on github is 0.12.0-rc, so maybe that's why?
<FromGitter> <Blacksmoke16> sure there wasnt a breaking change in newest version?
<hypercore> i'm using lucky 0.18, so that shouldn't be an issue right?
<hypercore> and avram 0.12.0 according to shard.lock
<hypercore> oh you're saying that lucky 0.18 might not be compatible with avram 0.12.0?
<hypercore> oh wait, no 0.12.0 is in fact the latest release
<hypercore> also i used gen.resource to create the file that's causing the issue
<hypercore> not sure if thats relevant
<FromGitter> <Blacksmoke16> idk much about lucky but sounds like something didnt get updated?
<FromGitter> <Blacksmoke16> id ask on their gitter
<hypercore> i'll try reinstalling first, if that doesn't work i might have to ask on gitter
<hypercore> thank anyway ;)
<FromGitter> <absolutejam_gitlab> That example from the forums was amazing - https://play.crystal-lang.org/#/r/7s08
<FromGitter> <absolutejam_gitlab> Need more of this in the docs
<FromGitter> <Blacksmoke16> idt the same approach would work for JSON tho?
<FromGitter> <Blacksmoke16> unfortunately
<FromGitter> <absolutejam_gitlab> not parsed the same?
<FromGitter> <Blacksmoke16> uses a pull parser
<FromGitter> <Blacksmoke16> i.e. you cant rewind it
<FromGitter> <absolutejam_gitlab> ah
<FromGitter> <Blacksmoke16> like how that iterates the context, then pass it into the next type again
rohitpaulk has joined #crystal-lang
<FromGitter> <Blacksmoke16> but yea thats a pretty clean way to do that for yaml
* FromGitter * Blacksmoke16 can prob use that for athena/crylog
<hypercore> Blacksmoke16: reinstalled lucky and reran the gen.resource command, and now im not getting the error anymore, so not sure what was causing it. Probably some stupid mistype somewhere lol
<FromGitter> <Blacksmoke16> fair enough
<FromGitter> <absolutejam_gitlab> did you just @ yourself.....?
<FromGitter> <Blacksmoke16> `/me`
<FromGitter> <absolutejam_gitlab> o lol
<FromGitter> <Blacksmoke16> is what it does
<FromGitter> <Blacksmoke16> see my comment on your thread? would that be something that would help with what you were thinking of doing?
<FromGitter> <absolutejam_gitlab> oh yeah I meant to reply
<hypercore> is the crystal runtime (not sure if that's the correct word) pretty small compared to other languages?
<FromGitter> <absolutejam_gitlab> yeah, definitely
<FromGitter> <Blacksmoke16> afaik its bigger, is a lot of stuff included by default
<FromGitter> <absolutejam_gitlab> My immediate query was 'how do I decipher the deserialization magic'
<hypercore> i know it runs on llvm, but im not sure what performance constraints it has
<FromGitter> <Blacksmoke16> but that prob affects binary size more than runtime perf?
<FromGitter> <Blacksmoke16> and 👍 good to hear, need any help with it feel free to message me
<FromGitter> <absolutejam_gitlab> ```author = USERS.find(fn x -> x.name == input.author)``` ⏎ ⏎ right? [https://gitter.im/crystal-lang/crystal?at=5da0e66089acff6ff5dbdd95]
<FromGitter> <Blacksmoke16> prob?
<FromGitter> <absolutejam_gitlab> oh wait, is that anonymous function syntax in Crystal or Elixir?
<FromGitter> <Blacksmoke16> the top one would be the crystal syntax
<FromGitter> <absolutejam_gitlab> the bottom was meant to be the full Crystal syntax
<FromGitter> <absolutejam_gitlab> Got mixed up with Elixir
<FromGitter> <Blacksmoke16> :p
<FromGitter> <absolutejam_gitlab> What's the Crystal version?!
<FromGitter> <absolutejam_gitlab> It's completely slipped me
ht_ has quit [Quit: ht_]
<FromGitter> <Blacksmoke16> the first one?
<FromGitter> <absolutejam_gitlab> I wanted to see what the equivalent to the top one is without using the shorthand `&` syntax
<FromGitter> <absolutejam_gitlab> It's `->{ }` right?
<FromGitter> <Blacksmoke16> ah
<FromGitter> <Blacksmoke16> `USERS.find { |u| u.name == input.author }`
<FromGitter> <absolutejam_gitlab> oh yeah, jesus
<FromGitter> <absolutejam_gitlab> There's no :facepalm: in Gitter but imagine that XL
<FromGitter> <absolutejam_gitlab> I'm tired and i've been jumping between other languages alright...
<FromGitter> <absolutejam_gitlab> Was trying to decipher what the top example was from some docs.
<FromGitter> <Blacksmoke16> 👊 looks to be the bit more extreme equivalent
<FromGitter> <absolutejam_gitlab> I feel like that's an example of being too terse
rohitpaulk has quit [Ping timeout: 268 seconds]
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <ImAHopelessDev_gitlab> Nice! The crystal playground got updated a bit, looks nice!
snapcase_ is now known as snapcase
alex`` has quit [Read error: Connection reset by peer]
alex`` has joined #crystal-lang
<FromGitter> <jwoertink> lol. It doesn't work for me now
<FromGitter> <ImAHopelessDev_gitlab> Really?
<FromGitter> <jwoertink> > this.languages is undefined
<FromGitter> <ImAHopelessDev_gitlab> Hmmm
<FromGitter> <jwoertink> > Property set failed: object in path "model" could not be found.
<FromGitter> <jwoertink> oh, a hard refresh fixes it. Strange
_whitelogger has joined #crystal-lang
<FromGitter> <dburnsii> Do we have any form of `-nostdlib` option for the crystal compiler?
<FromGitter> <Blacksmoke16> `--prelude none` i think would do it
<FromGitter> <Blacksmoke16> er `--prelude none.cr` where its an empty file, obs not much is going to work unless you require everything yourself
<FromGitter> <dburnsii> Well the prelude by default is the prelude.cr included with Crystal right? I'm okay with using all of the crystal files, but I'm just trying to avoid using my local C library files. `--cross-compile` should avoid using these files right?
<FromGitter> <Blacksmoke16> Right, not sure about that tho
absolutejam4 has quit [Ping timeout: 265 seconds]
DTZUZO has joined #crystal-lang
hypercore has quit [Ping timeout: 260 seconds]