ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.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
_whitelogger has joined #crystal-lang
hightower3 has joined #crystal-lang
<FromGitter> <faustinoaq> Hey community, the result of crystal survey have been published in some place ? @sdogruyol Do you know something ? 😅
hightower4 has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 248 seconds]
<zacts> helloo
<zacts> oh cool gitter. I'll switch over to there
<FromGitter> <zacts> hello
<FromGitter> <zacts> I'm zacts from irc now on gitter
<FromGitter> <zacts> I love the progress I've seen with this project
<FromGitter> <zacts> I'm curious, but is FreeBSD planned to be a supported platform for crystal?
zacts has left #crystal-lang ["WeeChat 1.4"]
<wmoxam> @zacts it's supported (somewhat)
<FromGitter> <zacts> wmoxam: does it at least build easily?
<FromGitter> <zacts> like it could easily be improved
<wmoxam> I don't know if anyone is maintaining a package
<FromGitter> <zacts> ah I see
<wmoxam> The last time it was 'officially' built for FreeBSD was in 0.19.4
<wmoxam> same goes for OpenBSD
<wmoxam> I have done some work on an OpenBSD port (https://github.com/wmoxam/crystal-openbsd-port)
<FromGitter> <zacts> oh cool
<FromGitter> <zacts> I'll look into it sometime
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <iambudi> Is just in my laptop or crystal icr is indeed a bit slow when executing code?
Creatornator has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter> <Hellfire01> are there associative arrays in Crystal ?
<FromGitter> <Hellfire01> I need something like this : ⏎ ⏎ ```arr = ### ⏎ arr[:download] = true ⏎ arr[:parse] = true``` [https://gitter.im/crystal-lang/crystal?at=59dd83ba01110b72319ee887]
<FromGitter> <Hellfire01> I have multiple classes that need to take exactly the same argument for configuration
<FromGitter> <Hellfire01> nevermind
<FromGitter> <Hellfire01> found it
<FromGitter> <Hellfire01> the hash
<FromGitter> <iambudi> Yes using hash
<FromGitter> <iambudi> arr = {:download => true, :parse => true} something like that
<FromGitter> <iambudi> arr[:another] = true
<FromGitter> <Hellfire01> sure is going to be hard to use a smiley in the cose XD ( thanks for the tip ^^ )
<FromGitter> <Hellfire01> *code
<FromGitter> <Hellfire01> any static variables in Crystal ?
<FromGitter> <Hellfire01> or should I use file / global scoped variables
<FromGitter> <Hellfire01> ?
<FromGitter> <Hellfire01> er
<FromGitter> <Hellfire01> how o you declare a file / global variable ?
<FromGitter> <iambudi> You can create a class with @@ variable
<FromGitter> <iambudi> or put in a module
<FromGitter> <Hellfire01> thanks
<FromGitter> <Hellfire01> is that the same as in Ruby ?
<FromGitter> <iambudi> I don't use ruby
<FromGitter> <Hellfire01> where the variable is shared by all instances of the same type of class
<FromGitter> <iambudi> I guess so
<FromGitter> <Hellfire01> will roll with it for now thx
<FromGitter> <Hellfire01> will check that last point later I guess ^^'
<FromGitter> <Hellfire01> how do I solve this error ? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ `undefined method '<<' for Nil` [https://gitter.im/crystal-lang/crystal?at=59dd9109b20c642429e946b9]
<FromGitter> <Hellfire01> @@argDown << Argument_data.new("id", 2) ⏎ ⏎ ``` ^~``` [https://gitter.im/crystal-lang/crystal?at=59dd914b01110b72319f1bff]
<FromGitter> <Hellfire01> i mean
<FromGitter> <Hellfire01> il literaly give it a value on the line above in the same bloc
<FromGitter> <Hellfire01> so why is he not happy ?
<FromGitter> <Hellfire01> variable declaration is :
<FromGitter> <Hellfire01> @@argDown = Arra(Argument_data)?
<FromGitter> <Hellfire01> found a way arround it but still confused as to why he is complaining ?
<FromGitter> <Hellfire01> nope, did not find a way arroind it >_<
<FromGitter> <iambudi> What is argument_data
<FromGitter> <Hellfire01> a class of mine
<FromGitter> <Hellfire01> class Argument_data # used for the arguments of the instructions ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59dd96453cb340a2610d0a18]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <iambudi> Would it work if you change Array(Argument_data).new to Array(typeof(Argument_data)).new
<FromGitter> <Hellfire01> how does it work ?
<FromGitter> <iambudi> Just to make sure the type of Argument_data
<FromGitter> <Hellfire01> will try thanks
<FromGitter> <Hellfire01> nope
<FromGitter> <Hellfire01> Crystal did not like it at all
<FromGitter> <Hellfire01> need to go to bed so will try more stuff tomorow, thanks anyway
<FromGitter> <bew> @Hellfire01 have a closer look at https://crystal-lang.org/docs/syntax_and_semantics/if_var.html
<FromGitter> <bew> Also I suggest you create the array in a variable, fill it, and when ready, store it in class variable
DTZUZO has quit [Ping timeout: 248 seconds]
DTZUZO has joined #crystal-lang
alex`` has joined #crystal-lang
wontruefree has joined #crystal-lang
wontruefree has quit [Ping timeout: 248 seconds]
Papierkorb_ has joined #crystal-lang
flaviodesousa has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
<Groogy> Morning o/
<Papierkorb_> Morning \o
<FromGitter> <OldhamMade> Morning \o/
<FromGitter> <OldhamMade> I've reduced my kemal error down as much as I can
<FromGitter> <OldhamMade> my current thought is that it's down to the crystal install that's being used in the container, so I'll next look at building crystal manually directly on alpine.
<crystal-gh> [crystal] akzhan opened pull request #5100: Complex.hash(hasher). (master...complex.hash) https://git.io/vdrcy
<crystal-gh> [crystal] akzhan opened pull request #5101: Optimized BitArray.hash(hasher) (master...bit_array.hash) https://git.io/vdrc9
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark_66 has joined #crystal-lang
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
claudiuinberlin has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Groogy> had a discussion yesterday how we could potentially hook up our script language to LLVM.....
<Groogy> alcohol might have been involved
<FromGitter> <bew> ahahah nice derivation
<Groogy> big complaint is no debugging tools and I said this as a "Well we could do this to just get everything for free..."
<Groogy> and then we got talking about how it would actually work together with modders etc.
<FromGitter> <bew> you wanted to use llvm for jit? or compilation?
<FromGitter> <bew> nvm "script"
<FromGitter> <sdogruyol> @faustinoaq not yet
<Groogy> compilation, compile it to a shared library and load it at runtime
<FromGitter> <bew> well there is lldb, but maybe it's not what you're looking for?
<FromGitter> <bew> ah ok, nice
<Groogy> we are not actually doing it though xD it would be insane
<Papierkorb_> Transpiling to Lua I could understand, but LLVM for what's basically a behaviour definition script? wat
<FromGitter> <bararchy> @OldhamMade ( @sdogruyol ) I too have this issue, but only when compiling in `--release` mode, in regurlar debug mode I can't reproduce
<Groogy> Papierkorb_ the qualifier of the whole event is "alcohol might or not been involved"
<Papierkorb_> Groogy: I saw that, I put it into context, and still: Wat
<Groogy> Our modders do insane things and it would enable them to do more without slugging down the game
<Groogy> I already have implemented an optimizer that at runtime redoes the script to make it faster while retaining the normal execution
<Groogy> this would be that but just like.... better
<Papierkorb_> LuaJIT *cough*
<watzon> I'm getting a weird error when I try to compile with `--release` that I'm not getting otherwise
<watzon> ```
* watzon sent a long message: watzon_2017-10-11_08:42:48.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/buUlOGWaeQeIJmpesPlxFfFT>
<FromGitter> <bararchy> watzon use `--release --no-debug`
<FromGitter> <bararchy> this is a kown issue
<watzon> Gotcha, thanks
claudiuinberlin has joined #crystal-lang
<watzon> Do you have a link to the issue in github so I can follow it?
<FromGitter> <bararchy> the "fix" is to ugrade your llvm to 4.0 or above
<FromGitter> <bararchy> AFAIK
<FromGitter> <bararchy> latest Crystal droped support for anything <4.0
<Groogy> no but our script language is faster than LuaJit
<Papierkorb_> it's not turing complete, right?
<Papierkorb_> Or better: It's not general purpose
<Groogy> it's not no, not supposed to be either really
<Papierkorb_> If I remember the snippet you posted correctly, then you wouldn't benefit from LLVM at all.
<Groogy> well our more advanced scripts would, like the on_action hooks etc.
<Papierkorb_> If it's actually bogging your game down (huh), I'd imagine faster code paths to do the trick. Maybe a "Query planner" (in RDBMS terms) to e.g. analyze the script and find stuff that could be cached, or parallelized
<Groogy> where we have more conditional logic which is often based on static things you can now ahead of time and optimize for
<Groogy> we already do those things
<Groogy> for instance you can fetch out "all characters who have this specific traits" and that is already cached
<Papierkorb_> I guess correctly you already profiled the bottlenecks in your game?
<Groogy> yepp
<Papierkorb_> Is the time spent actually calculating something inside the script itself?
<Groogy> this was more of a crazy idea and wasn't 100% serious
<Groogy> but it would have some benefits we are way too lazy to just implement ourselves
<Papierkorb_> I'm not aiming at LLVM :P
<Groogy> yeah for instance the AND trigger (conditional script) takes up a lot of time
<Groogy> since it is used everywhere it will turn up in the profilers a lot
<Groogy> and most of the time we could potentially optimize them away, but they work as a sort of language construct
<Groogy> like the NOT = {} is an AND that just reverts it and the scripters often write them next to each other since it looks better when they could in fact be merged (the loadtime optimizers does this right now)
<Groogy> ugh in fact we should just hire someone to sit fulltime and work with our language ( ´_ゝ`)
<Papierkorb_> .. Actually sounds fun
<Groogy> I did a proof of concept debugger but never got time to finish its interface, just having someone working dedicated on that would be great
<Groogy> speaking of debugger, I haven't hooked it up yet in VS Code, how well does Crystal debugging work with VS Code?
<Groogy> if anyone knows
<Papierkorb_> If there's a good gdb plugin, it should work
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <yxhuvud> groogy: .are you using regular lua or lua-jit?
<FromGitter> <yxhuvud> never mind,, the answer is neither and I got that after reading through the backlog :D
claudiuinberlin has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<Groogy> heh :P
<Groogy> Papier meant "why don't you just use Lua"
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb_> Not at all. I asked if you considered transpiling to Lua, hence using it as execution engine.
<Papierkorb_> Which wouldn't make much of a difference if the code ran within it is not what's resource heavy
RX14 has quit [Excess Flood]
RX14 has joined #crystal-lang
early has quit [Quit: Leaving]
early has joined #crystal-lang
RX14 has quit [Excess Flood]
RX14 has joined #crystal-lang
hmans has quit [Read error: Connection reset by peer]
hmans has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #5102: Support varargs for ProcLiteral (master...feature/crystal/proc-literal-varargs) https://git.io/vdryb
<Papierkorb_> ^ Wondering how you'd access the ... pack
<Papierkorb_> Also, with that change, you should be able to implement libc in Crystal .. for C programs .. yeaaaah
<crystal-gh> [crystal] MakeNowJust opened pull request #5103: Add VaList API (master...feature/va_list) https://git.io/vdr9J
<Papierkorb_> ^ That explains it
<FromGitter> <yxhuvud> Do procs support *rest args? If not, then it would be nicer if it reused the *args syntax but did the VaList.open stuff under the hood.
<Papierkorb_> Not possible, you don't know how large a va list i
<Papierkorb_> is*
<Papierkorb_> Which is why I proposed VaList having a Iterator-style API instead
<Papierkorb_> yxhuvud, (at least on x86) a va_list is really just a pointer to the stack, which is moved on it accordingly each time you read a value from it. The caller simply pushes all values, jumps to you, and later on, pops all values again. The caller knows how many items there are, the callee does not.
<Papierkorb_> yxhuvud, which is why such C functions commonly have a "int count" argument, or expect you to pass a NULL as last element.
<Papierkorb_> E.g., `printf("%x %x %x\n");` misses elements for the %x's. While your compiler should complain about it, it'll compile through. Behaviour of this is undefined, you'd end up reading arbitrary stack space instead.
<FromGitter> <yxhuvud> right. I suppose what I proposed would imply \*args for procs would return something that isn't an array. But it is still nice to get a name to it and have it in a variable instead of some magical context depending module
<Papierkorb_> In turn, this is why `printf(some_user_controllable_string, foo, bar, baz)` is so dangerous. Even worse, this printf call could be abused for writes to the stack, making this not only a possible crash, but actually a code execution.
<Papierkorb_> yxhuvud, I don't like `*` used there, imho too similar to `*args` everywhere else. I get your intention, but I'd rather have a forced "break" of it here as reminder for users. You could otherwise expect `some_crystal_method(*args)` to work, which is not possible
<FromGitter> <yxhuvud> some other prefix perhaps, then, to mark the difference?
<FromGitter> <yxhuvud> +args ?
<Papierkorb_> I'd prefer the allowed syntax not to change, I'd be fine if `VaList` was magical
<Papierkorb_> Not change because that's another thing to learn and teach, and for tools to know, for a syntax that most won't affect
<FromGitter> <yxhuvud> Hmm, what content is it in a VaList? Would it need to be def foo(va_args : VaList(Type)) ?
<FromGitter> <yxhuvud> ie are they typed or limited to something generic that has to be cast?
<Papierkorb_> iirc, the standard says about it being the size of a `void*`. I might be wrong though
<Papierkorb_> No, untyped unknown-length glory
<Papierkorb_> It's literally a stack pointer
<Papierkorb_> And it's exactly as dangerous :)
<FromGitter> <bew> super unsafe x)
<FromGitter> <bew> Let's add a VaList.to_super_unsafe_pointer (In case you didn't know it was)
claudiuinberlin has joined #crystal-lang
<Papierkorb_> It's actually just as unsafe as doing `def foo; StaticArray(Int32, 123).new.to_unsafe.to_slice(123); end`
<Papierkorb_> Just that a VaList has a better chance to not crash the application I guess
<Papierkorb_> bew, But I think it'd be fine. Barely anyone would use it, I think it needs to be there for completions sake first, as there will be some (few?) users for it in the long run. But can't say I have missed it up to this point :)
<FromGitter> <krypton97> Has anyone worked with opengl here :)?
<Papierkorb_> Groogy is building a game engine and a game, which happens to use OpenGL
<Papierkorb_> krypton97
<FromGitter> <bew> Papierkorb_ yes right, in fact any Pointer is unsafe, so yes..
<Papierkorb_> Well some are safer than others. Reference is literally a pointer
<Papierkorb_> Just a pointer that's guaranteed to be non-dangling
<Groogy> Yes I have worked with OpenGL
<Groogy> you had a question @krypton97?
<Papierkorb_> bew, Don't fear the concept, but its misuse. E.g., Clang is using tons of references over pointers. It does feel foreign at first, really, but one gets used to it. Those are pointers too, but the compiler guarantees me that they're correct. Really interesting feel it gives, in C++/Qt you only used refs to pass around value types, but not objects. If e.g. the compiler would (try to) track pointer usage, you could make them pretty safe in
<Papierkorb_> Crystal, as it could catch misuse like returning a slice of a static array
<Papierkorb_> )Not saying this is easy at all)
<Papierkorb_> Groogy: Oh and please keep us posted on your progress :)
<crystal-gh> [crystal] ysbaddaden opened pull request #5104: Add (Half)SipHash PRF and integrate it into Crystal::Hasher (master...std-siphash) https://git.io/vdrxe
<FromGitter> <bew> oh I don't fear the concept at all, I know C & C++ enough to avoid doing stupid thing, and already had fun with quite a good number of full projects in those languages (thanks school!)
<Papierkorb_> Wait there's UInt8.static_array? Why..
<FromGitter> <bew> I was just pointing out that it was sth quite unsafe to expose to crystal, but in the end it'll be almost as unsafe as everything touching lib bindings, so it's not "especially" unsafe
<FromGitter> <bew> Papierkorb_ well here's Int8.slice & Int8[] in the same vein (top of src/number.cr)
<Papierkorb_> „Why“ is really I can come up with bew
<Papierkorb_> *all I can
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<FromGitter> <straight-shoota> is there an easier way to split one string into two at a given position than this? ⏎ ⏎ ```start = string[0..pos] ⏎ end = string[(pos + 1)..-1]``` [https://gitter.im/crystal-lang/crystal?at=59de2725b20c642429ec7420]
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vdotP
<crystal-gh> crystal/master 4d872f9 Ihor Tsykalo: Detect recursive generic structs (#5099)...
Creatornator has joined #crystal-lang
sz0 has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9.1]
alex`` has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> crystal-lang/crystal#4d872f9 (master - Detect recursive generic structs (#5099)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/286557129
<DeBot_> https://github.com/crystal-lang/crystal/pull/5099 (Detect recursive generic structs)
mark_66 has quit [Remote host closed the connection]
Creatornator has joined #crystal-lang
<FromGitter> <imonmyown> @Groogy, how do you feel about OpenGL related questions?
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Papierkorb_ has quit [Quit: Konversation terminated!]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bew> @straight-shoota I don't think so
<FromGitter> <bew> a `start, end = str.break_at(pos)` would be cool ;)
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 240 seconds]
Creatornator has joined #crystal-lang
<FromGitter> <georgeu2000> @OldhamMade - I tried your Dockerfile and got: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59de485d614889d475a0c486]
<FromGitter> <georgeu2000> `FROM gliderlabs/alpine:3.6` fixed it.
ducklobstr has joined #crystal-lang
<ducklobstr> I know that you can access constants inside a macro, but can you also set constants inside a macro?
<ducklobstr> not sure if this is the right approach to begin with, but given an array of static files (defined in a FILES = [] constant) i want to create a subsequent set of constants that are essentially the filenames (with some gsubing)
<oprypin> ducklobstr, u can. {% A << "f"
<ducklobstr> what is the difference between {{ and {% ?
<oprypin> {{ is emit code, {% is just execute
<ducklobstr> gotcha, thanks
<ducklobstr> this is what i ended up with
<ducklobstr> seems to work
<ducklobstr> didnt use the A <<, threw me a "undefined macro method 'StringLiteral#<<'" error
<oprypin> oh i totally misunderstood what u wanted
<oprypin> this code does not work
<oprypin> im typing with 1 hand tho, should stop that
claudiuinberlin has joined #crystal-lang
<oprypin> {{ constant_name }} = {{ content }}
<ducklobstr> ah yes i had some extra code in there that was hiding the issue
<ducklobstr> although the {{ constant_name }} = {{ content }} doesn't seem to work either
tax has joined #crystal-lang
<ducklobstr> but that seems to be an issue with the "content"
<oprypin> constant_name.id
<ducklobstr> ah yes, that fixed it
<ducklobstr> it was trying to set a "CONSTANT_NAME" (string) to another string?
<oprypin> yeah you emitted a string
<ducklobstr> whereas #id will emit what/
<ducklobstr> thanks
<oprypin> hold on.. does that mean that my earlier suggestion to add .stringify was wrong
<oprypin> content is already a string
<ducklobstr> content is a string, yes
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ducklobstr> is `` the same as Process.run?
<oprypin> yes but with less customization
claudiuinberlin has joined #crystal-lang
claudiuinberlin has quit [Client Quit]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ducklobstr_ has joined #crystal-lang
ducklobstr has quit [Ping timeout: 260 seconds]
unshadow has joined #crystal-lang
<FromGitter> <imonmyown> Hey guys
<FromGitter> <imonmyown> Why the type of `text` in `ensure` is `(String | Nil)`? https://carc.in/#/r/2w18
<FromGitter> <imonmyown> Is there a way to make it just `String`?
<FromGitter> <faustinoaq> @imonmyown interesting https://carc.in/#/r/2w1h if you use a rescue then it works
<FromGitter> <faustinoaq> But if you don't assign in both (inside/outside rescue) then fail https://carc.in/#/r/2w1i
<FromGitter> <imonmyown> @faustinoaq you did a reassignment in rescue, I need the value above it
<FromGitter> <imonmyown> that's kinda weird
<FromGitter> <imonmyown> hopefully someone would explain this
<FromGitter> <faustinoaq> Yeah is a bit unexpected
claudiuinberlin has joined #crystal-lang
<FromGitter> <faustinoaq> @imonmyown `rescue/else` seems to be working https://carc.in/#/r/2w1x
<FromGitter> <faustinoaq> as you expected
<Papierkorb> because technically, String#intialize could raise, and thus text would never be initialized when reaching the rescue
<FromGitter> <imonmyown> but I really need the ensure clause :(
Creatornator has joined #crystal-lang
<FromGitter> <imonmyown> Well rescuing the raise from String#initialize doesn't really ensure `text` is simply `String` and not `(String | Nil)`, right?
unshadow has quit [Quit: unshadow]
<FromGitter> <imonmyown> What's the right way to solve this problem?
<FromGitter> <faustinoaq> @imonmyown but arguments seems to work as you want https://carc.in/#/r/2w1y
<FromGitter> <imonmyown> @faustinoaq thanks man, but I kinda need a way to do that without args
<FromGitter> <faustinoaq> https://carc.in/#/r/2w23 😅 is turning obscure
<FromGitter> <straight-shoota> @imonmyown what about a second begin/rescue block: https://carc.in/#/r/2w2k
<FromGitter> <faustinoaq> 👍
<FromGitter> <faustinoaq> @straight-shoota Why this happens ? maybe because https://carc.in/#/r/2w2m
<FromGitter> <faustinoaq> @imonmyown I think your problem is a good question for stackoverflow (https://stackoverflow.com/questions/tagged/crystal-lang)
<FromGitter> <imonmyown> @straight-shoota @faustinoaq thanks guys :)
<FromGitter> <imonmyown> I probably really need to raise a question on SO
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven is now known as Guest75286
Guest75286 has quit [Ping timeout: 255 seconds]
<crystal-gh> [crystal] ysbaddaden opened pull request #5106: Fix: CI is mising gmp dependency on macOS (master...fix-ci-missing-gmp-dependency-on-osx) https://git.io/vdoSF
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
tax has quit [Quit: Leaving]
claudiuinberlin has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wontruefree has joined #crystal-lang
Creatornator has joined #crystal-lang
Creatornator has quit [Client Quit]
<FromGitter> <krypton97> Hey Groogy, how may I find you on github?
<FromGitter> <krypton97> Looking to read through that game engine
<Papierkorb> krypton97, @Groogy on Github
<FromGitter> <krypton97> I'm aiming to make a gui lib, but couldn
<FromGitter> <krypton97> t find that much about shaders..
<FromGitter> <krypton97> ty
Creatornator has joined #crystal-lang
<Yxhuvud> if you only need a gui lib you may find the qt bindings more useful
Creatornator has quit [Client Quit]
Creatornator has joined #crystal-lang
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wontruefree has quit [Ping timeout: 258 seconds]
<ducklobstr_> is it possible to put #inject into a macro?
<ducklobstr_> to my understanding i should b eusing the {% (execute) code syntax
<FromGitter> <bew> what should it do?
<ducklobstr_> however when i have {% FILES.inject({} of String => String) do |acc, file| do %}
<ducklobstr_> i get a compiler warning regarding "end"
<oprypin> ducklobstr_, macro language is entirely separate. it has neither blocks nor array methods that you expect
<oprypin> i suggest reading about macros rather than guessing https://crystal-lang.org/docs/syntax_and_semantics/macros.html
<ducklobstr_> gotcha, thanks
Creatornator has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden opened pull request #5107: Measure time with monotonic clock (master...std-measure-time-with-monotonic-clock) https://git.io/vdKfb
<crystal-gh> [crystal] ysbaddaden closed pull request #3827: Add Clock.monotonic for measuring elapsed time (master...feature-clock-monotonic) https://git.io/vdKJm
<FromGitter> <raydf> Hi everyone
alex`` has quit [Ping timeout: 246 seconds]
<FromGitter> <raydf> How can i add 1 day to a Time value?
<FromGitter> <bew> `Time.now + 1.day`
<FromGitter> <raydf> Thanks @bew
<FromGitter> <bew> method `Int32#day` and `Number#days` are available for that!
<FromGitter> <raydf> i was reading the api of Time and forgot to check the Int32 api
<FromGitter> <bew> in practice, those methods creates a `Time::Span` object, and this is then used to add a duration to a `Time`
<oprypin> raydf, that's terrible design tho, nothing to blame you for :p
<FromGitter> <faustinoaq> > that's terrible design tho ⏎ ⏎ oprypin, do you mean about api design ?
<oprypin> faustinoaq, yes. never in my life did i want to see an API like 5.day
<FromGitter> <raydf> @oprypin, i believe this is because Crystal want to keep the syntax/API closer to ruby
<oprypin> we don't want aliases, oh except when it's a one letter difference to make a "cool" DSL (talking about .day being an alias to .days)
<oprypin> not to mention the ridiculousness of asking a number to give you a timespan
<FromGitter> <raydf> after @bew helped me i research a little bit about that API design
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <faustinoaq> oprypin, Well, Crystal follows Ruby and his extreme readability `this could_be a_ruby, or_crystal; code after 1.minute; writing this_comment` 😅
<oprypin> you're killing me.
<FromGitter> <bew> > x)
ducklobstr_ has quit [Ping timeout: 260 seconds]
ShalokShalom_ has quit [Ping timeout: 240 seconds]
<FromGitter> <raydf> Maybe later i could discuss changes for the API docs and putting this kind of examples in the Time and Span modules
<FromGitter> <bew> @faustinoaq https://carc.in/#/r/2w3b ( *I'm already running out x)* )
<oprypin> you actually want to murder me
<oprypin> just end it 🗡
<FromGitter> <bew> :D
<FromGitter> <bew> promise I stop for today ;)
<FromGitter> <bew> (sh*t, it's 00:25 here, 'll need to wait another day)
<oprypin> lol
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <faustinoaq> > @faustinoaq https://carc.in/#/r/2w3b ( _I'm already running out x)_ ) ⏎ ⏎ @bew 😆 ✨ XD
<oprypin> goddamn circleci, i still can't see any build outputs, like https://circleci.com/gh/crystal-lang/crystal/1411 $ bin/ci build just keeps a spinning circle
<oprypin> oh that's what it stands for, just showing a circle instead of build results
sz0 has quit [Quit: Connection closed for inactivity]
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <straight-shoota> @oprypin They just want you to click on it :D
<FromGitter> <straight-shoota> At least for me it shows the build output when I close the section and reopen it
<FromGitter> <bew> @straight-shoota I do the same thing