RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.0 | 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
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
Raimondi has joined #crystal-lang
spacemanspam has joined #crystal-lang
<oprypin> Blacksmoke16: what are you doing, basically telling girng to shoot himself in the foot
<oprypin> you gotta use sudo and you gotta like it
<FromGitter> <Blacksmoke16> ;)
<FromGitter> <Blacksmoke16> with great power comes great responsibility
<FromGitter> <girng> i'm lost
<FromGitter> <girng> he likes arch linux i get it
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <Willyboar> lol. I told you to test elementary
<FromGitter> <Willyboar> i use it in old amd laptop w/ 4 gb ram and HDD
<FromGitter> <Willyboar> and is running smoothly
<FromGitter> <Willyboar> @girng 🆙
<FromGitter> <Blacksmoke16> iirc Alpine is only one you can staticly build on, so if you getting it for crystal, that would prob be bets?
Raimondi has quit [Ping timeout: 240 seconds]
Groogy has quit [Read error: Connection reset by peer]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <girng> @Willyboar lol yeah. i will prob use that but just wanted to get some activity going on the forum too
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron- has joined #crystal-lang
laaron- has quit [Remote host closed the connection]
laaron has joined #crystal-lang
shmibs has quit [Quit: leaving =o]
shmibs has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> @vladfaust Prob not a bad idea, my site for another side project is using it atm. But its only 1 endpoint so not much to go off of ha
<FromGitter> <Blacksmoke16> https://github.com/Blacksmoke16/CrSerializer/releases/tag/0.5.1 small release for some little things
moei has quit [Ping timeout: 246 seconds]
<FromGitter> <DanilaFe> definitely do not stay root. sudo is a big part of the process, and it lets you know that you may potentially be running destructive actions
<FromGitter> <DanilaFe> I think there are a few arch-based distros that don't force manual install, like manjaro and antegros (?)
<FromGitter> <Blacksmoke16> https://github.com/Blacksmoke16/athena/releases/tag/v0.1.0 initial release 💯 feedback/issues are welcome :)
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
marmotini_ has joined #crystal-lang
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #crystal-lang
marmotini has joined #crystal-lang
marmotini_ has quit [Client Quit]
marmotini_ has joined #crystal-lang
<FromGitter> <spTorin> Ubuntu based distro and some other not have root user (and its good). Not need su command with root password. Just use `sudo -i` and own password.
marmotini has quit [Ping timeout: 258 seconds]
marmotini_ has quit [Ping timeout: 258 seconds]
marmotini_ has joined #crystal-lang
<FromGitter> <DanilaFe> Please help :( ⏎ I have the following (abridged) code: ⏎ ⏎ ```no overload matches 'Int64#>' with type (Int64 | Nil)``` [https://gitter.im/crystal-lang/crystal?at=5c32f6c326d86e4d563a244c]
return0e has quit [Ping timeout: 258 seconds]
return0e has joined #crystal-lang
<FromGitter> <DanilaFe> disregard the fact that I used id instead of @ id, causing infinite recursion. this does not fix the issue
<oprypin> Blacksmoke16: we were trying to get girng to try Linux for the first time but i think you are trying to make it the last
<oprypin> re: Alpine
<FromGitter> <rishavs> Are there any email servers in crystal? I want to implement a "Forgot Password" feature and was wondering how to go about it?
<FromGitter> <spTorin> @rishavs - try https://github.com/arcage/crystal-email
<FromGitter> <rishavs> Thanks
DTZUZO has joined #crystal-lang
<FromGitter> <nagash> @DanilaFe The problem is your setter type `Int64?`
<FromGitter> <nagash> @DanilaFe Actually that's not right. I suspect the problem lies in whatever other type of object could be in the `item.body` Enumerable. ⏎ You could fix it with `item.body.select(&.is_a?(Terminal)).map(&.as(Terminal)).max_of?(&.id) || 0_i64`, or you can fix the other `item.body` objects `id` property to not be `(Int64 | Nil)`
spacemanspam has quit [Read error: Connection reset by peer]
ashirase has quit [Ping timeout: 272 seconds]
ashirase has joined #crystal-lang
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #crystal-lang
_whitelogger has joined #crystal-lang
laaron has joined #crystal-lang
<FromGitter> <girng> good morning!!
<FromGitter> <bew> Good afternoon!!
<FromGitter> <girng> 😆
<FromGitter> <bew> @DanilaFe you can simplify the `id` method's code by doing: `def id; @id || raise_general "...", internal: true; end`
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
marmotini_ has quit [Ping timeout: 245 seconds]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
spacemanspam has joined #crystal-lang
spacemanspam has quit [Read error: Connection reset by peer]
<FromGitter> <girng> https://play.crystal-lang.org/#/r/5xxj is doing `.clear` more performant?
Renich has joined #crystal-lang
<FromGitter> <Blacksmoke16> ``````
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c33793f8b6399655e208854]
<FromGitter> <Blacksmoke16> looks like it
<FromGitter> <Blacksmoke16> @girng
<FromGitter> <girng> oh wow lol, thanks. i just saw some i had the assign in my clear block list method 😆
<FromGitter> <girng> i was thinking to myself.. that doesn't seem right!
<FromGitter> <kinxer> @Blacksmoke16 Does that code re-initialize `blocked_users` or is it just empty after the first clear?
<FromGitter> <vlazar> +1
<FromGitter> <vlazar> careful with what you measure
<FromGitter> <Blacksmoke16> :0 goo call
<FromGitter> <kinxer> I got this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c337a8c357dd7655d2fc4a3]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c337a9f1491b27876d5e69e]
<FromGitter> <kinxer> Using the following: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c337aa1357dd7655d2fc5cf]
<FromGitter> <Blacksmoke16> looks like clear of 50% faster
<FromGitter> <Blacksmoke16> proven with science and multiple supporting evidence :p
<FromGitter> <kinxer> ^
<FromGitter> <kinxer> :P
<FromGitter> <girng> thx
jemc has joined #crystal-lang
devil_tux has joined #crystal-lang
<FromGitter> <girng> i love how the db module lets you interact with db queries in a synchronous manner. but i mean, to be fair if i was still on nodejs i'd prob be using async/await.. but still, that wasn't around back when i was using node, and not going back now. that i can tell you
<devil_tux> can someone jump in here before I start to cry, having troubles with regex: https://play.crystal-lang.org/#/r/5xz4
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/5xz7
<FromGitter> <Blacksmoke16> `\b` gets escaped to `b`
<FromGitter> <Blacksmoke16> so have to double escape the backslash since you want it to actually be in the string
<devil_tux> Blacksmoke16: it's always you. Thank you <3. I lost my mind over it for couple of hours.
<FromGitter> <Blacksmoke16> `Any other character following a backslash is interpreted as the character itself.`
<FromGitter> <Blacksmoke16> np
<devil_tux> didn't know it plays a role in regex but makes sense
<FromGitter> <Blacksmoke16> be nice if there was some literal that didnt do that
<FromGitter> <Blacksmoke16> for this very reason
<FromGitter> <Blacksmoke16> but, not a big deal
<devil_tux> gotcha, appreciated
<FromGitter> <girng> blacksmoke the hero we deserve
jemc has quit [Ping timeout: 272 seconds]
<FromGitter> <DanilaFe> Thanks @bew. For the record, the problem was a JSON.mapping call that produces an Int64? getter
<oprypin> Blacksmoke16, devil_tux, check out `%q(` literal. and for this case verbose regex `/stuff/x`
<FromGitter> <Blacksmoke16> ah nice one
devil_tux has quit [Ping timeout: 272 seconds]
marmotini_ has joined #crystal-lang
marmotini has joined #crystal-lang
non-aristotelian has joined #crystal-lang
marmotini_ has quit [Ping timeout: 246 seconds]
spacemanspam has joined #crystal-lang
marmotini has quit [Ping timeout: 250 seconds]
rkeene has joined #crystal-lang
<rkeene> I'm trying to compile the code: `dbconfig = INI.parse(dbconfig_text)` in Crystal 0.27.0 and I get the error: `undefined constant INI (did you mean 'Int')`
<FromGitter> <Willyboar> WOW! Github offers unlimited private repos. For 3 collabs per private repo. Bye bye bitbucket.
<rkeene> The documentation doesn't suggest one needs to "require" anything first, but I wonder if that's an omission from the documentation
<rkeene> Adding `require "ini"` did seem to help
marmotini has joined #crystal-lang
<FromGitter> <straight-shoota> rkeene, yeah it's not always clear from the API docs which libraries are in core (implicitly required in the prelude) and which need to be explicitly asked for
marmotini has quit [Ping timeout: 268 seconds]
<FromGitter> <domgetter> I'm trying to C interop to do opengl programming with crystal on windows. I can get 3D stuff to appear on linux (using opengl, glew, and sdl2), but I'm running into a problem where I need to link to stuff at runtime. I can use this https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-wglgetprocaddress , and it works (i.e. compiles on windows) if I only use one type signature for the
<FromGitter> ... returned function pointer. If I try to generalize, with something like Pointer(Int32 | UInt32, (UInt32 | UInt8)* -> Int32) or anything else, crystal complains that "only primitive types, pointers, structs, unions, enums and tuples are allowed in lib declarations", and if I try with underscores, I'm met with "can't use underscore ... [https://gitter.im/crystal-lang/crystal?at=5c33c28c5ec8fe5a85194172]
<FromGitter> <eliasjpr> Where I can find docs in regards to JSON annotations?
<FromGitter> <eliasjpr> nvm
<FromGitter> <j8r> @domgetter note Windows support is WIP (excluding WSL, which is =~ linux)
<FromGitter> <domgetter> @j8r Noted, and I am compiling on WSL and then hopping over to link on Windows.
<FromGitter> <domgetter> I can get sdl2 functions and some gl functions to link, but other ones don't want to work at all, like glGetUniformLocation. I even tried linking through glew, but it didn't work even though glew32s.lib contains the function name if I grep through it. So I have no idea what I'm doing wrong, or perhaps if there was some Windows-specific issue. I figured I may have to get function pointers at run time, but I
<FromGitter> ... didn't know if there was a clean way to do that in Crystal.
spacemanspam has quit [Read error: Connection reset by peer]
<FromGitter> <j8r> do you know you can even run X server on WSL?
<FromGitter> <j8r> (a bit offtopic)
<FromGitter> <domgetter> I hadn't tried to. Since I successfully got a window up from a cross compiled app, I was going to go 100% down this path
<FromGitter> <j8r> sure
<FromGitter> <j8r> that's the proper path
<FromGitter> <wontruefree> Is there a way to call a ruby api from crystal?
<FromGitter> <vladfaust> Kek, got 100k jobs per second for background job processing (2 Crystal threads with `Process.fork`): https://snag.gy/KWBC92.jpg
<FromGitter> <vladfaust> This was with 10_000 fibers & 10 Redis clients per thread
<FromGitter> <vladfaust> Aaand I got 130k with 100k fibers
non-aristotelian has quit [Quit: non-aristotelian]
<FromGitter> <theretromaniac> From now on i will use this account 😄 (@Willyboar)
<rkeene> Does Crystal handle a signed integer overflow by throwing an exception ?
<rkeene> http://chiselapp.com/user/rkeene/repository/flint/artifact?udc=1&ln=81-83%2086&name=fa2ac06db0ef7c22 is what I'm doing now -- but I'm not sure it's actually meaningful
<FromGitter> <straight-shoota> rkeene, integer overflow is not yet available, but it's actively being implemented
<rkeene> With Crystal type promotion, will that check be comparing an Int32 and a UInt32 ?
<FromGitter> <wontruefree> @straight-shoota how do you like fossil I tried it back in the day but my team wanted to use github
<FromGitter> <straight-shoota> rkeene, what check?
<FromGitter> <straight-shoota> @wontruefree Why do you ask? ;) I've never used fossil. And wouldn't consider it, given that basically everyone is on git and it's not like totally different.
<FromGitter> <domgetter> Am I crazy or is there very clearly an overload that matches? https://gist.github.com/domgetter/3506aab2246168890b5522a7c900a20c
<FromGitter> <domgetter> Ohh, I can't do chars AND a block