00:00:52 | * | rnrwashere joined #nim |
00:08:35 | * | krux02_ joined #nim |
00:10:56 | * | krux02 quit (Ping timeout: 240 seconds) |
00:11:30 | * | rnrwashere quit (Remote host closed the connection) |
00:26:00 | * | rnrwashere joined #nim |
00:29:41 | * | rnrwashere quit (Remote host closed the connection) |
00:33:10 | * | rnrwashere joined #nim |
00:36:10 | * | vlad1777d joined #nim |
00:40:38 | * | rnrwashere quit (Remote host closed the connection) |
00:41:38 | * | rnrwashere joined #nim |
00:42:26 | * | rnrwashere quit (Remote host closed the connection) |
00:42:32 | * | rnrwashere joined #nim |
00:42:42 | * | rnrwashere quit (Remote host closed the connection) |
00:43:12 | * | leorize joined #nim |
00:44:56 | * | rnrwashere joined #nim |
00:45:13 | * | rnrwashere quit (Remote host closed the connection) |
00:53:51 | * | rnrwashere joined #nim |
00:58:02 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
00:58:09 | * | rnrwashere quit (Ping timeout: 246 seconds) |
00:59:26 | * | rayman22201 joined #nim |
00:59:35 | * | odc joined #nim |
00:59:41 | * | LyndsySimon joined #nim |
01:00:24 | * | rnrwashere joined #nim |
01:04:27 | * | rnrwashere quit (Ping timeout: 244 seconds) |
01:14:07 | * | TheManiac[m] joined #nim |
01:21:03 | * | tiorock joined #nim |
01:21:03 | * | rockcavera quit (Killed (tepper.freenode.net (Nickname regained by services))) |
01:21:03 | * | tiorock is now known as rockcavera |
01:21:03 | * | rockcavera quit (Changing host) |
01:21:03 | * | rockcavera joined #nim |
01:22:04 | * | icebattle quit (Ping timeout: 246 seconds) |
01:33:23 | * | rnrwashere joined #nim |
01:36:46 | * | rnrwashere quit (Remote host closed the connection) |
01:36:54 | * | rnrwashere joined #nim |
01:39:28 | * | Snircle quit (Ping timeout: 272 seconds) |
01:43:45 | * | leorize quit (Ping timeout: 256 seconds) |
01:44:58 | * | Snircle joined #nim |
01:48:08 | * | ghidrah quit (Quit: Page closed) |
02:00:45 | * | rockcavera quit (Read error: Connection reset by peer) |
02:01:04 | * | rockcavera joined #nim |
02:01:05 | * | rockcavera quit (Changing host) |
02:01:05 | * | rockcavera joined #nim |
02:13:45 | * | d10n-work quit (Quit: Connection closed for inactivity) |
02:14:30 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
02:17:37 | * | leorize joined #nim |
02:27:28 | * | rnrwashere quit (Remote host closed the connection) |
02:29:57 | * | rnrwashere joined #nim |
03:02:28 | * | banc quit (Quit: Bye) |
03:04:09 | * | zachk quit (Quit: Leaving) |
03:14:20 | * | abm quit (Ping timeout: 250 seconds) |
03:21:27 | FromDiscord_ | <juan_carlos> Too bad asm dont take const string, but I get why. :) |
03:22:56 | FromDiscord_ | <juan_carlos> I dont understand how Nim std lib puts values on the asm string literal without the `` |
03:24:03 | * | banc joined #nim |
03:38:10 | * | CcxWrk quit (Ping timeout: 250 seconds) |
03:47:31 | * | stefanos82 joined #nim |
03:53:31 | * | CcxWrk joined #nim |
04:01:34 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:04:38 | * | rnrwashere quit (Remote host closed the connection) |
04:07:51 | * | rnrwashere joined #nim |
04:09:46 | * | nsf joined #nim |
04:12:48 | * | rnrwashere quit (Remote host closed the connection) |
04:14:03 | * | rnrwashere joined #nim |
04:37:24 | * | sealmove joined #nim |
04:39:55 | * | leorize quit (Quit: WeeChat 2.3) |
04:46:00 | * | vlad1777d quit (Ping timeout: 246 seconds) |
05:01:18 | * | dddddd quit (Read error: Connection reset by peer) |
05:14:32 | * | mal`` quit (Quit: Leaving) |
05:16:54 | * | mal`` joined #nim |
05:19:42 | Zevv | cd |
05:33:48 | * | rnrwashere quit (Remote host closed the connection) |
05:38:01 | * | OrganicAnywhere joined #nim |
05:38:22 | * | OrganicAnywhere quit (Client Quit) |
05:47:54 | * | dorelix_ joined #nim |
05:49:46 | * | noonien quit (Quit: Connection closed for inactivity) |
05:50:24 | * | dorelix quit (Ping timeout: 252 seconds) |
06:05:06 | * | mal`` quit (Quit: Leaving) |
06:15:20 | * | mal`` joined #nim |
06:24:16 | * | leorize joined #nim |
06:24:30 | * | narimiran joined #nim |
06:31:51 | * | vlad1777d joined #nim |
06:38:11 | * | stefanos82 quit (Remote host closed the connection) |
06:54:22 | * | AndreasO joined #nim |
06:57:02 | * | AndreasO quit (Remote host closed the connection) |
07:18:08 | FromGitter | <mratsim> @Geroro / Grey Ghost, you might want to look into Nim marshal module as well - https://nim-lang.org/docs/marshal.html, or NESM - https://xomachine.gitlab.io/NESM/ |
07:23:23 | FromGitter | <mratsim> what's the difference between the new "internal error" tag and "crash"? |
07:25:57 | * | dorelix_ quit (Remote host closed the connection) |
07:40:27 | Araq | there is none |
07:40:54 | Araq | somebody got crazy creating issue tags |
07:41:47 | narimiran | ok, putting all "internal error" issues int' "crash" label |
07:42:45 | narimiran | there you go, "internal error" is no more |
07:43:18 | FromGitter | <mratsim> windows merged into os specific is OK :) |
07:43:51 | narimiran | @mratsim if you notice more situations like these where some other/older label could be used, or some label is too specific: let me know |
07:44:06 | FromGitter | <mratsim> no problem |
07:44:17 | FromGitter | <mratsim> actually you could rename to crash / internal error |
07:44:21 | FromGitter | <mratsim> if it's more explicit |
07:44:34 | narimiran | we now have 36 labels less than a week ago ;) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:28 | * | gmpreussner joined #nim |
08:34:21 | * | JustASlacker quit (Remote host closed the connection) |
08:48:39 | * | PMunch joined #nim |
08:56:04 | * | abm joined #nim |
08:57:46 | * | vlad1777d quit (Ping timeout: 246 seconds) |
09:03:04 | * | floppydh joined #nim |
09:07:41 | * | slugmatt joined #nim |
09:10:54 | * | Vladar joined #nim |
09:12:08 | * | pwntus quit (Remote host closed the connection) |
09:12:48 | * | neceve joined #nim |
09:12:49 | * | neceve quit (Client Quit) |
09:13:10 | * | neceve joined #nim |
09:22:07 | * | pwntus joined #nim |
09:22:07 | * | pwntus quit (Changing host) |
09:22:07 | * | pwntus joined #nim |
09:25:44 | * | vlad1777d joined #nim |
09:34:50 | * | rnrwashere joined #nim |
09:34:54 | * | slugmatt_ joined #nim |
09:35:04 | * | Vladar quit (Remote host closed the connection) |
09:35:22 | * | slugmatt quit (Read error: Connection reset by peer) |
09:35:28 | * | Vladar joined #nim |
09:39:11 | * | rnrwashere quit (Ping timeout: 250 seconds) |
09:39:28 | * | slugmatt_ quit (Client Quit) |
09:47:13 | * | NimBot joined #nim |
09:47:34 | * | narimiran joined #nim |
09:53:31 | * | floppydh quit (Quit: WeeChat 2.3) |
09:54:18 | * | rockcavera quit (Ping timeout: 250 seconds) |
09:59:01 | * | floppydh joined #nim |
10:04:21 | * | dom96_w joined #nim |
11:02:22 | * | krux02_ is now known as krux02 |
11:06:23 | * | kapil____ joined #nim |
11:13:03 | * | rockcavera joined #nim |
11:21:09 | * | stefanos82 joined #nim |
11:40:40 | Zevv | narimiran[m]: Do we really need external fonts in the docs? |
11:47:17 | narimiran | Zevv: is that really bothering us? :P |
11:47:51 | Zevv | it is *really* bothering *me* :) |
11:48:03 | * | onionhammer1 joined #nim |
11:48:17 | Zevv | Just nagging, sorry |
11:48:23 | Zevv | so quiet here |
11:48:26 | narimiran | if only i had no other worries in my life :P :D |
11:49:23 | Zevv | I try to concentrate on the little futilities every now and then, it takes your mind of the big problems in life :) |
11:50:31 | * | onionhammer quit (Ping timeout: 268 seconds) |
11:51:03 | * | Vladar quit (Remote host closed the connection) |
11:51:37 | * | Vladar joined #nim |
11:55:52 | * | krux02 quit (Ping timeout: 264 seconds) |
12:04:46 | PMunch | Zevv, yeah it's been quiet today |
12:06:55 | * | krux02 joined #nim |
12:18:52 | narimiran | and yesterday was even quieter, i think |
12:19:55 | Zevv | well, a question then |
12:20:06 | Zevv | I get tons of warnings about ConvFromXtoItselfNotNeeded from templates |
12:20:34 | Zevv | problem is, if I push a hint to shut up about this in the module that defines the templates, it still causes the warnings if they are called from another module |
12:22:35 | * | dddddd joined #nim |
12:34:39 | narimiran | PMunch: your protobuf-nim seems to be failing on the latest nim, because of no more nil strings |
12:34:57 | FromGitter | <Clyybber> Zevv: Have you tried pushing the hint in the template body? |
12:35:49 | PMunch | narimiran, ooh. That's no good |
12:37:28 | Zevv | Clybber: let me try that. I probably just need to fix the underlying cause I guess |
12:37:48 | * | Snircle joined #nim |
12:39:22 | PMunch | narimiran, seems like the issue is actually within combparse |
12:44:34 | Zevv | Clybber: thanks, works. |
12:44:49 | FromGitter | <Clyybber> np ;) |
12:45:49 | * | nsf quit (Quit: WeeChat 2.3) |
12:50:31 | dom96_w | Somebody bored and need something to do? https://github.com/mattgodbolt/compiler-explorer/issues/206 |
12:56:15 | PMunch | Haha, I have a version of nim in choosenim that I manually modified to output all GC actions. Always surprises me when I switch to it by accident :P |
13:05:55 | PMunch | narimiran, protobuf and combparser should work on 0.19.0 now :) |
13:06:00 | PMunch | Or 0.19.x |
13:10:43 | PMunch | dom96_w, doesn't look super hard to do: github.com/mattgodbolt/compiler-explorer/pull/455/files |
13:10:53 | PMunch | That's the commit that added Haskell |
13:10:55 | dom96_w | so do it :) |
13:33:17 | PMunch | I've got stuff to do :( |
13:37:02 | * | ng0 joined #nim |
14:01:15 | * | shashlick quit (Remote host closed the connection) |
14:01:35 | * | shashlick joined #nim |
14:01:37 | * | shashlick quit (Read error: Connection reset by peer) |
14:04:00 | * | shashlick joined #nim |
14:33:41 | narimiran | @mratsim when i run `nimble test` for `stint`, i get "test_uint_muldiv.nim(33, 35) Error: number out of range: '1_000_000_000_000_000_000_000'u64'" is this just on my end? |
14:36:18 | FromGitter | <mratsim> I think it's a Nim regression |
14:36:29 | FromGitter | <mratsim> are you on 19.4? |
14:36:42 | narimiran | 0.19.9 |
14:37:04 | FromGitter | <mratsim> can you test on 19.4 |
14:37:42 | narimiran | let me try |
14:38:39 | narimiran | "../stint/io.nim(20, 58) Error: unknown trait" |
14:40:36 | FromGitter | <mratsim> trait? |
14:40:47 | FromGitter | <mratsim> it's not Scala / Rust :/ |
14:41:40 | FromGitter | <mratsim> last CI was 11 hours ago on 0.19.0 - https://travis-ci.org/status-im/nim-stint |
14:41:44 | FromGitter | <mratsim> I'm checking |
14:42:38 | FromGitter | <mratsim> also it's used everywhere in our codebase so I'm surprised it broke |
14:42:44 | FromGitter | <mratsim> silently* |
14:43:40 | FromGitter | <mratsim> works on 0.19.4 and value out of range on devel |
14:43:49 | narimiran | maybe you have some dependency installed? some of them are commented out in stint.nimble |
14:44:08 | FromGitter | <mratsim> the one commented out are for additional tests |
14:44:44 | narimiran | can you maybe see when approximately devel started to be broken? |
14:46:38 | federico3 | https://news.ycombinator.com/item?id=19133796 |
14:48:17 | FromGitter | <mratsim> narimiran, it's probably https://github.com/nim-lang/Nim/pull/10394 |
14:48:51 | narimiran | @mratsim, thanks, will take a look at it |
14:49:25 | FromGitter | <mratsim> it's not really an issue for me, it was just a cheap way to test if my wrap around is correct |
14:58:25 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:00:58 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
15:00:59 | * | PMunch quit (Remote host closed the connection) |
15:01:33 | * | rnrwashere joined #nim |
15:07:14 | * | rnrwashere quit (Remote host closed the connection) |
15:07:50 | * | rnrwashere joined #nim |
15:11:23 | * | dom96_w joined #nim |
15:12:09 | * | rnrwashere quit (Ping timeout: 258 seconds) |
15:31:56 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:33:59 | * | dom96_w joined #nim |
15:43:38 | * | AndreasO joined #nim |
16:07:01 | * | Trustable joined #nim |
16:09:21 | * | abm quit (Quit: Leaving) |
16:09:23 | * | rnrwashere joined #nim |
16:29:26 | * | icebattle joined #nim |
16:31:02 | * | AndreasO quit (Remote host closed the connection) |
16:31:12 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:33:00 | * | AndreasO joined #nim |
16:33:59 | * | dom96_w joined #nim |
16:36:42 | * | AndreasO quit (Remote host closed the connection) |
16:40:28 | * | Jjp137 quit (Ping timeout: 246 seconds) |
16:46:18 | * | AndreasO joined #nim |
16:49:43 | * | AndreasO quit (Remote host closed the connection) |
16:59:08 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:01:22 | * | dom96_w joined #nim |
17:06:40 | * | floppydh quit (Quit: WeeChat 2.3) |
17:14:36 | FromGitter | <Varriount> @mratsim What's your preferred profiling tool? |
17:16:23 | FromGitter | <mratsim> Apple Instruments |
17:16:29 | FromGitter | <mratsim> And if not on Mac, Intel VTune |
17:17:00 | FromGitter | <mratsim> I'm still a VTune noob so ... |
17:27:38 | * | neceve quit (Remote host closed the connection) |
17:30:45 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:34:11 | * | dom96_w joined #nim |
17:34:36 | * | banc quit (Ping timeout: 246 seconds) |
17:34:37 | * | nsf joined #nim |
17:36:54 | * | banc joined #nim |
17:40:03 | * | JustASlacker joined #nim |
17:41:59 | * | sheerluck joined #nim |
17:44:08 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:44:43 | * | Cthalupa quit (Ping timeout: 244 seconds) |
17:44:59 | * | rnrwashe_ joined #nim |
17:45:23 | * | rnrwashere quit (Ping timeout: 250 seconds) |
17:47:01 | * | Cthalupa joined #nim |
17:55:44 | * | dom96_w joined #nim |
18:02:29 | FromGitter | <Varriount> Apple instruments is nice. |
18:03:00 | FromGitter | <Varriount> I just wish there was a way to de-mangle Nim identofiers |
18:04:13 | FromGitter | <mratsim> when I use code generation, I use exportc or genSym to have cleaner identifiers |
18:05:29 | FromGitter | <Varriount> Anyway, it helped me track down unnecessary string allocations pretty easily. |
18:06:35 | FromGitter | <mratsim> for example: https://github.com/numforge/laser/blob/master/laser/primitives/matrix_multiplication/gemm_ukernel_generator.nim#L140 ⏎ ⏎ I generate names like "gebb_ukernel_float32_avx512" |
18:09:42 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:15:00 | * | sknebel is now known as skenbel |
18:15:10 | * | skenbel is now known as sknebel |
18:19:59 | * | natrys joined #nim |
18:25:15 | * | Jjp137 joined #nim |
18:25:30 | * | aguspiza joined #nim |
18:28:38 | * | rockcavera quit (Ping timeout: 244 seconds) |
18:29:18 | * | rockcavera joined #nim |
18:37:25 | * | sealmove quit (Quit: WeeChat 2.3) |
18:49:05 | * | blmvxer joined #nim |
18:50:04 | blmvxer | Hello, I have a question about obtaining the localhost IP directly from nativesockets in *nix |
18:50:11 | * | noonien joined #nim |
18:53:06 | * | Jesin quit (Quit: Leaving) |
18:53:12 | FromGitter | <Varriount> blmvxer: What's your question? |
18:56:51 | * | blmvxer quit (Ping timeout: 256 seconds) |
19:01:17 | * | solitudesf joined #nim |
19:02:59 | * | oculuxe joined #nim |
19:03:47 | * | sheerluck quit (Quit: Leaving) |
19:04:24 | * | Bob- joined #nim |
19:04:35 | * | ikan-keli_ quit (Ping timeout: 240 seconds) |
19:04:36 | * | FromGitter quit (Ping timeout: 240 seconds) |
19:04:36 | * | leorize quit (Ping timeout: 240 seconds) |
19:04:36 | * | oculux quit (Ping timeout: 240 seconds) |
19:04:37 | * | solitude_sf quit (Ping timeout: 240 seconds) |
19:04:37 | * | bobby quit (Ping timeout: 240 seconds) |
19:04:37 | * | mr_yogurt quit (Ping timeout: 240 seconds) |
19:04:41 | * | mr_yogurt_ joined #nim |
19:05:04 | * | ikan-keli_ joined #nim |
19:05:08 | * | FromGitter joined #nim |
19:05:33 | * | leorize joined #nim |
19:06:34 | * | blmvxer joined #nim |
19:06:59 | * | mr_yogurt_ is now known as mr_yogurt |
19:08:22 | * | theelous3 joined #nim |
19:08:36 | * | Jesin joined #nim |
19:11:13 | * | nsf quit (Quit: WeeChat 2.3) |
19:12:07 | * | aguspiza quit (Ping timeout: 258 seconds) |
19:20:56 | * | Jesin quit (Quit: Leaving) |
19:21:37 | * | Jesin joined #nim |
19:35:50 | * | abm joined #nim |
19:37:08 | * | rockcavera quit (Ping timeout: 250 seconds) |
19:43:31 | * | natrys quit (Quit: natrys) |
19:44:22 | * | rockcavera joined #nim |
19:51:32 | * | aguspiza joined #nim |
19:52:44 | * | kobi7 joined #nim |
19:54:36 | kobi7 | hi guys, I've made a program in nim. it checks website certificates. currently linux only since it relies on openssl client (though I think it can be completely nim and then portable) |
19:55:09 | kobi7 | https://github.com/kobi2187/check_cert2 |
19:55:21 | kobi7 | the repository is a little messy as it was done as a quick tool |
19:55:36 | kobi7 | and my git fu is almost nil |
20:01:56 | kobi7 | anyway it is useful and now open source |
20:04:16 | FromDiscord_ | <juan_carlos> Cool project. |
20:06:02 | kobi7 | thanks! |
20:07:28 | kobi7 | to make it completely portable, i'll need to query the ssl socket, haven't had time to tackle that yet |
20:08:17 | FromDiscord_ | <juan_carlos> when defined(ssl) |
20:08:37 | FromDiscord_ | <juan_carlos> if theres no SSL at all it wont compile anyways. |
20:08:48 | FromGitter | <zetashift> Neat! the code looks nicely put together, I would put all the *.todo's in a README maybe? |
20:15:25 | * | kobi7_ joined #nim |
20:15:25 | * | kobi7 quit (Read error: Connection reset by peer) |
20:17:02 | kobi7_ | yeah, todos I can delete them. |
20:22:42 | * | Ezbob joined #nim |
20:22:45 | * | enow joined #nim |
20:22:50 | enow | Hi guys |
20:22:57 | Ezbob | hi |
20:23:09 | enow | I'm doing a server that will serve data on a websocket right |
20:23:27 | Ezbob | cool |
20:23:30 | enow | I want to have a thread that reads from a microphone processes that and then send it to the clients |
20:24:04 | enow | so I get how to do this from a C pthreads point of view really, but I'm curious to know if there is a more nim-esque way of doing this |
20:25:03 | enow | would it be better for me to create my own asynchronous function to do the reading and processing, since I obviously don't want this to block the rest of the functions |
20:25:53 | dom96 | if you can read from the mic asynchronously then do that |
20:26:30 | dom96 | the only reason you should use threads in Nim is if you want to make better use of your CPU cores |
20:26:37 | dom96 | (or if async isn't possible) |
20:26:55 | enow | no I can't really read from the microphone in async |
20:27:44 | * | Trustable quit (Remote host closed the connection) |
20:29:34 | enow | I guess my question is from a C programmers perspective, what don't I know about threads in nim |
20:31:09 | rayman22201 | how do you get the microphone data? is it a blocking operation? |
20:31:50 | enow | it's a c file reading from alsa |
20:32:00 | enow | and then I'm doing fft on it also in a small c file |
20:32:12 | enow | both by necessity blocking |
20:32:50 | enow | and I think having to alsa recording instances at the same time would cause problems to |
20:32:55 | rayman22201 | then you have to do it C style with threads |
20:33:39 | enow | fair enough |
20:34:06 | * | kobi7_ quit (Quit: Leaving) |
20:34:27 | enow | can I use channels for this, that is when having one producer and two consumers who needs to get the same data |
20:36:03 | rayman22201 | I should say, you don't strictly "have to" use threads. But async won't really help you if your operation inherently blocks. The main thread will just end up waiting for the blocking operation to finish anyway |
20:36:59 | rayman22201 | channels will work and they will be thread safe, but channels copy, so you will end up with a performance penalty there. |
20:38:50 | enow | okay but I can have one producer and multiple consumers and all the consumers will get all the data |
20:39:45 | * | theelous3 quit (Ping timeout: 246 seconds) |
20:40:21 | rayman22201 | I don't think channels have a broadcast feature |
20:40:41 | rayman22201 | you will have to have a channel for each client. They work a lot like linux pipes |
20:43:56 | rayman22201 | I don't know much about alsa, but looking at the docs, it supports non-blocking reads, so you could make that part of it async. |
20:44:50 | enow | ah really |
20:44:52 | enow | hm |
20:45:07 | enow | okay so that's one roadblock |
20:45:54 | rayman22201 | https://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html#pcm_open_behaviour |
20:45:57 | rayman22201 | maybe? |
20:46:14 | enow | I'll check it out |
20:46:16 | enow | thanks |
20:46:40 | enow | but the FFT still takes relatively much time, so that wouldn't be to nice in an async setting |
20:47:45 | * | Tyresc joined #nim |
20:48:02 | FromGitter | <basp> Do you have some kind of buffering already in place? |
20:51:46 | FromGitter | <basp> Anyway, unless I'm completely mistaken, the FFT should/could be a pure function so it shouldn't be too hard to run that in another thread maybe using channels (just a nim noobie here and no clue about your mic api, apologies if I'm completely in left field here) |
20:53:37 | enow | hm I'll probably need a single thread anyway since I can only have one alsa listener |
20:53:56 | enow | I'm interested in figuring out if I could make it be called as an asynchronous function |
20:54:23 | FromGitter | <basp> from what I understand you have one thread dedicated to your mic input stream |
20:54:29 | enow | yes |
20:54:53 | enow | and the fft goes in the same thread for simplicity |
20:55:07 | FromGitter | <basp> for me I'm trying to think of how to distrubute that workload (especially the FFT) over multiple threads |
20:55:14 | FromGitter | <basp> I think the main problem is collecting them in order |
20:55:52 | rayman22201 | the FFT is going to take a certain amount of time no matter what. Async won't change that. Async is about intervleaving execution (concurrency) not parallelism. You can wrap the FFT in an async function, but that won't make the FFT run faster. |
20:55:55 | FromGitter | <basp> unless order doesn't matter, in that case it would be kinda easy |
20:56:12 | rayman22201 | parallel FFT is a hard problem. |
20:56:18 | FromGitter | <basp> I understand it won't but if yyou're doing IO at the same time |
20:56:27 | FromGitter | <basp> then it might be able to execute while you're waiting on IO |
20:56:28 | rayman22201 | async only helps with IO |
20:56:50 | enow | I did some measurements and the FFT causes more delay in the C code than reading from the microphone |
20:57:03 | * | Ezbob quit (Quit: Page closed) |
20:57:09 | enow | yeah so having FFT and recording in one thread, seems to be necessery |
20:58:00 | enow | So I'll quess I'll just add the output in a ever growing sequence |
21:00:23 | rayman22201 | Doesn't have to be ever growing. Use a ring buffer. |
21:00:55 | FromGitter | <basp> Yes. Your main problem is not multi-threading, it's buffering. |
21:00:59 | FromGitter | <Bennyelg> need help. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c63340a4003460b2d3d9981] |
21:01:21 | enow | mm that's good advie |
21:01:23 | enow | advice* |
21:02:08 | enow | it's not a panic for just to get it up and running as I'm only extracting the key that is being played, so it's basically nothing for a quick test |
21:02:20 | enow | but yeah the messaging is the issue |
21:02:48 | * | tiorock joined #nim |
21:02:48 | * | rockcavera quit (Killed (livingstone.freenode.net (Nickname regained by services))) |
21:02:48 | * | tiorock is now known as rockcavera |
21:03:24 | dom96 | yay, found another websocket bug :) |
21:04:01 | * | zachk joined #nim |
21:04:29 | narimiran | @bennyelg that proc doesn't look very nice/effective to me |
21:05:19 | * | noonien_ joined #nim |
21:05:20 | narimiran | btw, it seems that gitter/irc bridge is semi-broken |
21:05:54 | enow | so I guess I'll just put a semaphore and have the consumers wait for those |
21:06:04 | narimiran | i've seen benny's message on IRC, but @brentp's message is only on gitter. (and mine are also only on irc) |
21:06:10 | * | FromGitter quit (Ping timeout: 240 seconds) |
21:06:11 | enow | that should allow for concurency like sleep does right |
21:06:26 | * | noonien quit (Ping timeout: 240 seconds) |
21:06:27 | * | noonien_ is now known as noonien |
21:06:57 | * | AndreasO joined #nim |
21:07:19 | * | FromGitter joined #nim |
21:07:21 | * | zachk quit (Read error: Connection reset by peer) |
21:07:49 | FromGitter | <basp> I'm not a huge nim expert but shouldn't `t1.keys().toSeq()` just work? |
21:08:05 | narimiran | test 1 2 |
21:08:07 | FromGitter | <Bennyelg> no |
21:08:18 | narimiran | bridge is back up |
21:08:19 | FromGitter | <Bennyelg> its because it's something rleated to the compilation time. |
21:08:27 | narimiran | @bennyelg that proc doesn't look very nice/effective to me |
21:08:39 | FromGitter | <Bennyelg> no need to be look nice |
21:08:42 | * | zachk joined #nim |
21:08:46 | FromGitter | <Bennyelg> just trying to validate something |
21:08:53 | FromGitter | <Bennyelg> will share in few minutes |
21:08:59 | narimiran | why are you using table at all? |
21:09:21 | FromGitter | <Bennyelg> Im doing few tests ;) now Im going to change to hash |
21:09:32 | FromGitter | <basp> I came up with this but to be honest I don't even know if it compiles (it should though!): https://gist.github.com/basp/4eaf9b7d497dfa0578dcb539d49df958 |
21:09:57 | narimiran | there is `deduplicate`, and if you don't want that: why not use sets which have deduplication in their genes? ;) |
21:10:01 | FromGitter | <Bennyelg> no bas its bad solution. |
21:10:06 | FromGitter | <Bennyelg> @basp * |
21:10:15 | FromGitter | <Bennyelg> @narimiran deduplicate works bad |
21:10:28 | FromGitter | <Bennyelg> sets is going to be next |
21:10:37 | narimiran | and creating a hash table is better than that? |
21:10:54 | * | zachk quit (Changing host) |
21:10:54 | * | zachk joined #nim |
21:11:02 | FromGitter | <Bennyelg> I'll explain in 1 minutes. ⏎ for now, dedup is worst , table is better now lets see set |
21:11:05 | FromGitter | <Bennyelg> sets* |
21:11:27 | narimiran | since you have seq[int], don't forget to use `intsets` ;) |
21:11:46 | FromGitter | <Bennyelg> @narimiran thanks |
21:11:57 | * | aguspiza quit (Ping timeout: 246 seconds) |
21:12:35 | FromGitter | <basp> I'm hear to learn mostly so I really appreciate it if you (or somebody) can explain why that's so bad. Also, no worries calling me "bas" since that's actually my name :) |
21:14:12 | * | AndreasO quit (Ping timeout: 250 seconds) |
21:18:39 | FromGitter | <Bennyelg> @narimiran from intSet to seq[int] ? toSeq() not work :/ |
21:18:56 | narimiran | iterate over it? |
21:19:12 | FromGitter | <Bennyelg> :/ wanted something ready :/ |
21:21:17 | FromGitter | <Bennyelg> @narimiran better then everything I tried |
21:21:19 | FromGitter | <Bennyelg> cool :) |
21:21:52 | narimiran | what have you tried? |
21:22:13 | narimiran | (but yeah, that is what i would have expected, intsets are cool) |
21:22:22 | FromGitter | <Bennyelg> I'll share the code just put it right now on the gist |
21:22:23 | FromGitter | <Bennyelg> sec |
21:22:42 | * | rnrwashe_ quit (Remote host closed the connection) |
21:23:39 | * | Yardanico quit (Quit: No Ping reply in 180 seconds.) |
21:25:25 | * | Yardanico joined #nim |
21:26:09 | FromGitter | <Bennyelg> @narimiran |
21:26:10 | FromGitter | <Bennyelg> https://gist.github.com/Bennyelg/cfaa2176f82a09b37bec3457c3147506 |
21:27:03 | narimiran | but wait |
21:27:30 | narimiran | python's `remove_duplicates` returns a set, not a list |
21:27:51 | FromGitter | <Bennyelg> correct my bad |
21:27:53 | narimiran | and in nim, you always converted back to seqs, no? |
21:28:11 | FromGitter | <Bennyelg> yes I intend to return all as a list |
21:28:15 | FromGitter | <Bennyelg> wait Im changing |
21:28:30 | * | rnrwashere joined #nim |
21:28:37 | narimiran | `containsOrIncl(e, x)` why why why delilah? |
21:29:20 | FromGitter | <basp> well without bounds, I think this is a futile exercise tbh |
21:29:25 | narimiran | sets don't have duplicates, you can do `s.incl 11; s.incl 11; s.incl 11`, and you'll have just one 11 |
21:29:54 | FromGitter | <Bennyelg> @narimiran i tried but failed |
21:30:01 | FromGitter | <basp> if you're just going for 10 000 000 and `int`s you might as well use a hash table |
21:30:06 | FromGitter | <basp> or memoize it |
21:30:18 | FromGitter | <Bennyelg> no |
21:30:42 | FromGitter | <Bennyelg> It wasnt my intention |
21:30:48 | narimiran | and if you use `containsOrIncl(e, x)` (which returns a bool, right), then you can immediately add that to `result` |
21:30:57 | FromGitter | <basp> are you not benchmarking? |
21:31:37 | FromGitter | <Bennyelg> I just wanted to run it 1 time it's just or tests The times are not changing much it's not relevant to cache it |
21:31:55 | FromGitter | <Bennyelg> @narimiran correct |
21:32:53 | narimiran | for x in n: |
21:32:53 | narimiran | if not e.containsOrIncl(x): |
21:32:53 | narimiran | result.add(x) |
21:33:52 | FromGitter | <basp> I'll just let the wizards speak for now, thanks for sharing your experiments! |
21:34:07 | FromGitter | <Bennyelg> @bas thanks! |
21:34:21 | FromGitter | <Bennyelg> @na |
21:34:30 | FromGitter | <Bennyelg> @narimiran did it ;) |
21:34:32 | FromGitter | <Bennyelg> fixing now |
21:36:21 | FromGitter | <basp> Is there a (significant) penalty for using 2 (or more) dimensional arrays? |
21:36:43 | FromGitter | <basp> In other words, am I better off using 1d arrays and calculating the index manually by multiplication? |
21:36:49 | narimiran | @basp nah |
21:37:11 | FromGitter | <basp> Ah trhanks |
21:37:31 | FromGitter | <basp> I'm using static indexes for what it's worth |
21:37:38 | narimiran | good night, have fun benchmarking and micro-tweaking :) |
21:37:39 | FromGitter | <basp> or dimensions rather |
21:37:48 | FromGitter | <Bennyelg> https://gist.github.com/Bennyelg/cfaa2176f82a09b37bec3457c3147506 |
21:37:52 | FromGitter | <basp> you too and thanks! |
21:37:57 | FromGitter | <brentp> are the numbers bound to <1000 ? |
21:38:36 | FromGitter | <basp> I'm still a bit curious about your problem statement @Bennyelg :) |
21:39:22 | blmvxer | in nim 0.19.x what would be the appropriate way to obtain the localhost IP address? |
21:40:28 | FromGitter | <Bennyelg> @basp wanted to check python bridge to nim and see if it's efficient . now the first stage with companies using python is to start create procs on nim in critical path flows |
21:41:00 | FromGitter | <Bennyelg> recursion is much more efficient since we the stack calls are far fasters on nim |
21:41:18 | FromGitter | <Bennyelg> no simple dedup is better. (just stupid batnchmark) |
21:42:22 | FromGitter | <basp> @Bennyelg Ok I get that I'm kinda interested in the boundaries of your problem, if you just need to transfer 40MB of data (like your tests) is different to transferring a continuous stream of data for example. |
21:42:47 | * | narimiran quit (Ping timeout: 240 seconds) |
21:43:55 | FromGitter | <basp> Also, does Nim has tail recursion? |
21:44:41 | FromGitter | <Bennyelg> I don't fully understand you but if you just transferring 40MB of CSV for example, the can parse CSV much faster so I guess it can be done fasters. |
21:45:54 | FromGitter | <Bennyelg> Actually this is a interesting question, (tail recursion with Nim) I don't know yet. @narimiran |
21:46:00 | FromGitter | <basp> Well for example, sometimes you have data coming in non-stop, like a video camera device sending pictures. |
21:46:10 | FromGitter | <Bennyelg> streams |
21:46:12 | FromGitter | <basp> Or sometimes you have a file that's just very big but that can fit in memory. |
21:46:16 | FromGitter | <basp> Yes. |
21:46:30 | FromGitter | <Bennyelg> Apache Spark? |
21:46:34 | FromGitter | <Bennyelg> with Scala hehe |
21:46:37 | FromGitter | <basp> heh |
21:47:45 | FromGitter | <basp> I'm dealing with image streams a lot and also high res individual images, it matters how you deal with them. |
21:48:02 | FromGitter | <Bennyelg> of course. |
21:48:12 | FromGitter | <Bennyelg> @mratsim can help you I think |
21:50:34 | * | blmvxer quit (Quit: Page closed) |
21:51:58 | FromGitter | <basp> Ah unfortunately that is dealing with them professionally and they use .net |
21:52:23 | FromGitter | <basp> I think I'm a bit like you exploring Nim how it maybe can replace existing tools |
21:52:55 | * | Jesin quit (Quit: Leaving) |
21:55:26 | * | JustASlacker quit (Quit: Leaving) |
21:59:51 | * | Jesin joined #nim |
22:03:03 | dom96 | enow: btw please avoid using low-level C threads in Nim (if that's what you're planning to do) |
22:03:12 | enow | hm |
22:03:17 | dom96 | You can use `spawn` with async |
22:03:25 | dom96 | it's still a bit of a pain but it works |
22:03:25 | enow | ah |
22:03:39 | enow | I'm still working on the C - nim glue |
22:03:56 | enow | I need to send an -I flag, with a relative directory for headers |
22:04:12 | enow | I know I've seen this done somewhere but I can't remember where |
22:04:22 | enow | so basically |
22:04:32 | enow | {.passC: "-I../ext/kissfft/".} |
22:04:53 | enow | but that will fail since when the c compiler is working the working directory is elsewhere all of the sudden |
22:09:27 | * | sotrhraven joined #nim |
22:13:48 | * | theelous3 joined #nim |
22:15:05 | * | ghidra joined #nim |
22:18:34 | * | Vladar quit (Remote host closed the connection) |
22:19:19 | ghidra | enow: I think this snippet work. https://paste.ofcode.org/32zCvmW5zQr5bZCEsPiCRpW |
22:21:58 | * | Jesin quit (Quit: Leaving) |
22:26:43 | * | theelous3 quit (Ping timeout: 245 seconds) |
22:30:24 | enow | ghidra: thx |
22:31:24 | enow | but I'll need to import something as well right |
22:31:41 | ghidra | oh, yeah. os module |
22:32:43 | enow | ah found it |
22:32:47 | enow | sweet thanks a bunch |
22:33:28 | enow | if I want to save it as a constant, can I just use let |
22:34:19 | ghidra | I think you need const for that, but should work fine. |
22:37:18 | * | Jesin joined #nim |
22:47:32 | FromGitter | <mratsim> @Bennyelg @basp yes? |
22:48:11 | enow | dom96: hm I'm not sure about spawn/threadpool makes sense for me |
22:53:46 | enow | the producer needs to have a list of channels to which it will send its data |
22:54:13 | enow | when there is a new connection this list needs to get a new member, and as such I'll need low level api to protect it anyways |
23:01:04 | * | krux02 quit (Remote host closed the connection) |
23:12:12 | * | stefanos82 quit (Remote host closed the connection) |
23:28:21 | * | seni joined #nim |
23:43:40 | FromDiscord_ | <treeform> Is there a way to convert a string to a symbol and back in a template? |
23:44:23 | FromDiscord_ | <treeform> Some thing like this: https://gist.github.com/treeform/c4ef874913768517d11668199347a88d |
23:44:36 | FromDiscord_ | <treeform> Is there a way to unwrap name? |
23:44:50 | FromDiscord_ | <treeform> so override("foo") makes foo() not "foo"() |
23:49:06 | * | ng0 joined #nim |
23:52:08 | * | leorize quit (Quit: WeeChat 2.3) |
23:57:31 | * | rnrwashere quit (Remote host closed the connection) |
23:59:40 | * | rnrwashere joined #nim |