<<12-02-2019>>

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:27FromDiscord_<juan_carlos> Too bad asm dont take const string, but I get why. :)
03:22:56FromDiscord_<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:42Zevvcd
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:08FromGitter<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:23FromGitter<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:27Araqthere is none
07:40:54Araqsomebody got crazy creating issue tags
07:41:47narimiranok, putting all "internal error" issues int' "crash" label
07:42:45narimiranthere you go, "internal error" is no more
07:43:18FromGitter<mratsim> windows merged into os specific is OK :)
07:43:51narimiran@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:06FromGitter<mratsim> no problem
07:44:17FromGitter<mratsim> actually you could rename to crash / internal error
07:44:21FromGitter<mratsim> if it's more explicit
07:44:34narimiranwe 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:40Zevvnarimiran[m]: Do we really need external fonts in the docs?
11:47:17narimiranZevv: is that really bothering us? :P
11:47:51Zevvit is *really* bothering *me* :)
11:48:03*onionhammer1 joined #nim
11:48:17ZevvJust nagging, sorry
11:48:23Zevvso quiet here
11:48:26narimiranif only i had no other worries in my life :P :D
11:49:23ZevvI 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:46PMunchZevv, yeah it's been quiet today
12:06:55*krux02 joined #nim
12:18:52narimiranand yesterday was even quieter, i think
12:19:55Zevvwell, a question then
12:20:06ZevvI get tons of warnings about ConvFromXtoItselfNotNeeded from templates
12:20:34Zevvproblem 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:39narimiranPMunch: your protobuf-nim seems to be failing on the latest nim, because of no more nil strings
12:34:57FromGitter<Clyybber> Zevv: Have you tried pushing the hint in the template body?
12:35:49PMunchnarimiran, ooh. That's no good
12:37:28ZevvClybber: let me try that. I probably just need to fix the underlying cause I guess
12:37:48*Snircle joined #nim
12:39:22PMunchnarimiran, seems like the issue is actually within combparse
12:44:34ZevvClybber: thanks, works.
12:44:49FromGitter<Clyybber> np ;)
12:45:49*nsf quit (Quit: WeeChat 2.3)
12:50:31dom96_wSomebody bored and need something to do? https://github.com/mattgodbolt/compiler-explorer/issues/206
12:56:15PMunchHaha, 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:55PMunchnarimiran, protobuf and combparser should work on 0.19.0 now :)
13:06:00PMunchOr 0.19.x
13:10:43PMunchdom96_w, doesn't look super hard to do: github.com/mattgodbolt/compiler-explorer/pull/455/files
13:10:53PMunchThat's the commit that added Haskell
13:10:55dom96_wso do it :)
13:33:17PMunchI'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:41narimiran@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:18FromGitter<mratsim> I think it's a Nim regression
14:36:29FromGitter<mratsim> are you on 19.4?
14:36:42narimiran0.19.9
14:37:04FromGitter<mratsim> can you test on 19.4
14:37:42narimiranlet me try
14:38:39narimiran"../stint/io.nim(20, 58) Error: unknown trait"
14:40:36FromGitter<mratsim> trait?
14:40:47FromGitter<mratsim> it's not Scala / Rust :/
14:41:40FromGitter<mratsim> last CI was 11 hours ago on 0.19.0 - https://travis-ci.org/status-im/nim-stint
14:41:44FromGitter<mratsim> I'm checking
14:42:38FromGitter<mratsim> also it's used everywhere in our codebase so I'm surprised it broke
14:42:44FromGitter<mratsim> silently*
14:43:40FromGitter<mratsim> works on 0.19.4 and value out of range on devel
14:43:49narimiranmaybe you have some dependency installed? some of them are commented out in stint.nimble
14:44:08FromGitter<mratsim> the one commented out are for additional tests
14:44:44narimirancan you maybe see when approximately devel started to be broken?
14:46:38federico3https://news.ycombinator.com/item?id=19133796
14:48:17FromGitter<mratsim> narimiran, it's probably https://github.com/nim-lang/Nim/pull/10394
14:48:51narimiran@mratsim, thanks, will take a look at it
14:49:25FromGitter<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:36FromGitter<Varriount> @mratsim What's your preferred profiling tool?
17:16:23FromGitter<mratsim> Apple Instruments
17:16:29FromGitter<mratsim> And if not on Mac, Intel VTune
17:17:00FromGitter<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:29FromGitter<Varriount> Apple instruments is nice.
18:03:00FromGitter<Varriount> I just wish there was a way to de-mangle Nim identofiers
18:04:13FromGitter<mratsim> when I use code generation, I use exportc or genSym to have cleaner identifiers
18:05:29FromGitter<Varriount> Anyway, it helped me track down unnecessary string allocations pretty easily.
18:06:35FromGitter<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:04blmvxerHello, 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:12FromGitter<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:36kobi7hi 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:09kobi7https://github.com/kobi2187/check_cert2
19:55:21kobi7the repository is a little messy as it was done as a quick tool
19:55:36kobi7and my git fu is almost nil
20:01:56kobi7anyway it is useful and now open source
20:04:16FromDiscord_<juan_carlos> Cool project.
20:06:02kobi7thanks!
20:07:28kobi7to make it completely portable, i'll need to query the ssl socket, haven't had time to tackle that yet
20:08:17FromDiscord_<juan_carlos> when defined(ssl)
20:08:37FromDiscord_<juan_carlos> if theres no SSL at all it wont compile anyways.
20:08:48FromGitter<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:02kobi7_yeah, todos I can delete them.
20:22:42*Ezbob joined #nim
20:22:45*enow joined #nim
20:22:50enowHi guys
20:22:57Ezbobhi
20:23:09enowI'm doing a server that will serve data on a websocket right
20:23:27Ezbobcool
20:23:30enowI want to have a thread that reads from a microphone processes that and then send it to the clients
20:24:04enowso 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:03enowwould 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:53dom96if you can read from the mic asynchronously then do that
20:26:30dom96the only reason you should use threads in Nim is if you want to make better use of your CPU cores
20:26:37dom96(or if async isn't possible)
20:26:55enowno I can't really read from the microphone in async
20:27:44*Trustable quit (Remote host closed the connection)
20:29:34enowI guess my question is from a C programmers perspective, what don't I know about threads in nim
20:31:09rayman22201how do you get the microphone data? is it a blocking operation?
20:31:50enowit's a c file reading from alsa
20:32:00enowand then I'm doing fft on it also in a small c file
20:32:12enowboth by necessity blocking
20:32:50enowand I think having to alsa recording instances at the same time would cause problems to
20:32:55rayman22201then you have to do it C style with threads
20:33:39enowfair enough
20:34:06*kobi7_ quit (Quit: Leaving)
20:34:27enowcan I use channels for this, that is when having one producer and two consumers who needs to get the same data
20:36:03rayman22201I 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:59rayman22201channels will work and they will be thread safe, but channels copy, so you will end up with a performance penalty there.
20:38:50enowokay 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:21rayman22201I don't think channels have a broadcast feature
20:40:41rayman22201you will have to have a channel for each client. They work a lot like linux pipes
20:43:56rayman22201I 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:50enowah really
20:44:52enowhm
20:45:07enowokay so that's one roadblock
20:45:54rayman22201https://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html#pcm_open_behaviour
20:45:57rayman22201maybe?
20:46:14enowI'll check it out
20:46:16enowthanks
20:46:40enowbut 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:02FromGitter<basp> Do you have some kind of buffering already in place?
20:51:46FromGitter<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:37enowhm I'll probably need a single thread anyway since I can only have one alsa listener
20:53:56enowI'm interested in figuring out if I could make it be called as an asynchronous function
20:54:23FromGitter<basp> from what I understand you have one thread dedicated to your mic input stream
20:54:29enowyes
20:54:53enowand the fft goes in the same thread for simplicity
20:55:07FromGitter<basp> for me I'm trying to think of how to distrubute that workload (especially the FFT) over multiple threads
20:55:14FromGitter<basp> I think the main problem is collecting them in order
20:55:52rayman22201the 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:55FromGitter<basp> unless order doesn't matter, in that case it would be kinda easy
20:56:12rayman22201parallel FFT is a hard problem.
20:56:18FromGitter<basp> I understand it won't but if yyou're doing IO at the same time
20:56:27FromGitter<basp> then it might be able to execute while you're waiting on IO
20:56:28rayman22201async only helps with IO
20:56:50enowI 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:09enowyeah so having FFT and recording in one thread, seems to be necessery
20:58:00enowSo I'll quess I'll just add the output in a ever growing sequence
21:00:23rayman22201Doesn't have to be ever growing. Use a ring buffer.
21:00:55FromGitter<basp> Yes. Your main problem is not multi-threading, it's buffering.
21:00:59FromGitter<Bennyelg> need help. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c63340a4003460b2d3d9981]
21:01:21enowmm that's good advie
21:01:23enowadvice*
21:02:08enowit'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:20enowbut 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:24dom96yay, found another websocket bug :)
21:04:01*zachk joined #nim
21:04:29narimiran@bennyelg that proc doesn't look very nice/effective to me
21:05:19*noonien_ joined #nim
21:05:20narimiranbtw, it seems that gitter/irc bridge is semi-broken
21:05:54enowso I guess I'll just put a semaphore and have the consumers wait for those
21:06:04narimirani'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:11enowthat 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:49FromGitter<basp> I'm not a huge nim expert but shouldn't `t1.keys().toSeq()` just work?
21:08:05narimirantest 1 2
21:08:07FromGitter<Bennyelg> no
21:08:18narimiranbridge is back up
21:08:19FromGitter<Bennyelg> its because it's something rleated to the compilation time.
21:08:27narimiran@bennyelg that proc doesn't look very nice/effective to me
21:08:39FromGitter<Bennyelg> no need to be look nice
21:08:42*zachk joined #nim
21:08:46FromGitter<Bennyelg> just trying to validate something
21:08:53FromGitter<Bennyelg> will share in few minutes
21:08:59narimiranwhy are you using table at all?
21:09:21FromGitter<Bennyelg> Im doing few tests ;) now Im going to change to hash
21:09:32FromGitter<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:57narimiranthere is `deduplicate`, and if you don't want that: why not use sets which have deduplication in their genes? ;)
21:10:01FromGitter<Bennyelg> no bas its bad solution.
21:10:06FromGitter<Bennyelg> @basp *
21:10:15FromGitter<Bennyelg> @narimiran deduplicate works bad
21:10:28FromGitter<Bennyelg> sets is going to be next
21:10:37narimiranand creating a hash table is better than that?
21:10:54*zachk quit (Changing host)
21:10:54*zachk joined #nim
21:11:02FromGitter<Bennyelg> I'll explain in 1 minutes. ⏎ for now, dedup is worst , table is better now lets see set
21:11:05FromGitter<Bennyelg> sets*
21:11:27narimiransince you have seq[int], don't forget to use `intsets` ;)
21:11:46FromGitter<Bennyelg> @narimiran thanks
21:11:57*aguspiza quit (Ping timeout: 246 seconds)
21:12:35FromGitter<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:39FromGitter<Bennyelg> @narimiran from intSet to seq[int] ? toSeq() not work :/
21:18:56narimiraniterate over it?
21:19:12FromGitter<Bennyelg> :/ wanted something ready :/
21:21:17FromGitter<Bennyelg> @narimiran better then everything I tried
21:21:19FromGitter<Bennyelg> cool :)
21:21:52narimiranwhat have you tried?
21:22:13narimiran(but yeah, that is what i would have expected, intsets are cool)
21:22:22FromGitter<Bennyelg> I'll share the code just put it right now on the gist
21:22:23FromGitter<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:09FromGitter<Bennyelg> @narimiran
21:26:10FromGitter<Bennyelg> https://gist.github.com/Bennyelg/cfaa2176f82a09b37bec3457c3147506
21:27:03narimiranbut wait
21:27:30narimiranpython's `remove_duplicates` returns a set, not a list
21:27:51FromGitter<Bennyelg> correct my bad
21:27:53narimiranand in nim, you always converted back to seqs, no?
21:28:11FromGitter<Bennyelg> yes I intend to return all as a list
21:28:15FromGitter<Bennyelg> wait Im changing
21:28:30*rnrwashere joined #nim
21:28:37narimiran`containsOrIncl(e, x)` why why why delilah?
21:29:20FromGitter<basp> well without bounds, I think this is a futile exercise tbh
21:29:25narimiransets 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:54FromGitter<Bennyelg> @narimiran i tried but failed
21:30:01FromGitter<basp> if you're just going for 10 000 000 and `int`s you might as well use a hash table
21:30:06FromGitter<basp> or memoize it
21:30:18FromGitter<Bennyelg> no
21:30:42FromGitter<Bennyelg> It wasnt my intention
21:30:48narimiranand if you use `containsOrIncl(e, x)` (which returns a bool, right), then you can immediately add that to `result`
21:30:57FromGitter<basp> are you not benchmarking?
21:31:37FromGitter<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:55FromGitter<Bennyelg> @narimiran correct
21:32:53narimiranfor x in n:
21:32:53narimiran if not e.containsOrIncl(x):
21:32:53narimiran result.add(x)
21:33:52FromGitter<basp> I'll just let the wizards speak for now, thanks for sharing your experiments!
21:34:07FromGitter<Bennyelg> @bas thanks!
21:34:21FromGitter<Bennyelg> @na
21:34:30FromGitter<Bennyelg> @narimiran did it ;)
21:34:32FromGitter<Bennyelg> fixing now
21:36:21FromGitter<basp> Is there a (significant) penalty for using 2 (or more) dimensional arrays?
21:36:43FromGitter<basp> In other words, am I better off using 1d arrays and calculating the index manually by multiplication?
21:36:49narimiran@basp nah
21:37:11FromGitter<basp> Ah trhanks
21:37:31FromGitter<basp> I'm using static indexes for what it's worth
21:37:38narimirangood night, have fun benchmarking and micro-tweaking :)
21:37:39FromGitter<basp> or dimensions rather
21:37:48FromGitter<Bennyelg> https://gist.github.com/Bennyelg/cfaa2176f82a09b37bec3457c3147506
21:37:52FromGitter<basp> you too and thanks!
21:37:57FromGitter<brentp> are the numbers bound to <1000 ?
21:38:36FromGitter<basp> I'm still a bit curious about your problem statement @Bennyelg :)
21:39:22blmvxerin nim 0.19.x what would be the appropriate way to obtain the localhost IP address?
21:40:28FromGitter<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:00FromGitter<Bennyelg> recursion is much more efficient since we the stack calls are far fasters on nim
21:41:18FromGitter<Bennyelg> no simple dedup is better. (just stupid batnchmark)
21:42:22FromGitter<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:55FromGitter<basp> Also, does Nim has tail recursion?
21:44:41FromGitter<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:54FromGitter<Bennyelg> Actually this is a interesting question, (tail recursion with Nim) I don't know yet. @narimiran
21:46:00FromGitter<basp> Well for example, sometimes you have data coming in non-stop, like a video camera device sending pictures.
21:46:10FromGitter<Bennyelg> streams
21:46:12FromGitter<basp> Or sometimes you have a file that's just very big but that can fit in memory.
21:46:16FromGitter<basp> Yes.
21:46:30FromGitter<Bennyelg> Apache Spark?
21:46:34FromGitter<Bennyelg> with Scala hehe
21:46:37FromGitter<basp> heh
21:47:45FromGitter<basp> I'm dealing with image streams a lot and also high res individual images, it matters how you deal with them.
21:48:02FromGitter<Bennyelg> of course.
21:48:12FromGitter<Bennyelg> @mratsim can help you I think
21:50:34*blmvxer quit (Quit: Page closed)
21:51:58FromGitter<basp> Ah unfortunately that is dealing with them professionally and they use .net
21:52:23FromGitter<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:03dom96enow: btw please avoid using low-level C threads in Nim (if that's what you're planning to do)
22:03:12enowhm
22:03:17dom96You can use `spawn` with async
22:03:25dom96it's still a bit of a pain but it works
22:03:25enowah
22:03:39enowI'm still working on the C - nim glue
22:03:56enowI need to send an -I flag, with a relative directory for headers
22:04:12enowI know I've seen this done somewhere but I can't remember where
22:04:22enowso basically
22:04:32enow{.passC: "-I../ext/kissfft/".}
22:04:53enowbut 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:19ghidraenow: 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:24enowghidra: thx
22:31:24enowbut I'll need to import something as well right
22:31:41ghidraoh, yeah. os module
22:32:43enowah found it
22:32:47enowsweet thanks a bunch
22:33:28enowif I want to save it as a constant, can I just use let
22:34:19ghidraI think you need const for that, but should work fine.
22:37:18*Jesin joined #nim
22:47:32FromGitter<mratsim> @Bennyelg @basp yes?
22:48:11enowdom96: hm I'm not sure about spawn/threadpool makes sense for me
22:53:46enowthe producer needs to have a list of channels to which it will send its data
22:54:13enowwhen 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:40FromDiscord_<treeform> Is there a way to convert a string to a symbol and back in a template?
23:44:23FromDiscord_<treeform> Some thing like this: https://gist.github.com/treeform/c4ef874913768517d11668199347a88d
23:44:36FromDiscord_<treeform> Is there a way to unwrap name?
23:44:50FromDiscord_<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