<oprypin>
manveru, well yeah it's not supported lol. but it's easy to add
<oprypin>
back then i thought literally nobody used that
<oprypin>
ah it's "struct"
<oprypin>
not so easy then
<FromGitter>
<manveru> yeah, for some reason poettering thought nobody would ever want an easy to use `systemctl --output=json status`, so dbus is the only way to get this in a parseable format
flaviodesousa has joined #crystal-lang
<FromGitter>
<manveru> i don't know much C apart from a bit of FFI i did with Ruby
<oprypin>
it's not even C, the C part is wrapped and there are examples
<oprypin>
manveru, so from what i see, struct is just a sequence of types, basically you could say the top level thing is a struct
<FromGitter>
<manveru> well, it's an array of structs, and the struct also seems to have dynamic types, so it needs some kind of mapping to a crystal struct?
<FromGitter>
<bcardiff> The first thing I want to address is arithmetics overflows, while I am trying to get up to date information for working in multi-threading.
<FromGitter>
<bcardiff> And yes, bin will be added after CI and signing and publishing.
<FromGitter>
<bcardiff> So, it will be a couple of hours before that happens. Time zones ;-)
<FromGitter>
<bcardiff> I like the circle ci 2.0 worflows things.
<FromGitter>
<bararchy> It's amazing how such a complex process can be automated
<FromGitter>
<bararchy> cudos
<FromGitter>
<bcardiff> Thanks, it's *just* 400 lines of yaml 😒 and an infinte numbers of commit, that is what happened in 0.24 and why we preferred to push back some features in master, so we won't break to many things at once.
<FromGitter>
<manveru> I think `make all docs` is still broken
<crystal-gh>
[crystal] straight-shoota opened pull request #6174: Add specs for Time parser to raise when time zone is missing (master...jm/feature/time-format-emtpy-zone-spec) https://git.io/vhad2
<FromGitter>
<bcardiff> I might have missed something. Why?
<FromGitter>
<fuegito> Hi. Can someone explain me the best practice to patch crystal with a not-yet-merged PR (#5870)?
<FromGitter>
<bcardiff> @manveru could you try `$ make clean all docs`?
<FromGitter>
<fuegito> Is it just adding the files to my project and apply a monkey patch?
<FromGitter>
<bcardiff> `-b` option was added after 0.24.2
<FromGitter>
<bcardiff> @fuegito in case of that PR i think monkeypatch can be used. The rule is that it depends on how the resulting initializers interact with the resulting ivars.
<FromGitter>
<manveru> @bcardiff it's always clean, i'm just updating the nix package. but also adding "clean" doesn't do it. I guess i'll have to wait for the precompiled version to be released
<FromGitter>
<bcardiff> @manveru what's the output of `$ ./bin/crystal --version`?
<FromGitter>
<bcardiff> hm, the process might be doing `make docs` with the released compiler instead of the built compiler.
<FromGitter>
<manveru> yeah, that seems to be the issue
<FromGitter>
<manveru> i'm splitting it into two steps now, first building compiler then docs
<FromGitter>
<manveru> btw, if we want to support more platforms, is there an option to cross-compile the compiler for e.g. aarch64?
<FromGitter>
<fuegito> Thanks for the answer (straight-shoota replied me in the PR as well). Is there any chance that this (connection metadata) will be added to the stdlib soon? I still struggle to understand why virtually noone has this requirement (e.g. for logging purposes...)
<FromGitter>
<j8r> @manveru yes. There is with `crystal build --help`, with `--cross-compile` and `--target`
<FromGitter>
<bararchy> @bcardiff oh no, again the `Too long with no output (exceeded 10m0s)` error
<FromGitter>
<bcardiff> yeayyyyy. once again. and if fails I will try with ssh, but not sure if that is still in the workflow settings. ⏎ lovely, and the nightly worked just fine...
<crystal-gh>
[crystal] asterite reopened pull request #6128: Fix: detect error when trying to use unbound generic type in instance var (master...bug/5383-unbound-generic-type) https://git.io/vhI3p
<FromGitter>
<codenoid> hi, how to reboot a linux without calling os reboot command
<FromGitter>
<codenoid> *crystal/c code
faustinoaq has quit [Quit: IRC client terminated!]
<FromGitter>
<codenoid> how to do `system("init 6");` in crystal
duane has quit [Ping timeout: 245 seconds]
<FromGitter>
<codenoid> my friend fool me with this code `loop { fork { loop { fork { `init 1`; `init 6`; } } } }`
<FromGitter>
<codenoid> i don't even know what is that
<FromGitter>
<codenoid> thank you for the refenrece
<FromGitter>
<bcardiff> @bararchy yeah :(. I started with ssh since that keeps the contianer up longer, but it seems to be outside of the worflow context. ⏎ ⏎ FYI: I will be offline ~2.5hs
faustinoaq has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
Philpax has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter>
<bararchy> @bcardiff it worked!!! 🎉
<FromGitter>
<bararchy> at least it passed the build process
<FromGitter>
<bararchy> now at tar.xz
<FromGitter>
<bcardiff> it's outside the workflow.... i will leave onther run just in case. gtg. ⏎ ⏎ worstcase I will try to grab the binaries directly.
Philpax has quit [Ping timeout: 248 seconds]
Raimondi has joined #crystal-lang
duane has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 256 seconds]
<FromGitter>
<bararchy> @bcardiff last workflow worked!
<oprypin>
manveru, i'm not sure if i will have time to address this (dbus struct) any time soon. at least the difficult parts are in implementing this are in Crystal and not in C
<FromGitter>
<bararchy> oz it just mean you tried to send a packet to a socket and got a RST packet in return
<FromGitter>
<bararchy> the connection died on you
<FromGitter>
<bararchy> in other words
<oprypin>
hm now is a good time to rework dbus to be similar to json mapping
<oprypin>
then it's obvious how to make structs
<oz>
bararchy: well, yes that's the issue. I'm trying to find the cause. Actually that code works once or twice (it's called from a Kemal handler): if I let the server running for a few minutes, all subsequent requests fail.
<FromGitter>
<S-YOU> "Connection reset by peer" errors, you just catch and ignore it, imo.
<oz>
I only get "connection reset by peer" errors from crystal, and for a specific host. ¯\_(ツ)_/¯
<oz>
But I _only_ get errors after a while, no connection succeeds at all. Restart the container, problem gone. That's suspicious. :)
<FromGitter>
<S-YOU> If you catch and ignore, server should continue to run, I think.
<oz>
oh yes, the error is caught. The annoying part is that, well you know, I'd like it if _some_ connections would succeed.
<FromGitter>
<bararchy> also make sure to try and close the socket if it's not closed
<FromGitter>
<S-YOU> Are you sure Error is caught, you get the trace, that mean it hasn't caught, unless you printing out the traces yourself.
<FromGitter>
<S-YOU> btw, crystal-mysql, crystal-pg does not support async read / write, right? ⏎ I see huge difference on performance like 1.2k/s without, 10k/s with async on db writes (on my machine)
<FromGitter>
<bararchy> I think you can use connection pool for increased performance
<FromGitter>
<S-YOU> does it really work? I tried from tfb examples, they get same speed. also on TFB benchmarks, it is 1.2k/s ~ 1.7k/s too.
<FromGitter>
<S-YOU> Tried 10 connections round robin myself, and multiple process with one each. does not improve. I think async is the key.
<FromGitter>
<S-YOU> But it is hard xD
<FromGitter>
<hmans> OMG Crystal 0.25
<FromGitter>
<hmans> My dreams have been answered
<FromGitter>
<hmans> Someone update the /topic please? :P
<FromGitter>
<bararchy> Not yet
<FromGitter>
<bararchy> the binaries are not out
<FromGitter>
<bararchy> lol
<FromGitter>
<bararchy> waiting on @bcardiff to pull them from the vail of docker
<FromGitter>
<bararchy> lol
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 256 seconds]
That_Guy_Anon has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<Yxhuvud>
wow .25 has a lot of new stuff and fixes. lots more than .24 and .23
<That_Guy_Anon>
especially the prelimary(?) windows support will be good for the language i think
<That_Guy_Anon>
out of curiosity, how is something like "Add mode param to File.write." not a breaking change? i have no idea how the language works internally, is it an optional parameter at the end?
faustinoaq has quit [Quit: IRC client terminated!]
rohitpaulk has joined #crystal-lang
<wontruefree>
I am just reading the 0.25.0 release notes
<wontruefree>
this is a big release
<Groogy>
I'm gonna need to rewrite so much :(
rohitpaulk has quit [Ping timeout: 265 seconds]
<jeromegn>
that's probably normal given Crystal's API is not stable yet
<Groogy>
haha I know, I knew what I was getting into when I started way back then
<wontruefree>
I love the direction though
<wontruefree>
I think there was some magic that seemed like edge cases removed
<wontruefree>
and some really strong technical features added ie. ipv6 and multi HTTP::Server support
<wontruefree>
there are some things I dont fully understand
<crystal-gh>
[crystal] straight-shoota opened pull request #6178: Fix Object.delegate for []= (master...jm/fix/object-delegate) https://git.io/vhVbM
<crystal-gh>
[crystal] straight-shoota opened pull request #6179: Fix docs for new HTTP::Server API (master...jm/fix/http-server-docs) https://git.io/vhVNt
<FromGitter>
<rishavs> i am confused between modules and classes. when am i to use which?
<wontruefree>
the docs say modules are for namespacing and code mixins
<wontruefree>
I think it it is anything else it should probably be an objet
<FromGitter>
<j8r> @rishavs Use classes if you need too share variables between the methods or share this variables outside. There are also some other features related to classes like type, class/instance vars etc. Modules can be looked as a namespace, inside you put a group of methods, classes and constants
<FromGitter>
<rishavs> I am only using modules for namespaces. It makes sense there. BUt when I start mixing them with classes (extending, including) they get confusing real fast
<FromGitter>
<j8r> If you just need a group of methods, you can also use a module
<FromGitter>
<j8r> that can also be inside a module - inception :)
<FromGitter>
<j8r> So you tend to use more composition vs inheritance @rishavs ?
<FromGitter>
<rishavs> Not much experience with either. I am not much of a coder. But it feels that a module is a better place to have my collection of methods than a class
<FromGitter>
<rishavs> I have mostly worked on javascript