jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | 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
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 264 seconds]
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
chachasmooth has quit [Ping timeout: 244 seconds]
chachasmooth has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 258 seconds]
<FromGitter> <Dan-Do> But browser can only run javascript, doesn't it? Others (Typescript / CoffeeScript/ Mint-lang...) are complied to jvs right?
<FromGitter> <Dan-Do> We need isomorphic for both client/server side.
<Andriamanitra> web assembly is a thing these days, it's possible to almost completely avoid javascript
<FromGitter> <Dan-Do> Can you give me link of document how to build web asm using crystal?
<Andriamanitra> i have no clue how tbh, all i know is it should be possible since crystal is built on llvm
<FromGitter> <Dan-Do> It's more difficult than jvs :)
<Andriamanitra> for now yes, but i think that's a much better goal to work towards than embedding jsx in crystal
duane has quit [Ping timeout: 265 seconds]
_whitelogger has joined #crystal-lang
postmodern has quit [Quit: Leaving]
alexherbo2 has joined #crystal-lang
alexherbo20 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 256 seconds]
alexherbo20 is now known as alexherbo2
alexherbo24 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo24 is now known as alexherbo2
<raz> yup there has been rumors of porting hyperstack to crystal. imho that's the way forward (isomorphic with wasm); https://forum.crystal-lang.org/t/crystal-js-transpiler/903/29
<raz> unfortunately it's a major undertaking and doesn't have much manpower behind it
<raz> (woops google gave me a deeplink - i just meant to link to that thread as a whole, not that specific comment)
<yxhuvud> I'm not certain I see the point. people seems to do well without it.. especially Lucky seems to go around the issue by not being magic.
<raz> yup, hyperstack is essentially lucky, just with react on the client side
<raz> so you for example have as a page template: `class MyPage; def render; div { "Data is: ${model.data }; end; end". and whenever you update the model using the ORM it automatically updates on the screen of all users who are looking at it
<raz> without having to write any JS code
<raz> (simplified example of course, but that's how it works in a nutshell)
<raz> i've dabbled with the ruby verison, it still has rough edges, but works and could be a wonderful way out of JS hell if someone (ideally with deep pockets) was to create a fully polished impl :)
<raz> i think flutter by google comes with a similar promise (apart from being hybrid). but well, it's dart and it's google. will probably remain a niche monstrosity like GWT.
alexherbo26 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo26 is now known as alexherbo2
<repo> Blacksmoke16: hey again o/ I'm trying to understand how exactly to use dependency injection for athena controllers. So i need a service that holds an mqtt client connection and allows me to publish messages from controller actions
<repo> i guess i'm asking how exactly can i inject a service into a controller that i've annotated with `@[ADI::Register..]`
<repo> hm i guess i'll try just adding an initializer with that service as type restriction
Seich has quit [*.net *.split]
dom96 has quit [*.net *.split]
badeball has quit [*.net *.split]
Seich has joined #crystal-lang
dom96 has joined #crystal-lang
<repo> hm nope, that didn't work
<repo> ah i had to register the controller as well
Human_G33k has quit [Remote host closed the connection]
badeball has joined #crystal-lang
Human_G33k has joined #crystal-lang
lunarkitty7 has quit [Remote host closed the connection]
lunarkitty7 has joined #crystal-lang
alexherbo27 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 264 seconds]
alexherbo27 is now known as alexherbo2
alexherbo22 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo22 is now known as alexherbo2
<FromGitter> <Blacksmoke16> and be sure to make the controller public, via `public: true`
<FromGitter> <Blacksmoke16> ideally i think it would register controllers behind the scenes for you, but that depends on that custom macro method PR
alexherbo20 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #crystal-lang
alexherbo20 has quit [Ping timeout: 246 seconds]
Human_G33k has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
<repo> yup i got a compile time error telling me i should be using public: true :)
<FromGitter> <Blacksmoke16> ah nice
alexherbo2 has quit [Ping timeout: 256 seconds]
<FromGitter> <Blacksmoke16> really want that bug to get fixed so it actually points to the correct thing
<FromGitter> <Blacksmoke16> error message is good but the location is not super helpful atm :/
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
ua_ is now known as ua
HumanG33k has quit [Remote host closed the connection]
lunarkitty7 has quit [Ping timeout: 240 seconds]
zorp has joined #crystal-lang
hamoko[m] has quit [Quit: Idle for 30+ days]
tsujp has quit [Ping timeout: 260 seconds]
<oprypin> I'm binding a C function that has `...` in its args. and the function ends up receiving just zeros from me
<oprypin> and this is the call site
<oprypin> i can add printf("!!! %f\n", va_arg(args, int)); inside the function - that indeed prints a zero like i'm observing
<oprypin> mm i actually have a nice local repro https://carc.in/#/r/9oor
<oprypin> no it's not a repro, i justmade a mistake
<oprypin> this might be specific to floats?
<FromGitter> <franciscoadasme> hey everyone, can anyone point me to some guide about profiling a crystal program?, I found this old article (https://www.mikeperham.com/2016/06/24/profiling-crystal-on-osx/) but it doesn't seem to work any longer as Instruments only showed GC calls for the example
<oprypin> yea i think Crystal fails to do the promotion of va_args
f1reflyylmao has quit [Quit: bye fags]
f1refly has joined #crystal-lang
lunarkitty7 has joined #crystal-lang
<oprypin> mm this is also a big oof https://carc.in/#/r/9oqg
<oprypin> https://carc.in/#/r/9oqi ? ? !? ? !
<FromGitter> <Blacksmoke16> idt map keeps the typing like that
<oprypin> i know that my types are a subset of incoming types always
<oprypin> https://github.com/crystal-lang/crystal/blob/5999ae29beacf4cfd54e232ca83c1a46b79f26a5/src/tuple.cr#L113 i hate when Array is used as the restriction. should be Indexable yet again
<FromGitter> <Blacksmoke16> prob yea
<oprypin> any way to avoid this to_a
<oprypin> because other than that blemish i'm quite happy with https://carc.in/#/r/9oqk
zorp has quit [Ping timeout: 240 seconds]
<oprypin> found my solution but only by reopening tuple. https://carc.in/#/r/9or2 any way to avoid that?
_whitelogger has joined #crystal-lang
zorp has joined #crystal-lang
zorp has quit [Ping timeout: 258 seconds]