Re: Crash with libsoundio

2019-08-10 Thread flattened
It turns out that it doesn't crash when I compile with `d:release`, though I don't know why. This applies for both sdl2 and soundio

Re: How to add a symbol to represent the infinity (∞)

2019-08-10 Thread LeuGim
Hi, @mrhidas. Yes, some mathematics-related code could be prettier. Of coarse the harder part is to get into the way of typing them. But not hopeless I think. :) But not to overestimate what can be done: import math proc √*(n: float): float = sqrt(n) assert (√ 25) == 5

Re: How to add a symbol to represent the infinity (∞)

2019-08-10 Thread mrhdias
Thank you @LeuGim for your effort in dealing with infinity... even if not really. I remembered another symbol with infinite decimal places (π), but there are many more. import math # const π = 3.141592653589793... const π = PI echo π Run These symbo

Re: Reading a file line by line at compile time

2019-08-10 Thread jyapayne
Huh, interesting. That works! I was more looking for something that wouldn't read everything into memory at once (kind of like memfiles), but this works for now. Thank you!

Re: Server-sent events in Jester

2019-08-10 Thread konradmb
Thanks! Ended up with this: import nativesockets, httpbeast … get "/time-live": request.sendHeaders(Http200,@({"Content-Type": "text/event-stream"})) for i in 0 .. 10: let data = "retry: 3000\n" & "data: {time: \'" &

Re: Error when using foldl on BigInts

2019-08-10 Thread roel
Yes, I think so as well. The comment on the following proc: # This doesn't work when a = b proc multiplication(a: var BigInt, b, c: BigInt) Run is a pointer, I guess. It is called by: `*` *(a, b: BigInt): BigInt = result = zero multiplication(

Re: how to integrate existing react components in karax?

2019-08-10 Thread carterza
React has it's own virtual dom and so does Karax. The best thing to do probably would be to parse the JSX in a react template as well as the associated JavaScript and then convert it to equivalent Karax. Mixing two frontend frameworks isn't really a great idea IMO. You're probably just better o

Re: Server-sent events in Jester

2019-08-10 Thread dom96
Try s/response/request in the code you've found, it might work. You will also need to use `request.getNativeReq` to get the socket and to close it. (These details are defined here: [https://github.com/dom96/jester/blob/master/jester/request.nim#L5-L22](https://github.com/dom96/jester/blob/master

Re: how to integrate existing react components in karax?

2019-08-10 Thread dom96
I'm not aware of anyone that has done this, but I'm sure we can improve your hacky approach to something that is less hacky and can be put into the Karax repo to make these things better. Can you share your approach? :)

how to integrate existing react components in karax?

2019-08-10 Thread katiequinn
Can karax integrate arbitrary react components? if not, what are limitations? Are there examples for doing that? The more examples the better. and vice versa: can react integrate karax components? Note: lack of interoperability was one thing that threw me off with google Dart; I hope karax does