<< 20-03-2019 >>

00:04:12*lf-araujo quit (Ping timeout: 250 seconds)
00:08:25FromDiscord<moerm> see you
00:09:26*kapil____ quit (Quit: Connection closed for inactivity)
00:35:48shashlickmoerm: so far, i've had great success with cpu, ram and disk usage and with Nim, the velocity of dev is amazing
00:36:24shashlickin two months of part time work, I have moved over from notepad++
00:40:03*theelous3_ quit (Ping timeout: 245 seconds)
00:44:36*abm quit (Ping timeout: 272 seconds)
00:54:02*vlad1777d quit (Ping timeout: 250 seconds)
01:01:39*kapil____ joined #nim
01:17:03*seni quit (Read error: Connection reset by peer)
01:26:28*sz0 quit (Quit: Connection closed for inactivity)
01:34:09*I_Right_I quit (Remote host closed the connection)
01:37:32*chimez joined #nim
01:37:44*chimez quit (Client Quit)
01:39:49*dddddd quit (Remote host closed the connection)
02:00:14*sealmove quit (Quit: WeeChat 2.4)
02:17:52*thomasross_ joined #nim
02:17:52*thomasross quit (Killed (barjavel.freenode.net (Nickname regained by services)))
02:17:52*thomasross_ is now known as thomasross
02:32:03*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:35:17*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
02:36:35*cyraxjoe joined #nim
02:45:30*cgfuh quit (Quit: WeeChat 2.3)
02:46:43*noeontheend joined #nim
02:53:57*MightyJoe joined #nim
02:54:56*cyraxjoe quit (Ping timeout: 250 seconds)
03:00:15*cyraxjoe joined #nim
03:00:46*MightyJoe quit (Ping timeout: 272 seconds)
03:02:57FromDiscord<inv> Hello, sorry, just few minutes with nim: how to create array with 10^6 elemets with 0..1000 random number ?
03:03:12FromDiscord<inv> trying to do it without any loop, is it sequtils ?
03:05:53*banc quit (Quit: Bye)
03:14:22*gmpreussner quit (Quit: kthxbye)
03:22:24*gmpreussner joined #nim
03:23:20FromDiscord<inv> did it: ```map(repeat(0, 1_000_000), proc(x: int): int64 = rand(1000))```
03:26:45*banc joined #nim
03:28:55*rnrwashere quit (Remote host closed the connection)
03:29:57*rnrwashere joined #nim
04:04:45*noeontheend quit (Ping timeout: 250 seconds)
04:10:03*lritter quit (Ping timeout: 245 seconds)
04:11:06*lritter joined #nim
04:19:03*chemist69 quit (Ping timeout: 250 seconds)
04:21:13*chemist69 joined #nim
04:24:12*rnrwashere quit (Remote host closed the connection)
04:25:38*nsf joined #nim
04:26:18*rnrwashere joined #nim
04:29:35*rnrwashere quit (Remote host closed the connection)
04:30:56*rnrwashere joined #nim
04:48:47*lritter quit (Ping timeout: 245 seconds)
05:02:55*ryukoposting quit (Quit: WeeChat 1.6)
05:23:17*leorize quit (Quit: WeeChat 2.3)
05:23:55*thomasross quit (Remote host closed the connection)
05:24:15*thomasross joined #nim
05:42:58*rnrwashere quit (Remote host closed the connection)
05:50:08*leorize joined #nim
06:05:42*ikan-keli_ quit (Ping timeout: 246 seconds)
06:08:09*narimiran joined #nim
06:09:19*ikan-keli_ joined #nim
06:31:12*Perkol joined #nim
06:31:51*noeontheend joined #nim
06:36:40*enow joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:01:06*noeontheend quit (Ping timeout: 264 seconds)
07:03:56*solitudesf joined #nim
07:04:47*gmpreussner joined #nim
07:06:00*krux02 joined #nim
07:07:12*Elronnd quit (Quit: leaving)
07:07:36*elronnd joined #nim
07:08:20*elronnd is now known as Elronnd
07:15:19*Vladar joined #nim
07:18:47*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
07:19:09*PMunch joined #nim
07:19:55*cyraxjoe joined #nim
07:23:59*rokups joined #nim
07:28:03*dddddd joined #nim
07:30:33PMunchHmm, when did else cases start to complain about invalid else statetemnts because all cases are covered?
07:32:31narimirancouple of weeks ago, i think
07:32:39narimiranit is a great change, IMO
07:56:26Zevvyeah super
07:56:45ZevvI now even make all my discards explicit instead of else-ing
07:57:05Zevvway easier to have the compiler point out to me what I need to do when I add a member to my enums
07:57:50Zevvoh wait, the other way around. I shoud read before answering, right
08:00:57*Perkol quit (Remote host closed the connection)
08:06:09FromDiscord<waghanza> eh
08:06:15FromDiscord<waghanza> hello
08:07:32ZevvHi waghanza
08:08:17FromDiscord<waghanza> Could anyone help me in https://github.com/the-benchmarker/web-frameworks/pull/1011
08:08:32FromDiscord<waghanza> I try to install `nimpretty`
08:18:14leorizeis there any problem?
08:19:52narimiranwadhanza yes, you can use `nimpretty`from cli on linux (to answer your question from that thread)
08:21:09narimiranwaghanza ^
08:21:53FromGitter<waghanza> @narimiran how ?
08:22:10narimirannimpretty <filename>
08:22:42FromGitter<waghanza> no, I mean, how to install
08:22:43FromGitter<waghanza> it
08:23:02leorizeclone Nim's git repo
08:23:16leorizecd nimpretty
08:23:24leorizenim c nimpretty.nim
08:24:13leorizeit's also installed automatically if you use the git version of choosenim
08:35:57*JustASlacker joined #nim
08:42:30*lf-araujo joined #nim
08:49:25FromDiscord<waghanza> When `nim c nimpretty.nim` I have `../compiler/pathutils.nim(13, 22) Error: cannot open file: pathnorm`
08:49:28FromDiscord<waghanza> on **devel**
08:50:02FromDiscord<waghanza> but not on **master***
08:50:46leorizeyea, you'd need to use the master branch
08:51:08leorizethe devel compiler is vastly different from the stable one, so not everything works
08:53:41FromDiscord<waghanza> 😉
08:54:37*lf-araujo quit (Read error: Connection reset by peer)
08:58:41*ng0 joined #nim
09:01:26*lf-araujo joined #nim
09:07:57*chimez joined #nim
09:13:47*neceve joined #nim
09:14:35*fredrik92 quit (Read error: Connection reset by peer)
09:17:55*neceve quit (Remote host closed the connection)
09:22:47*ng0 quit (Remote host closed the connection)
09:23:48*neceve joined #nim
09:23:48*ng0 joined #nim
09:27:54*abm joined #nim
09:29:26*kapil____ quit (Quit: Connection closed for inactivity)
09:37:24*lf-araujo quit (Ping timeout: 268 seconds)
09:37:30*solitudesf quit (Ping timeout: 250 seconds)
09:43:55*rnrwashere joined #nim
09:48:30*rnrwashere quit (Ping timeout: 264 seconds)
10:22:07*leorize quit (Quit: WeeChat 2.3)
10:51:46*Vladar quit (Remote host closed the connection)
11:02:38FromGitter<mratsim> btw 0.19.0 was a year ago already :P
11:17:50*rokups quit (Quit: Connection closed for inactivity)
11:22:31*couven92 joined #nim
11:29:05PMunchmratsim, lies!
11:29:13PMunchIt was barely yesterday!
11:29:50FromGitter<mratsim> ah sorry it was 0.18.0 on March 1st
11:49:09narimiranand this year, we release v1.0 on April 1st!
11:53:37PMunchmratsim, haha I was just messing with you :P But 0.19.0 didn't feel that long ago
12:04:08*seni joined #nim
12:16:02*seni quit (Quit: Leaving)
12:33:02*Vladar joined #nim
12:37:12*solitudesf joined #nim
12:59:24*Snircle joined #nim
13:13:34*enow quit (Read error: No route to host)
13:30:32*cgfuh joined #nim
13:34:24*enow joined #nim
14:01:11*noeontheend joined #nim
14:19:40*natrys joined #nim
14:27:59*chimez quit (Quit: chimez)
14:29:40*lritter joined #nim
14:40:26*stefanos82 joined #nim
14:44:36*Jesin quit (Quit: Leaving)
14:55:29*Jesin joined #nim
15:03:07*ng0 quit (Ping timeout: 256 seconds)
15:07:07*PMunch quit (Remote host closed the connection)
15:14:54*noeontheend quit (Ping timeout: 264 seconds)
15:17:49shashlickhas anyone figured out how to write to stdin of a process you spawn and get its output?
15:18:20shashlickgiven the process waits for stdin to close, which only happens when the parent exits really
15:29:37*nsf quit (Quit: WeeChat 2.4)
15:31:25*noeontheend joined #nim
15:40:48*enow quit (Remote host closed the connection)
15:42:37*absolutejam joined #nim
15:44:37*absolutejam quit (Client Quit)
15:45:45*JustASlacker quit (Remote host closed the connection)
15:48:23*planetis[m] joined #nim
15:48:23planetis[m]hey, whats the future of object constructors in nim (i.e. MyObj(x: x)) are there here to stay? Will they be extended to support default values? or I better not use them?
15:48:47Zevvshashlick: that's generally a hard problem because of blocking
15:48:50*planetis[m] left #nim (#nim)
15:49:07*planetis[m] joined #nim
15:52:21shashlickZevv, ya, I have to use an intermediate file looks like
15:55:42*rnrwashere joined #nim
15:59:10Zevvor do it async or with threads.
16:00:14*rnrwashere quit (Remote host closed the connection)
16:00:52*rnrwashere joined #nim
16:05:08*rnrwashere quit (Ping timeout: 258 seconds)
16:14:51FromGitter<mratsim> @planetis there is a default value RFC
16:15:01FromGitter<mratsim> and a constructor RFC as well
16:15:48FromGitter<mratsim> https://github.com/nim-lang/RFCs/issues/126
16:16:11FromGitter<mratsim> https://github.com/nim-lang/RFCs/issues/126
16:16:38FromGitter<mratsim> sorry: https://github.com/nim-lang/RFCs/issues/48
16:24:56*noeontheend quit (Ping timeout: 268 seconds)
16:25:33*bobby quit (Ping timeout: 246 seconds)
16:25:39*rnrwashere joined #nim
16:25:58*Tanger quit (Ping timeout: 255 seconds)
16:26:23*Tanger joined #nim
16:26:30*Vladar quit (Remote host closed the connection)
16:27:10*bobby joined #nim
16:31:16planetis[m]thanks for the links, I believe there was also a proposal for type inference, so you don't have to write result = initTable[int, float]() , but can't find it. Was it rejected?
16:33:40planetis[m]imho the last one would make nim awesome
16:34:41*bobby quit (Remote host closed the connection)
16:34:57planetis[m]oh found it https://github.com/nim-lang/Nim/issues/2071
16:36:56*bobby joined #nim
16:38:03planetis[m]btw using result = MyObj(foo: foo) creates two zeroMem calls, is that a reported issue?
16:43:58*bobby quit (Remote host closed the connection)
16:44:37*bobby joined #nim
16:46:34*arecacea1 quit (Remote host closed the connection)
16:46:52*arecacea1 joined #nim
16:47:45*I_Right_I joined #nim
16:51:52*Bob- joined #nim
16:52:19*bobby quit (Ping timeout: 252 seconds)
16:52:19Araqplanetis[m], not sure but the code generator is getting an overhaul.
16:52:35Araqthe zeroMem calls are optimized by C though
16:52:41Araqto a single one
16:54:07FromGitter<mratsim> I’m pretty sure they’re not
16:54:20FromGitter<mratsim> I found duplicate zeroMem in both Arraymancer and Nimbus iirc
16:55:29FromGitter<mratsim> GCC would only optimize them if they are stack objects i think
16:55:42FromGitter<mratsim> (i.e. it can prove that there is no side-effects)
16:56:14planetis[m]i though so, it wouldn't be really an issue, (didn't check the assembly though)
16:57:00FromGitter<mratsim> (or you tag them with the “pure” function attribute (not allowed to touch anything besides parameters and global variables for GCC)
16:57:13*bobby joined #nim
16:57:18*Bob- quit (Ping timeout: 252 seconds)
16:57:40planetis[m]btw is there any small coding task in Nim that I can contribute? like a refactor?
16:58:00FromGitter<mratsim> look into the issues in Nim tracker
16:58:24FromGitter<mratsim> the easy one should be tag with “easy” but easy in the eye of the beholder
16:59:05planetis[m]will do
17:00:08Araqmratsim: well usually it's on the stack
17:00:49FromGitter<mratsim> ref objects do exist ;)
17:03:54planetis[m]lol i meant rewrite, refactors are not small tasks :)
17:05:48*abm quit (Ping timeout: 246 seconds)
17:06:22*neceve quit (Remote host closed the connection)
17:07:43*Trustable joined #nim
17:13:42*noeontheend joined #nim
17:17:15narimiranplanetis[m]: well, there is the ongoing task to improve documentation https://github.com/nim-lang/Nim/issues/10330 - it is quite easy thing to do
17:28:49*nsf joined #nim
17:41:28*jjido joined #nim
17:46:45FromDiscord<moerm> Hello
17:48:23FromDiscord<moerm> Could one of the forum mods please explain the (sometimes temporary) vanishing of (perfectly polite and constructive) posts?
17:48:37narimiranposts shouldn't disappear
17:48:57narimirando you have a link to a thread where that happened?
17:49:35FromDiscord<moerm> namiram Well it happened multiple time to me. Sometimes earlier (granted, then some posts were a bit harsh) and the last time yesterday (perfectly polite and constructive)
17:50:01FromDiscord<moerm> The one yesterday (night) https://forum.nim-lang.org/t/4728
17:50:14FromDiscord<moerm> *Now* my post is there again
17:50:21shashlickyes
17:50:25narimiranyeah, it is there, i see it
17:50:44narimiranbefore that, you posted this: https://forum.nim-lang.org/t/4726#29493
17:51:22narimiranand one another comment there. before that: https://forum.nim-lang.org/t/4716#29465 (4 days ago)
17:51:25narimiranwhat is missing?
17:51:53FromDiscord<moerm> narimiran Yes, correct. But my own threads never vanished (nor posts in it)
17:52:35narimiranok, what *did* vanish?
17:52:44FromDiscord<moerm> The first one you linked from yesterday was visible after I created it ... later it vanished ... and sometimes today it reappeared
17:53:31FromDiscord<moerm> (sorry, I mean the one *I* linked to, in pointers and refs)
17:54:05narimirani visit forum quite frequently and i didn't notice anything vanishing then reappearing
17:54:24FromDiscord<moerm> It looked as if a mod had vanished it and (possibly another mod) later made it reappear
17:54:37narimirani seriously doubt that
17:54:50narimiranwe 99% of time deal only with spammers
17:55:02FromDiscord<moerm> narimiran Not to create trouble but kindly note that I'm not lying nor am I particularly stupid
17:55:21narimiransometimes you'll see some old forum posts appear but there's no new post there
17:55:29FromDiscord<moerm> When I say that my post was gone at least for some hours then it *was* gone.
17:55:33FromGitter<alehander42> well next time, please report it while it's vanished
17:55:58narimiranthat's because it is posted by some new user. sometimes it will be valid post, which will be revealed when mods enable it, sometimes it is a spammer
17:56:11FromDiscord<moerm> alehandler I *did* (here) but there was no reaction - which I can understand as it was quite late
17:56:24narimirannext time: screenshots please
17:56:31FromDiscord<moerm> Uhm, I'm neither exactly new nor am I a spammer
17:56:36FromGitter<alehander42> ah i see
17:56:45narimiranyour posts weren't disappearing for me
17:57:21FromDiscord<moerm> narimiran Please get it: That means *nothing* if you ware not there at that time
17:57:36narimiranthat's why i said: screenshots please next time
17:57:57narimiranbecause all this discussion means nothing too ;)
17:58:02FromDiscord<moerm> It *did* disappear, I even tried to force-reload the page to exclude a browser hiccup. It was *gone*, at least for some hours
17:58:48FromDiscord<moerm> And I'm not talking about it to make a fuss but because I want to know the reasons (maybe technical) and I want to guide some mods attention to it
17:59:12FromDiscord<moerm> I don't think I'd be a good community member if I saw something not working and just kept it to myself
18:00:12FromDiscord<moerm> Result so far "nariman saying F*ck off unless you have proof". Hmmm, OK.
18:00:27FromGitter<alehander42> this is uncalled for moerm, please be reasonable
18:00:28narimiranplease. i didn't say that
18:00:50FromDiscord<moerm> narimiran That what I read. Maybe I'm wrong
18:00:56FromDiscord<moerm> alehandler Pardon?
18:01:28narimirani could also write "moerm saying fuck you mods for messing with my mind", but that isn't very nice nor productive, is it?
18:01:35FromDiscord<moerm> Me telling something and hearing "screenshot please" is to be understood as ...?
18:01:39FromGitter<alehander42> nobody said "fuck off", it's just obvious that we don't know why the posts disappeared
18:01:45FromGitter<alehander42> what do you want us to do honestly?
18:01:56narimiranundestood as: we want to investigate it
18:02:22FromGitter<alehander42> screenshot can give additional info: hour, other missing posts
18:02:24FromDiscord<moerm> alehandler "We don't know why" is a perfectly acceptable answer. "Bring proof" however implies that I'm making up stuff
18:02:51*narimiran can't believe what he's reading
18:03:07FromGitter<alehander42> well, it wasn't the intention, let's call it a misunderstanding
18:03:11FromDiscord<moerm> "Hour" - I *did* mention it here right when I noticed it, so the chat logs could help re. the time
18:04:16shashlickwe're all coders here, "it doesn't work" is not actionable, and asking for more info is perfectly reasonable
18:04:22FromDiscord<moerm> narimiran, alehandler "misunderstanding" - Accepted. As I said I'm not bringing this up to create trouble. But neither am I taking it lightly when someone hints that I'm lying
18:04:50narimirani'm not implying that you're lying. jesus christ!!!
18:04:54FromGitter<alehander42> again: not the idea, the point was to somehow collect more info next time if this happens
18:05:02FromGitter<alehander42> but yeah lets all calm down :D
18:05:14FromGitter<alehander42> thats pre-friday burnout haha
18:05:23narimiranif anything, you're the one attacking (because of the way you (mis)interpreted some messages)
18:05:27*sealmove joined #nim
18:05:55FromDiscord<moerm> shashlick Yes, agreed. But a) I *did* provide info (e.g. the chat yesterday night) and b) yes, "it doesn't help doesn't provide insight, but it provide a clue *that* something isn't working
18:06:51FromDiscord<moerm> Again @narimiran, alehandler I'm not interested in creating trouble and I'm willing to apologize if I was too sensible. But maybe, just maybe narimiran might think a second about his wording too
18:07:18*noeontheend quit (Ping timeout: 268 seconds)
18:07:44FromDiscord<moerm> narimiran "because of the way you (mis)interpreted some messages" - thanks for a good laugh (honestly
18:07:58narimiranplease re-read everything written so far once you cool down. i hope you'll see there was no bad intentions on my side
18:08:13FromDiscord<moerm> The way one is understood - both you, I, and everyone - is also everyones resposability
18:08:40FromGitter<alehander42> btw moerm, how is the proof thing going
18:08:44FromGitter<alehander42> what was it:
18:08:55FromGitter<alehander42> tla+ ?
18:08:56FromDiscord<moerm> I don't say that you had bad *intentions*. In fact my guess is more that you communicated carelessly (probably under stress)
18:08:57narimiranand currently you're the only one who understood it as i'm implying that you're lying, and not (like everybody else) that i'd like more information so i can check what's going on
18:09:04FromGitter<alehander42> i remember there was an idea to combine it with the compiler
18:09:54FromDiscord<moerm> alehandler No, not tla+ but the Z3 engine. I said that I don't have the time *now*. But Zevv seems to be working on something.
18:10:25FromDiscord<moerm> It's in early stage afaik but his work looks good
18:11:18sealmovehi, I have another macro question: How do you extract the type of a passed symbol? https://termbin.com/xmki
18:11:51FromDiscord<moerm> nariman My take so far is simple: "Why should I invest work in helping newbies when it sometimes just vanishes and nobody cares a lot?" - and, yes, I consider this case closed at least for the moment and will not bring it up again. Thank you, have a nice day
18:12:15narimiranplease continue to help newbies.
18:12:37FromDiscord<moerm> The weather here is quite nice
18:12:59narimiranas you can see, all you're vanishing posts have reappeared, so you're help will be seen
18:13:08AraqI did delete spam today fwiw
18:13:28Araqbut there is also a bug, posts by spammers are not deleted automatically
18:13:53FromDiscord<moerm> Whatever. Zevv is working on a Nim-Z3 interface. That's AWESOME!
18:13:56Araqwhich is why I have to do it by hand. The reason seems an overly complex SQL query which we got slightly wrong
18:14:44shashlickthis is an international tech chat folks, please everyone refrain from passing judgement on how people talk and word things and stick to the issues
18:14:46FromDiscord<moerm> Araq Maybe that's the simple explanation. I could understand perfectly well that a mod confronted with loads of spam occasionally clicks the wrong post
18:15:47narimiranas i said half an hour ago: this is not some mod playing with your posts
18:17:14FromDiscord<moerm> Btw, I remember times when Nim implementations of crypto, hash, etc were 10%, sometimes even 20% slower than C implementations. That has changed dramatically. I can hardly tell you how pleased I am to have a hash implementation that is (a little bit) *faster* in Nim! Lovely, just great. Kudos to Araq and the team!
18:17:41FromGitter<mratsim> As a forum mod I don't delete posts but ban whole accounts, I don't think anyone delete posts, besides when libman goes too far ;)
18:18:06FromGitter<mratsim> and it has like 2-3 warnings before deletion
18:18:21FromDiscord<moerm> narimiran I read what you write (but that thing is dead afaic and I won't discuss anymore - as I have no screenshot, haha)
18:18:39*narimiran roll eyes
18:18:52FromDiscord<moerm> mratsim *g (I think he means really well, though)
18:19:12Araqwell I take responsibility, blame me for any lost messages
18:19:27FromDiscord<moerm> narimiran I know that from my wife (and have learned to sigh and ignore it) Thank you. Nice weather here
18:20:25FromDiscord<moerm> Araq No problem at all (no matter who did it). "Confronted with loads of spam someone might have done a bad click" is perfectly acceptable as an explanation and understandable.
18:20:35FromGitter<mratsim> yes I agree, but sometimes it's just derails a thread for 30 posts ;)
18:21:11*nsf quit (Quit: WeeChat 2.4)
18:21:13sealmoveis type info lost when you pass something to a macro?
18:21:27Araqsealmove, it depends.
18:21:28FromDiscord<moerm> mratsim I'm a mod myself in a (mid sized) community and I understand you. In fact, those cases are particularly hard *because* those guys mean well
18:21:40FromGitter<mratsim> it's not lost, either it's not computed if you use an untyped macro, or availaible if you use a typed macro
18:21:51*Trustable quit (Remote host closed the connection)
18:22:45sealmovehow to use it? for example i want to use the type of passed argument to create a proc that takes an argument of that type
18:23:11sealmovecan't find a proc in macro module for that extracts a type..
18:28:38FromDiscord<moerm> How much trouble is it to catch *all* the usualy **ix/ux signals (not just SIGC)? And: Is there example code anywhere?
18:29:14FromDiscord<moerm> I'd also minimally need HUP, USR1 and USR2
18:30:26*euantor quit (Ping timeout: 252 seconds)
18:30:48*euantor joined #nim
18:31:32*surma quit (Ping timeout: 252 seconds)
18:31:32*zielmicha__ quit (Ping timeout: 252 seconds)
18:31:45*surma joined #nim
18:32:16*LyndsySimon quit (Ping timeout: 252 seconds)
18:33:18FromGitter<mratsim> @sealmove have a look at how I generate iterators with proper types in loopfusion: https://github.com/numforge/loop-fusion/blob/master/loopfusion.nim
18:33:35*zielmicha__ joined #nim
18:34:45*LyndsySimon joined #nim
18:37:54sealmovemratsim: thanks! exactly what I need
18:40:02Araqmoerm: read lib/system/excpt.nim line 527
18:40:45FromDiscord<moerm> Araq Thanks a lot, will do.
18:41:11*jjido_ joined #nim
18:43:41FromDiscord<moerm> Btw, @Araq Any idea when 0.2 ~ 1.0 will be reached? I mean 0.19.9 looks promising ...
18:45:21Araqit got delayed because of this new holy --newruntime switch which will destroy our competition...
18:45:59FromDiscord<moerm> Hmmm, tell me more about it (or give me a link), please ...
18:49:36AraqI'm writing an article and the implementation at the same time. Which is probably a terrible idea.
18:51:02FromDiscord<moerm> Hmmm Sorry, but yes I agree.
18:55:02FromDiscord<moerm> see you all, I'll be back later I guess
19:03:59sealmovemratsim: it worked already! :)
19:04:45sealmovewhat do you mean "will destroy our competition"?
19:05:15sealmovewill crash our competitors? :D
19:07:38*kapil____ joined #nim
19:08:06*jjido_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:11:59*ng0 joined #nim
19:12:23*theelous3_ joined #nim
19:25:08*rnrwashere quit (Remote host closed the connection)
19:26:54*rnrwashere joined #nim
19:33:42sealmovewhen you have a varargs parameter and you want to make a call where you pass nothing as argument, how do you explicitly specify that?
19:37:52sealmovefor example this fails to compile: https://termbin.com/hchg
19:38:59*abm joined #nim
19:45:27*ptdel joined #nim
19:46:12Araqexample([], 5.5)
19:48:31*vlad1777d joined #nim
19:49:30sealmove(-‸ლ) that was dead simple
19:54:53*narimiran_ joined #nim
19:57:28*narimiran quit (Ping timeout: 255 seconds)
20:01:48Araqyay
20:01:50Araqtemp4.nim(10, 1) Error: cannot bind another '=destroy' to: Foo
20:02:06Araqit finally works, strict checking for destructors
20:02:51FromGitter<arnetheduck> now if we could also constrain construction to specific funcs... :)
20:02:58*Sentreen joined #nim
20:03:09*Sentreen quit (Client Quit)
20:05:24Araq.requiresInit exists in the compiler but isn't exposed as a pragma
20:06:12ptdelnice, so if I accidentally unallocate something again after it's already been done i can catch on that?
20:06:47Araqwell yeah. If your destructor checks for that.
20:08:33*cgfuh quit (Quit: WeeChat 2.3)
20:12:00*vegax87 quit (Ping timeout: 258 seconds)
20:13:11*rnrwashere quit (Remote host closed the connection)
20:21:58*rnrwashere joined #nim
20:23:38*vegax87 joined #nim
20:30:35*Sentreen joined #nim
20:31:04*Sentreen quit (Client Quit)
20:33:17*narimiran_ is now known as narimiran
20:44:31*Sentreen joined #nim
20:45:15*Sentreen quit (Client Quit)
20:50:23*Sentreen joined #nim
20:51:32*Sentreen quit (Client Quit)
20:51:41*Sentreen joined #nim
21:01:07*pacujo joined #nim
21:03:30pacujoPorting a program to nim, I ran into what looks like some sort of a glitch.
21:03:40pacujoA simple "import seqs" results in:
21:03:50pacujo../../etc/nim/nim-0.19.4/lib/core/seqs.nim(18, 13) Error: undeclared identifier: 'Allocator'
21:04:14pacujoOr maybe it's my half-hearted installation of nim.
21:04:26*narimiran quit (Ping timeout: 252 seconds)
21:04:36pacujoA comment in seqs.nim claims:
21:04:40pacujo# strs already imported allocators for us.
21:05:10pacujoNim Compiler Version 0.19.4 [Linux: amd64]
21:05:23*Sentreen quit (Quit: WeeChat 2.3)
21:05:29FromGitter<liquid600pgm> do you guys have any tutorials on threads in nim?
21:05:44*sentreen joined #nim
21:06:57sealmoveoh varargs have to be of the same type?
21:08:20sealmovesorry, I mean varargs[typed]
21:09:36sealmovethe type is inferred from the 0th argument, and the type of 1st, 2nd, ... are overritten within the macro
21:09:42sealmoveis this intended?
21:11:06*jjido quit (Quit: Connection closed for inactivity)
21:11:44*sentreen quit (Quit: WeeChat 2.3)
21:12:01*sentreen joined #nim
21:12:35sealmovesorry nvm
21:13:32sealmoveAraq: what you suggested (using `[]` for calling without arguments) works for procs but not macros
21:15:08*sentreen quit (Client Quit)
21:15:16sealmoveif you pass `[]` it is interpreted as `array[0 .. -1, empty]`
21:15:23*pacujo quit (Ping timeout: 268 seconds)
21:15:25*sentreen joined #nim
21:16:11*sentreen quit (Client Quit)
21:16:22*sentreen joined #nim
21:16:49shashlickpacujo how did you install Nim
21:17:22shashlickliquid600pgm there's stuff in the manual for threadpool and spawn
21:17:38shashlickBut for simple stuff, just createThread is good
21:18:05Araqpacuja: don't import seqs.nim
21:18:58Araqsealmove, well maybe
21:19:35*sentreen quit (Client Quit)
21:20:31*sentreen joined #nim
21:20:55sealmoveeh ok, will have to live with this
21:24:53*a_b_m joined #nim
21:28:18*abm quit (Ping timeout: 246 seconds)
21:32:04sealmoveis it possible to overload macros?
21:36:56*sentreen quit (Quit: WeeChat 2.3)
21:37:11*sentreen joined #nim
21:38:14sealmoveoh it works :)) that's beautiful
21:47:28*noeontheend joined #nim
21:58:03sealmoveis it possible to call an anonymous function (without giving it a name)?
22:00:03solitudesf(proc = echo "test")()
22:00:36sealmovesolitudesf: oh that works? sweet!
22:06:16*Jesin quit (Quit: Leaving)
22:08:43*Jesin joined #nim
22:12:07*noeontheend quit (Ping timeout: 268 seconds)
22:13:14*sentreen quit (Quit: WeeChat 2.3)
22:13:33*sentreen joined #nim
22:14:47*sentreen quit (Client Quit)
22:14:58*sentreen joined #nim
22:21:51*chimez joined #nim
22:23:12*sealmove quit (Quit: WeeChat 2.4)
22:24:32*a_b_m quit (Remote host closed the connection)
22:24:59*a_b_m joined #nim
22:25:21*fredrik92 joined #nim
22:26:35*rnrwashere quit (Remote host closed the connection)
22:27:19*couven92 quit (Ping timeout: 255 seconds)
22:34:21*sentreen quit (Quit: WeeChat 2.3)
22:34:43*sentreen joined #nim
22:46:03*natrys quit (Quit: natrys)
22:49:15*theelous3_ quit (Read error: Connection reset by peer)
22:49:40*theelous3_ joined #nim
22:51:11FromGitter<danielecook> Anyone know of an easy way to calculate the median from an array?
22:51:44FromGitter<danielecook> Also, a way to convert an array to a `Counter()` like object, and calc. median from that would be more helpful
22:51:51FromGitter<danielecook> 1) Counter from python
22:59:26*krux02 quit (Remote host closed the connection)
22:59:47*xet7 quit (Ping timeout: 240 seconds)
23:00:48*noeontheend joined #nim
23:04:37*solitudesf quit (Ping timeout: 245 seconds)
23:06:19*vegax87 quit (Ping timeout: 252 seconds)
23:10:53*krux02 joined #nim
23:11:36*fredrik92 quit (Read error: Connection reset by peer)
23:12:17*xet7 joined #nim
23:18:24*vegax87 joined #nim
23:22:14*jjido joined #nim
23:22:59*krux02 quit (Remote host closed the connection)
23:33:01FromGitter<mratsim> import tables and use CountTable
23:33:09FromGitter<mratsim> @danielecook ^
23:34:06FromGitter<mratsim> for median you can just copy paste the 3 lines from Rosetta code: https://rosettacode.org/wiki/Averages/Median#Nim
23:42:54FromGitter<danielecook> ah thank you! I did find count table but wanted to find the most efficient method
23:45:31FromGitter<mratsim> I don’t think there is a more efficient way than allocating an intermediate array besides directly using a sorted data structure
23:46:12FromGitter<mratsim> I’m far from an algorithm guru though
23:48:07*noeontheend quit (Ping timeout: 240 seconds)
23:49:25FromDiscord<moerm> Hello
23:51:50*stefanos82 quit (Remote host closed the connection)
23:54:53*a_b_m quit (Quit: Leaving)