<< 26-02-2020 >>

00:00:05*my_dude joined #nim
00:00:27*my_dude quit (Client Quit)
00:01:05*my_dude joined #nim
00:01:14*my_dude quit (Client Quit)
00:05:03*dadada joined #nim
00:05:27*dadada is now known as Guest92171
00:16:33*Hideki_ joined #nim
00:18:55*Guest92171 quit (Ping timeout: 260 seconds)
00:19:52*dadada_ joined #nim
00:33:43*dadada_ quit (Ping timeout: 255 seconds)
00:34:58*dadada joined #nim
00:35:21*dadada is now known as Guest95162
00:40:09*clyybber quit (Quit: WeeChat 2.7.1)
00:44:04*sz0 quit (Quit: Connection closed for inactivity)
00:44:16*Hideki_ quit (Remote host closed the connection)
00:45:01*Hideki_ joined #nim
00:47:40FromGitter<kaushalmodi> Rika: I have some notes on `do`: https://scripter.co/notes/nim/#do-notation
00:48:22FromGitter<kaushalmodi> .. and the sugar `=>` (what I call "lambda"): https://scripter.co/notes/nim/#lambda
00:48:32*Guest95162 quit (Ping timeout: 265 seconds)
00:49:31*Hideki_ quit (Ping timeout: 258 seconds)
00:50:01*dadada_ joined #nim
00:52:41*a_b_m quit (Read error: Connection reset by peer)
00:56:50*arecaceae quit (Remote host closed the connection)
00:57:14*arecaceae joined #nim
00:58:05*couven92 joined #nim
01:03:42*dadada_ quit (Ping timeout: 258 seconds)
01:05:01*dadada_ joined #nim
01:10:02*Hideki_ joined #nim
01:28:49*Hideki_ quit (Remote host closed the connection)
01:29:33*Hideki_ joined #nim
01:31:06*Hideki_ quit (Remote host closed the connection)
01:31:23*Hideki_ joined #nim
01:34:51*couven92 quit (Quit: Client Disconnecting)
01:46:16*Hideki_ quit (Remote host closed the connection)
01:47:07*Hideki_ joined #nim
01:47:10*Hideki_ quit (Remote host closed the connection)
01:47:11disruptekleorize[m]: fixed nimph with jester in 0.7.0.
01:47:44*Hideki_ joined #nim
01:52:26*Hideki_ quit (Ping timeout: 240 seconds)
02:07:45*chemist69 quit (Ping timeout: 240 seconds)
02:10:10*chemist69 joined #nim
02:20:45*Hideki_ joined #nim
02:31:06*dadada_ quit (Ping timeout: 258 seconds)
02:33:32*krux02 quit (Remote host closed the connection)
02:34:52*dadada joined #nim
02:35:16*dadada is now known as Guest71565
02:35:21*Hideki_ quit (Ping timeout: 265 seconds)
02:40:16*endragor joined #nim
02:44:02*Guest71565 quit (Ping timeout: 240 seconds)
02:49:52*dadada_ joined #nim
03:03:34*dadada_ quit (Ping timeout: 255 seconds)
03:04:58*dadada_ joined #nim
03:18:51*dadada_ quit (Ping timeout: 265 seconds)
03:19:53*dadada_ joined #nim
03:21:07*muffindrake quit (Ping timeout: 272 seconds)
03:22:46*muffindrake joined #nim
03:33:50*dadada_ quit (Ping timeout: 265 seconds)
03:33:54*rockcavera quit (Remote host closed the connection)
03:39:43*dadada joined #nim
03:40:07*dadada is now known as Guest45388
03:47:08FromDiscord<Elegant Beef> I've got to ask what's the point of the discord only channel in the discord server, no one talks in it 😄
03:48:27*Guest45388 quit (Ping timeout: 260 seconds)
03:50:02*dadada_ joined #nim
03:54:15*enthus1ast quit (Ping timeout: 252 seconds)
04:03:38*dadada_ quit (Ping timeout: 240 seconds)
04:04:26*dadada_ joined #nim
04:07:36*enthus1ast joined #nim
04:08:08FromGitter<Varriount> @sysint64 That's a neat website. What powers it?
04:23:40*theelous3 quit (Ping timeout: 255 seconds)
04:34:07*theelous3 joined #nim
04:38:45*theelous3 quit (Ping timeout: 258 seconds)
04:41:29*nsf joined #nim
05:15:54FromDiscord<Rika> do we have a tqdm counterpart? one that looks just as good
05:32:11*marmotini_ joined #nim
05:35:09skrylari don't think so; iterators don't really have a way to ask how long they will go
05:36:24skrylarmight be a way to finagle it with `when compiles` lines and trying to call len before running them :thinking:
06:02:05FromDiscord<Rika> Tqdm can't do iterators with no length either though
06:02:46FromDiscord<Rika> Only has the bar if there's a length function on the object or a custom length is set I think
06:18:02*dadada_ quit (Ping timeout: 258 seconds)
06:18:40*my_dude joined #nim
06:19:55*dadada joined #nim
06:20:20*dadada is now known as Guest30538
06:23:32*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:32:12*Hideki_ joined #nim
06:33:22*Guest30538 quit (Ping timeout: 258 seconds)
06:34:34*narimiran joined #nim
06:34:56*dadada_ joined #nim
06:36:52*Hideki_ quit (Ping timeout: 255 seconds)
06:38:30*chris2020[m] joined #nim
06:48:42*dadada_ quit (Ping timeout: 258 seconds)
06:50:02*dadada joined #nim
06:50:26*dadada is now known as Guest46119
06:57:54*my_dude quit (Quit: ZZZzzz…)
07:02:09*dddddd quit (Ping timeout: 272 seconds)
07:04:05*Guest46119 quit (Ping timeout: 265 seconds)
07:04:58*dadada_ joined #nim
07:18:55*dadada_ quit (Ping timeout: 260 seconds)
07:19:38*solitudesf joined #nim
07:19:58*dadada_ joined #nim
07:33:51*dadada_ quit (Ping timeout: 260 seconds)
07:34:53*dadada_ joined #nim
07:47:33*PMunch joined #nim
07:48:03*my_dude joined #nim
07:49:02*dadada_ quit (Ping timeout: 265 seconds)
07:49:58*dadada joined #nim
07:50:22*dadada is now known as Guest45492
07:53:59FromGitter<alehander92> clyybber "Where did you learn to speak german? "
07:54:02FromGitter<alehander92> hAHAHAHAH
07:54:22*NimBot joined #nim
07:54:30FromGitter<alehander92> just wondered if i left you with the impression that i speak it ok
07:55:08FromGitter<alehander92> i studied it many times, in school, from grandma, from duolingo, my uncle lived in berlin, i worked a bit in munich
07:55:35FromGitter<alehander92> but it always became just a "i can maybe talk with 10 year old about bananas"
07:57:31PMunchCould certainly come in handy one day
07:57:48FromDiscord<kodkuce> pedophile xD
08:00:00*gmpreussner quit (Quit: kthxbye)
08:02:52FromGitter<alehander92> oh a bad example...
08:03:03FromGitter<alehander92> with 20year old about haskell*
08:03:18FromGitter<alehander92> "ja viele Monaden ich bin mude"
08:03:43*Guest45492 quit (Ping timeout: 260 seconds)
08:03:59FromGitter<alehander92> PMunch dont get me working on my norgish
08:04:56*dadada_ joined #nim
08:05:31*gmpreussner joined #nim
08:09:10PMunchHaha, skjønner ikke hva du mener, norsk er jo kjempelett :)
08:11:56Zevvas a dutch guy I can do this fake german that germand love and find adorable. I have no clue, just mutate the words to make them sound german
08:12:10Zevvs/germand/germans/,
08:12:40Zevvthe always laugh at me very friendly and go "jah, jah"
08:13:06Zevvbut then, I still do not get my beer, nor can convey my personal feelings about bananas
08:13:31Zevvthey must be kind of stupid, these germans
08:14:16*Zevv puts up a friendly smile and waves eastwards
08:15:14skrylar@rika fiddled around a bit. the particular for x in tqdm() syntax is a bit harder to wrap since i don't think nim has iterator objects like delphi or python do
08:15:45skrylaryou can have a macro that makes wrapper iterators and then iterate those, or a macro that just replaces the loop with one that shims it
08:16:49skrylaror have a tqdm macro where the whole loop goes in that block
08:17:33*neceve joined #nim
08:18:47*dadada_ quit (Ping timeout: 258 seconds)
08:19:56*dadada_ joined #nim
08:20:28*skrylar quit (Remote host closed the connection)
08:33:44*dadada_ quit (Ping timeout: 258 seconds)
08:34:12FromDiscord<Rika> That's true
08:34:30*lbart quit (Ping timeout: 258 seconds)
08:34:55*dadada_ joined #nim
08:40:39*floppydh joined #nim
08:48:25*dadada_ quit (Ping timeout: 240 seconds)
08:49:53*dadada joined #nim
08:50:17*dadada is now known as Guest78543
08:53:11*lbart joined #nim
09:03:55*Guest78543 quit (Ping timeout: 260 seconds)
09:04:58*dadada_ joined #nim
09:08:18*zahary1 joined #nim
09:14:50*my_dude quit (Quit: ZZZzzz…)
09:18:51*dadada_ quit (Ping timeout: 260 seconds)
09:20:07*dadada_ joined #nim
09:33:43*dadada_ quit (Ping timeout: 255 seconds)
09:33:48*marmotini_ quit (Remote host closed the connection)
09:34:20*marmotini_ joined #nim
09:34:20*zahary1 quit (Quit: Leaving.)
09:34:57*dadada_ joined #nim
09:38:26*marmotini_ quit (Ping timeout: 240 seconds)
09:48:25*dadada_ quit (Ping timeout: 240 seconds)
09:49:17*zahary1 joined #nim
09:49:40*my_dude joined #nim
09:49:50*dadada joined #nim
09:50:03*marmotini_ joined #nim
09:50:15*dadada is now known as Guest84643
09:53:57FromGitter<alehander92> ich liebe Bananen, bitte schon, hast du eine Koffee und einen Kuchen?
09:54:19*my_dude quit (Ping timeout: 260 seconds)
09:55:03*marmotini_ quit (Ping timeout: 272 seconds)
09:55:20FromGitter<alehander92> zevv i doubt its very hard, i guess its like serbian/bulgarian: you guys *can* understand each other but it just sounds funny
10:01:09Zevvnah, it's just a bit more distant, but with only 2 years of german at school I'm able to pretty much follow the news and read "popular grade" novels
10:01:38Zevvwhile french, for example, still eludes me with everyting beyond "papa fume un pipe"
10:02:10*floppydh quit (Quit: WeeChat 2.7.1)
10:02:21ZevvMy wife is from switzerland. I tried for 15 years to make sense of how that family speaks, but I basically gave up on that.
10:03:04Zevvwow I just replaced al "quote do's" in my code with only "quotes". I feel like I've been lied to all of the time
10:03:05FromGitter<Vindaar> I can barely understand any dutch. sometimes I feel like I'm close to understanding stuff, but then I don't. But yes, if I had to communicate with a dutch person in Dutch <-> German we could make it work I guess.
10:03:30*floppydh joined #nim
10:03:49*Guest84643 quit (Ping timeout: 258 seconds)
10:04:22PMunchZevv, haha yeah french is tricky for us non-roman language speaking people :P
10:04:53*marmotini_ joined #nim
10:04:58*dadada_ joined #nim
10:05:09PMunchAnd yeah, I remember there were some reason to use quote do instead of just quote. But I can't remember what it was
10:05:16PMunchMight've been an edge case bug that has since been fixed
10:08:47Araqfor me Dutch is incomprehensible but then so are some dialects of German
10:09:32PMunchI understand some dutch from my year in Belgium
10:09:55PMunchAnd because some of it is really similar to Norwegian
10:10:41*zahary1 quit (Quit: Leaving.)
10:10:43PMunchTo the point where there have been comedy sketches made of Norwegian people calling to dutch hotels and booking a room just by putting on a fake dutch :P
10:11:19PMunchhttps://www.youtube.com/watch?v=vm7FNCD5dyU < like this
10:12:26PMunchDamn it, I'm not allowed to return different generics from the same procedure..
10:12:34PMunchEven if they are only compile-time fields
10:12:46narimiranDutch = English man pretending to speak German
10:12:51PMunchSlice[offset, length: static[int]] = distinct NimNode
10:13:05narimiranat least that's how it sounds for us non-germans, non-english, non-dutch people
10:19:03*dadada_ quit (Ping timeout: 260 seconds)
10:19:20FromGitter<alehander92> interesting
10:19:31FromGitter<alehander92> dutch sounds so throat-y
10:19:39FromGitter<alehander92> like, its easy to recognize
10:20:03*dadada_ joined #nim
10:20:10FromGitter<alehander92> italian/spanish seems a lot easier to me than french
10:20:28FromGitter<alehander92> iirc french people are supposed to skip a lot of originally latin written sounds
10:20:59*sz0 joined #nim
10:21:32PMunchItalian and Spanish are definitely more true to their writing
10:22:15PMunchThe French just seems a bit more laissez faire about their pronounciation :P
10:23:21FromDiscord<Rika> tfw all european languages
10:23:43FromDiscord<Rika> needs more asian/southamerican/african/*that other country that shall not be named*
10:23:49FromDiscord<Rika> country -> continent
10:23:58narimiranstraya?
10:24:09FromGitter<alehander92> RUSSIA
10:24:35narimiranPYCC(reverse N)A
10:26:35Araqis this becoming political? because if so, I need to silence all of you
10:26:37Araq:P
10:27:04Zevvnot yet, we are just taking our time to get there
10:27:44ZevvI am all morning trying to procrastinate myself out of my accounting. Easy choice there.
10:28:47PMunchI'm just trying to stay awake
10:28:53PMunchStarting to notice the jetlag now..
10:32:07narimiran(now i would make a german joke, but am afraid :P)
10:33:43*Hideki_ joined #nim
10:36:26FromGitter<alehander92> i am already at the office
10:36:31FromGitter<alehander92> but its already 12:36 here
10:36:51FromGitter<alehander92> araq censorship is futile, we all know пирожки
10:37:45*Hideki_ quit (Ping timeout: 240 seconds)
10:40:21narimiranpirožki?
10:40:28narimiranwhat does that mean?
10:40:50narimiran(btw, is that ž or š?)
10:41:43*clemens3 joined #nim
10:43:12lqdev[m]dumplings?
10:43:40lqdev[m]at least I think it means dumplings
10:44:26lqdev[m]given the context it's unlikely, though
10:45:05narimiranyeah, we have something pronounced similarly which you can buy in a bakery, but i don't get how it fits the given context
10:47:02*krux02 joined #nim
10:47:05lqdev[m]pierogi is a classic Polish meal, that's where *I* got my translation
10:47:30*zahary1 joined #nim
10:49:21*tribly quit (Quit: WeeChat 2.7)
10:50:10*tribly joined #nim
10:57:31*zahary1 quit (Quit: Leaving.)
10:58:38*zahary1 joined #nim
11:06:16FromGitter<gogolxdong> Anyone knows how to get keyboard and mouse event globally?
11:07:26Araqwhat do you mean, "globally"?
11:07:37Araqand what's the context, karax, Linux, Windows, SDL... ?
11:07:54FromGitter<gogolxdong> not only the terminal got focus.
11:08:01FromGitter<gogolxdong> windows
11:08:38*zahary1 quit (Quit: Leaving.)
11:09:32FromDiscord<Rika> feels like youre gonna need os specific calls
11:11:20FromGitter<gogolxdong> Do you mean MFC for Windows context?
11:11:50*zahary1 joined #nim
11:14:43FromDiscord<Rika> interesting, i have a query that works somewhere else but not when using nim's db_mysql
11:15:37*clemens3 quit (Quit: reboot)
11:15:50FromGitter<gogolxdong> tried kbhit from Windows <conio.h> and getch according what's from my web search. It gets the input of the focused Windows only.
11:17:39*abm joined #nim
11:21:27*fanta1 joined #nim
11:22:25*zahary1 quit (Quit: Leaving.)
11:24:39FromGitter<alehander92> narimiran lqdev[m] yes , its exactly that
11:24:59FromGitter<alehander92> sorry, yeah context was probably confusing
11:25:51*neceve quit (Ping timeout: 258 seconds)
11:27:22*clemens3 joined #nim
11:27:34*shadowbane quit (Ping timeout: 255 seconds)
11:28:33*shadowbane joined #nim
11:29:44Araqgogolxdong: forget about the conio.h legacy, you need to use the Win API directly
11:32:38Araqhttps://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey maybe
11:38:35*lritter joined #nim
11:40:01*luis_ joined #nim
11:40:19FromGitter<gogolxdong> got it checking, thanks :)
11:48:04FromGitter<gogolxdong> cannot use google is sad.
11:48:46FromDiscord<Rika> still having difficulty with a query to a mariadb server not working on nim but working elsewhere
11:50:51FromGitter<gogolxdong> I'm using mariadb, what's your issue?
11:54:24FromDiscord<Rika> says theres an error at the start of my query, i use a `DELIMITER $`
11:54:45FromDiscord<Rika> dunno why it's spitting an error when i'm using the same exact query in another program
12:01:25*Hideki_ joined #nim
12:01:30*luis_ quit (Ping timeout: 258 seconds)
12:07:06Araquse ? as the placeholder in SQL queries
12:07:52*tane joined #nim
12:13:05FromGitter<alehander92> guys `duration.nanoseconds`
12:13:13FromGitter<alehander92> is deprecated: but what should one use then
12:14:03narimiranhttps://nim-lang.github.io/Nim/times.html#inNanoseconds%2CDuration ?
12:14:15FromGitter<alehander92> hm, yeah
12:14:23FromGitter<alehander92> then we need to update the warning message
12:14:50FromGitter<alehander92> sorry for the nitpick
12:15:10narimiranok, then *we* can send the PR with the changes :P
12:18:42FromGitter<alehander92> i know :P
12:19:23FromDiscord<Rika> Araq, i already do, i should prolly provide more info
12:20:52FromDiscord<Rika> https://play.nim-lang.org/#ix=2cIz here's the query, and how it looks like when i use it (though db and guildId is missing)
12:22:47FromGitter<alehander92> let me just look through my other warning
12:23:23FromGitter<xflywind> query should split(";") ?
12:24:55*endragor quit (Remote host closed the connection)
12:25:32FromDiscord<Rika> xflywind, not guaranteed as sometimes delimiter can change
12:25:38FromDiscord<Rika> as in my example 😛
12:26:46PMunchYay, think I've found a compiler bug :)
12:26:58PMunch"SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
12:27:03PMunchAlways fun
12:27:36FromGitter<alehander92> so nim thinks i dont use sequtils in one file
12:27:37FromGitter<alehander92> but i do
12:27:52FromGitter<alehander92> but in a else of a `when` only
12:28:00FromGitter<alehander92> is this a known issue
12:28:24FromGitter<alehander92> yeah probably when i compile with the c backend it only checks the other branch..
12:28:47FromGitter<alehander92> so i move the import there ok
12:29:03FromGitter<alehander92> imports should be close to the when defined theirplatform, note taken
12:29:48FromGitter<xflywind> I remember function in db_* can only exec one query one time, can't use delimiter? @Rika
12:31:34FromDiscord<Rika> i need the if statement though
12:32:31Araqcould not load: libffi.so
12:34:37*marmotini_ quit (Remote host closed the connection)
12:34:56PMunchHmm, what was this error again? /nim/lib/system.nim(207, 11) Error: undeclared identifier: 'is'
12:35:10*marmotini_ joined #nim
12:35:14PMunchTrying to build a debug version of Nim to see if I can't find this bug
12:35:32Araqyour system.nim is too old
12:35:54PMunchOh, silly me, I was on the "master" branch and not on "devel"
12:36:24FromGitter<alehander92> ok guys my bug was
12:36:35FromGitter<alehander92> from `var breakpoint = (it needed await here ->) process.addBreak(location.path, location.line)`
12:36:51FromGitter<alehander92> i havent used the variable so i didnt realize i am not awaiting such a call
12:37:07FromGitter<alehander92> so basically i discard it , but for some reason the warnings cant detect
12:37:24FromGitter<alehander92> the variable isnt used: is it possible a pragma confuses it
12:39:05FromGitter<alehander92> ok just nvm, my config file is filled with hints off ignore that
12:40:16*nadavl joined #nim
12:40:21*marmotini_ quit (Ping timeout: 272 seconds)
12:42:33FromGitter<alehander92> ok, so my new problem is : i want hints:off, but only --hint[XDeclaredButNotUsed]:on
12:43:07nadavlIs it possible to have python
12:43:44narimirani haven't checked, it might be illegal depending on a country
12:43:50narimiranbut some smaller snake should be fine
12:43:59nadavlIs it possible to have a python UI with a nim backend (I am trying to make a simple irc client with a gui)
12:44:07nadavlnarimiran: lol
12:44:09FromGitter<alehander92> so probably --hint[Processing]:off is ok
12:44:18narimirannadavl: ;)
12:44:26FromGitter<alehander92> but stil actually XDeclaredButNotUsed should be a warning .. not a hint ..
12:44:56Araq*shrug*
12:45:38FromGitter<alehander92> i mean, it can lead to bugs, its even an *error* in go
12:45:45FromGitter<alehander92> which i admit is too radical but still
12:45:49FromGitter<alehander92> nadavl, why not directly do the ui in nim as well
12:47:28nadavlFromGitter: I know python teinter much better and ImGUI looks far too complicated. Also just having some python libraries is good
12:47:29FromGitternadavl, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
12:47:58nadavlE.g pytube, irc, turtle etc
12:48:50Araqalehander92: unused code is not a bug, the bugs can only be in used code :P
12:51:51FromGitter<alehander92> i agree, and we should add the nimempty tool :P
12:52:10FromGitter<alehander92> to empty files cleaning them up
12:52:32*fanta1 quit (Quit: fanta1)
12:52:57FromDiscord<Rika> unused code is only a "bug" when the code references a misspelled identifier
12:53:01FromGitter<alehander92> but unused vars are sometimes equivalent to discard, and discard asyncCall should be a bug :P https://github.com/nim-lang/Nim/issues/11912
12:53:02disbotAdd undiscardable pragma and forbid Futures from being discarded
12:53:08FromDiscord<Rika> and even then its not the unused code at fault
12:53:09FromDiscord<Rika> 😛
12:53:19nadavlHas anybody used the nim irc library
12:53:25nadavlHow was it to use?
12:53:37FromDiscord<Rika> i have, kinda, it's simple enough
12:53:48FromDiscord<Rika> do you have an issue or a painpoint
12:53:52*fanta1 joined #nim
12:53:52FromGitter<alehander92> Rika, not sure about that
12:55:12FromDiscord<Rika> i think it should be a warning but not an error
12:55:19FromDiscord<Rika> well, i dont remember what your stance was
12:57:08PMunchAh, here we go http://ix.io/2cIF
12:57:08nadavlRika, was it buggy at all?
12:57:55FromGitter<alehander92> rika agreed, the go guys make it an error, not me
13:01:39FromDiscord<Rika> nadavl, i didnt find any bugs from the short time i used it
13:01:46FromDiscord<Rika> Yardanico has more experience though
13:01:53*nadavl quit (Remote host closed the connection)
13:03:53*Hideki_ quit (Ping timeout: 252 seconds)
13:07:25*rockcavera joined #nim
13:12:18*Hideki_ joined #nim
13:14:37*m4r35n357 joined #nim
13:15:16PMunchHuh, the bug was caused by my use of static[string]
13:15:47*Hideki_ quit (Remote host closed the connection)
13:21:04*LER0ever joined #nim
13:24:22*tribly quit (Quit: WeeChat 2.7.1)
13:25:07*tribly joined #nim
13:26:25PMunchMinimal example that shows the crash: http://ix.io/2cII/nim
13:28:17*zahary1 joined #nim
13:30:15m4r35n357Can't find a way of doing variable length arrays (using size taken from a command line parameter) - have I missed any tricks?
13:31:06PMunchUse a sequence?
13:31:23PMunchThe array type in Nim is a compile-time fixed length thing
13:31:32PMunchSequences can grow and strink in size
13:31:44PMunchnewSeq[whatever type](the size you want)
13:32:05PMunchm4r35n357 ^
13:34:40m4r35n357PMunch, looking for something in between really, they don't need to change size once defined, just need to be definable ove a range of sizes 2 -> potentially hundreds
13:35:08m4r35n357I've just looked through the manual, but I thought I would check here too
13:35:26FromGitter<kaushalmodi> the devel CI has been failing for a while.. the error in last failure is only on BSD, it seems: https://builds.sr.ht/~araq/job/158653#task-test-852
13:35:46FromGitter<kaushalmodi> in tioselectors.nim
13:36:27m4r35n357PMunch, I already have working c and Python implementations of the algorithm, but nim sounded interesting . . .
13:36:29FromGitter<kaushalmodi> The side-effect of the CI failing is that https://nim-lang.github.io/ hasn't updated since the last CI pass
13:36:45FromGitter<kaushalmodi> /cc @narimiran @Araq ^
13:36:53PMunchWell m4r35n357 a sequence is fine for that. It's just a memory region with two integers holding capacity and size, so they have very little overhead.
13:37:35m4r35n357PMunch, OK I shall invetigate, thanks!
13:37:37PMunchYou could of course also manually allocate a chunk of memory if you wanted
13:37:57PMunchBut that's not very Nim-ian?
13:38:04PMunchs/?//
13:38:48*zahary1 quit (Quit: Leaving.)
13:39:21PMunchYou need to store the size somewhere anyways, so the only real overhead is storing an integer for the capacity of the structure
13:39:22*Hideki_ joined #nim
13:41:21narimiran@kaushalmodi "Made with Nim. Generated: 2020-02-26 13:02:42 UTC"
13:41:34narimiranso, https://nim-lang.github.io/Nim/lib.html was updated half an hour ago
13:41:53m4r35n357PMunch, looks like I can initialize to specified size and pass to open array parameters, is that what you meant?
13:42:00m4r35n357trying anyway! . . . .
13:43:01PMunchUhm, not quite sure what you're asking here..
13:43:12narimiran...but the answer is: use seq :)
13:43:25PMunchopenarray is just a type that can take both arrays and sequences (and possibly something else?)
13:43:47PMunchHmm, is there no way to get the capacity of a sequence without casting it to something?
13:45:38FromGitter<kaushalmodi> narimiran: hmm.. yesterday I was looking at something and the website wasn't updated..
13:46:01*luis_ joined #nim
13:46:06m4r35n357I don't actually need to know that, paradoxically! I always loop over a known subset, not the whold thing.
13:47:26PMunchOh yeah, I was just wondering
13:47:48PMunchI wanted to check that newSeq created a sequence that had both size and capacity set to the given size
13:48:02PMunchAnd not setting the capacity to the closest power of 2 or something
13:50:01*zahary1 joined #nim
14:01:19m4r35n357One more thing, is there a drop-in replacement for Python's reversed() function for lists?
14:01:44m4r35n357Digging through library docs, going down rabbit holes
14:02:14FromGitter<sheerluck> @m4r35n357 `for key in to_seq(data.keys).sorted.reversed:`
14:02:52m4r35n357FromDiscord, cheers!
14:03:49m4r35n357FromGitter, cheers!
14:03:50FromGitterm4r35n357, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
14:04:01m4r35n357FromDiscord, pardon me!
14:04:22narimiranlol
14:04:36narimiranboth of those are bots, you know that, m4r35n357, right?
14:04:44m4r35n357nope, first day here!
14:05:18narimiranthe name inside of < > is the real user
14:05:34narimiranso you probably wanted to thank @sheerluck
14:05:51FromGitter<sheerluck> I am not real ⏎ I am integer
14:06:26PMunch>_<
14:06:30FromDiscord<clyybber> then you /are/ real :p
14:06:52narimiran3+4i is not real
14:06:55FromGitter<sheerluck> May be I am too complex for you
14:07:12*m4r35n357 is busy being productive!
14:07:41FromDiscord<clyybber> narimiran: We are merely real projections of our higher dimensional existance
14:08:02narimiran2intense4me
14:08:07*luis_ quit (Ping timeout: 240 seconds)
14:08:13*Hideki_ quit (Remote host closed the connection)
14:08:47FromDiscord<clyybber> 2intense+4i
14:08:49Araqfun fact: there are uncountably many "real" numbers
14:08:58*Hideki_ joined #nim
14:09:05Araqalmost all real numbers cannot be named or written down.
14:09:16Araqquite unreal these "real" numbers.
14:09:28FromGitter<alehander92> REAL MADRID
14:09:39FromDiscord<clyybber> they are countable if your counting scheme is two dimensional
14:09:50PMunchUnlike that god damned fake Madrid..
14:09:51FromDiscord<clyybber> but that doesn't count as counting
14:09:52FromGitter<alehander92> not even a fan, just wanted to join the pun thing
14:09:55FromDiscord<clyybber> said the accountant
14:10:11PMunchOr maybe it should be Complex Madrid :P
14:10:12Araqno, two dimensional doesn't cut it either
14:10:19FromDiscord<clyybber> right
14:10:23PMunchI mean you can name all the numbers
14:10:25FromDiscord<clyybber> should be countably-dimensional
14:10:27FromGitter<alehander92> no PMunch, blessed madrid :)
14:10:31PMunchJust call them all bob or something
14:10:44FromGitter<alehander92> i have to visit there .. barcelona was so good
14:10:53FromDiscord<clyybber> if you count one countable-amount of them at a time
14:11:01FromGitter<alehander92> disruptek suddenly i am into testing again
14:11:02FromDiscord<clyybber> the set of those counts is countable
14:11:04PMunchBarcelona is nice
14:11:13FromGitter<alehander92> what were you telling about parallel testing?
14:11:31narimiranwhat a bunch of geeks :D
14:11:32FromDiscord<clyybber> alehander92: Yesterday you were testing my speakers, today what?
14:13:19*Hideki_ quit (Ping timeout: 260 seconds)
14:13:27FromGitter<mratsim> @lqdev, spawn/sync is probably faster in Weave than any other frameworks that are used in production
14:13:44FromGitter<alehander92> clyybber today we test your eyes
14:13:47FromGitter<alehander92> with my text
14:13:53PMunchmratsim, wait really?
14:14:01FromGitter<alehander92> 1 2 3 z n m 7 4 1
14:14:03FromDiscord<clyybber> alehander92: Nice!
14:14:11FromGitter<mratsim> @PMunch yes
14:14:32FromGitter<alehander92> and we also property test
14:15:01FromGitter<alehander92> but first fix our warning mess
14:15:03FromGitter<mratsim> Note that Weave optimizes for throughput not for latency. You might want to read this for an overview of the difference: https://github.com/mratsim/weave/issues/88
14:15:04disbotLatency-optimized / job priorities / soft real-time parallel scheduling
14:15:11FromGitter<alehander92> i really want to see nim core team comitting in rhyme
14:15:26narimiranuuu, nice idea @alehander92
14:16:31narimiran"fixes #13192", "and this fixes #13554 too"
14:16:48FromGitter<alehander92> "today we fix an arc bug, we can now have a "memory" mug" ⏎ "regression is stopped closing #3 i just want to know if this address is free"
14:17:18FromGitter<alehander92> yeah, a bit more shakespeare and were there
14:17:21FromDiscord<clyybber> improve performance by 2.4X
14:17:26FromDiscord<clyybber> sorry to disrupt the flow
14:17:29narimiran"fixed bug in arc, patch submitted by Mark"
14:18:22FromGitter<alehander92> who was mark? thats a long story, but wait for our CI , this wont be boring.. mark was a fine lad started with haskell, but one day he thought i need more pascal..
14:18:46FromGitter<sheerluck> ok, what english word rhymes with `Endomorphism`?
14:18:48FromDiscord<clyybber> hits the mark
14:18:57narimiranschism?
14:18:58*dddddd joined #nim
14:19:01FromDiscord<clyybber> sheerluck: Every morphism?
14:19:09FromDiscord<clyybber> Omnimorphism
14:19:19FromDiscord<mratsim> isomorphism
14:19:21FromGitter<alehander92> endomorphism .. say no to communism
14:19:24narimiranor easier: put something after that word
14:19:40FromGitter<alehander92> always easy to put a political slogan
14:19:40narimiranendomorphism fix, now in da mixx
14:19:49FromDiscord<clyybber> alehander92: s/no/yes ?
14:20:51FromGitter<alehander92> i was a leftie when i was 20, now i am just "donald knuth for president?"
14:21:05FromGitter<alehander92> 25*
14:21:06narimiranthat doesn't rhyme :/
14:21:10FromDiscord<clyybber> donald knuth for president sounds reasonable
14:21:18FromGitter<alehander92> yeah but it just makes sense
14:21:46FromGitter<alehander92> he is the bernie of algorithms and he can carry great red-black trees vote
14:22:13narimiran(let's keep this politics-free)
14:22:20krux02isn't it a bit early to talk about election?
14:22:47narimiranit's past 4pm where alehander92 lives, not too early :P
14:22:51krux02narimiran, you have something better to talk about?
14:23:04krux02I not talking baout daytime
14:23:31narimiran(that. was. the. joke.)
14:23:33krux02I looked up the election in the USA, it is scheduled for november
14:24:15FromGitter<alehander92> but the primaries are now, and they are the most interesting part :P
14:24:27krux02There is a good South Park episode on Presidential election in the USA. Pretty accurate and every time the same.
14:25:06krux02well I live in germany, I don't even know what "primaries" are.
14:26:23*marmotini_ joined #nim
14:26:59FromGitter<alehander92> yeah, basically they're like , imagine a nim guy vs Walter Bright for president, but first Araq has to beat all of us to be the nim guy
14:27:37krux02"Walter Bright" don't you mean "Walter White"
14:27:43FromGitter<alehander92> and we're like "i promise 50 free helpers in system.nim for everyone"
14:28:12krux02lol
14:28:13FromGitter<sheerluck> @krux02 Do people watch anime in germany legally? I just download torrent. Do you get arrested in germany for torrents?
14:28:18FromGitter<alehander92> the similarity in their names is uncanny :O
14:28:27FromDiscord<clyybber> sheerluck: Nah
14:28:30krux02well torrents are a dangerous thing.
14:28:37FromDiscord<clyybber> not really
14:28:51FromDiscord<clyybber> the situation changed recently
14:28:52krux02you get tracked and you will get sued for distributing copyrighted content.
14:29:07FromGitter<alehander92> you get letters, right?
14:29:10FromDiscord<clyybber> ISPs arent obliged anymore to forward those letters
14:29:14krux02letters yes
14:29:22FromDiscord<clyybber> uploading is tricky
14:29:32FromDiscord<clyybber> but downloading and streaming.. nobody cares
14:29:47krux02well what I don't like about this is, youtube is OK to distribute copyrighted content.
14:29:48FromDiscord<clyybber> just be careful with vodafone and the like
14:29:57FromDiscord<clyybber> they are shitheads
14:29:58krux02There are tons of people out there who upload copyrighted content.
14:30:03FromDiscord<clyybber> and they dns blocked kinox
14:30:06FromDiscord<clyybber> and some other sites
14:30:11krux02But youtube says, nah you can't sue us.
14:30:17Araqclyybber: my araq-operate-on now has the new dup/with macros
14:30:18FromDiscord<clyybber> krux02: Money rules
14:30:50FromGitter<alehander92> they are supposed to have huge content-detecting systems
14:31:03PMunchWhat does an elif in a case statement do?
14:31:05FromGitter<alehander92> which are abused often indeed
14:31:08*nadavl joined #nim
14:31:27krux02If I could make the rule, I would make youtube resposible for everything that you can watch on that platform. Especially if it generates money for Google in ad revenues.
14:31:29FromGitter<alehander92> the problem is that this makes it hard for a new youtube contender to appear
14:31:36FromDiscord<clyybber> Araq: Oh, nice!
14:31:54FromDiscord<clyybber> PMunch: What its supposed to do
14:31:58FromDiscord<clyybber> its like an if in an else
14:32:07krux02The oly exception would be, when people sign up with their real and verifiend identity and and take over the resposibility.
14:32:09FromGitter<alehander92> Araq immediately answered to the election attacks, he is ready for South Carolina
14:32:27m4r35n357how to specify reversed iteration range? nim does not like 'for i in len(j)-1..-1:' (Error: undeclared identifier: '..-')
14:32:28PMunchSo it's basically a way to combine an if with a case?
14:32:34FromDiscord<clyybber> Yep
14:32:50FromGitter<alehander92> m4r.. countdown
14:32:53Zevveuh what. do you have an example of that?
14:32:54PMunchm4r35n357, for i in countdown(j.len - 1, s1)
14:33:35FromDiscord<clyybber> Araq: WDYT about a compiler change so that `echo o.dup: ...` will work?
14:33:37m4r35n357PMunch, thanks again, haven't seen that one before
14:33:57m4r35n357PMunch, what is s1 ?
14:34:00krux02alehander92: I think this hole copyright claiming mechanism on youtube is shit. Youtube plays to the the law, and they do a shitty job. But youtube isn't the law.
14:34:00*endragor joined #nim
14:34:14m4r35n357does the s stand for somethin obvious?
14:34:21PMunchZevv, https://play.nim-lang.org/#ix=2cJ1
14:34:23krux02When somebody what to claim copyright, should should do it the legal way, by letter and all that stuff.
14:34:30narimiranm4r35n357: it's a typo, use 0
14:34:37ZevvPMunch: well isn't that funky indeed
14:34:40FromDiscord<clyybber> krux02: The reality is. Big global corporations don't have to give a shit about the law
14:34:41krux02anyway, I calm down now and talk about Nim
14:34:50Araqclyybber: requires an RFC and an investigation
14:34:50PMunchm4r35n357, a typo :P It was meant to be -1 but I missed the -
14:34:54m4r35n357narimiran, you mean 01 ?
14:35:12FromDiscord<clyybber> Araq: I agree. I think its a blocker for dup tho
14:35:17m4r35n357OK I think I want -1
14:35:29Araqit isn't, I have the tests green
14:35:37PMunchIt's inclusive, so that would include -1 in your iteration
14:35:37narimiranm4r35n357: note that ranges in nim are inclusive, so python's `for i in range(len(s)-1, -1)` is in nim `for i in countdown(s.high, 0)` (s.high = s.len - 1)
14:35:38*shadowbane quit (Quit: Konversation terminated!)
14:35:42PMunchWhich might be what you want :P
14:35:45Araqx.dup(insert(10), sort, filterBy(f)) it works fine
14:35:49FromDiscord<clyybber> Araq: Ok, but people will try to use it with echo and it will fail
14:35:53FromDiscord<clyybber> the block syntax I mean
14:35:59*nadavl quit (Ping timeout: 258 seconds)
14:36:16PMunchWhat's the difference between a nnkElse and nnkElseExpr?
14:36:25Araqit doesn't *block* the PR by any means
14:36:29FromDiscord<clyybber> yeah
14:36:36FromDiscord<clyybber> PMunch: Nothing really
14:36:37m4r35n357narimiran, OK now I the right answer
14:36:44m4r35n357phew
14:36:48FromDiscord<clyybber> PMunch: legacy
14:36:52PMunchAh..
14:36:57AraqI agree it's a weird gotcha we should investigage
14:36:58*FromGitter quit (Ping timeout: 245 seconds)
14:36:59*shadowbane joined #nim
14:36:59Araq*gate
14:37:32Araqbut it doesn't block us, and the examples can use 'do:' to get people on the right track
14:37:45Araqright now my docs are slim and don't even mention the supported block syntax
14:38:13FromDiscord<clyybber> Oh okay
14:38:18AraqI'm not sure 'with' needs the varargs and 'dup' needs the block syntax, maybe it's just a pointless consistency
14:38:35*codetracer joined #nim
14:38:49codetracerguys , is there a {.hints:off.}:
14:38:51codetracer pragma?
14:38:52Araq'dup' returns a value so it's expression based whereas 'with' returns 'void' and looks much better with a code block
14:39:15FromDiscord<clyybber> Eh
14:39:20FromDiscord<clyybber> I think both should support both
14:39:28FromDiscord<clyybber> we have block expressions too
14:39:28Araqthat's what the RFC says
14:39:44Araqbut I now disagree. However I did implement the RFC as it is
14:39:53Araqnow back to ARC
14:40:24*codetracer left #nim (#nim)
14:40:57Araqcodetracer could have been slightly more patient
14:42:12*shadowbane quit (Remote host closed the connection)
14:42:13*alehander42 joined #nim
14:42:18alehander42what i want is to fix the
14:42:39PMunchHmm, curious. `repr` displays Else and ElseExpr differently
14:42:55alehander42many hints about T not used in `WithFilter*[T] = concept a .. a.fil is FilterMixin[T] `
14:43:24Araqbe my guest :-)
14:44:42*shadowbane joined #nim
14:45:01*shadowbane quit (Remote host closed the connection)
14:45:16*Hideki_ joined #nim
14:45:33alehander42so is there an easy way to just turn off hints for a snippet of code :)
14:46:20alehander42i guess i can rfc such a pragma
14:46:27narimiran{.push hints: off.}
14:46:59m4r35n357narimiran, yes found that by trial and error, cheers! now I have a working Horner's method function, which is a nice little test case for "new" languages
14:47:19*shadowbane joined #nim
14:47:43*shadowbane quit (Remote host closed the connection)
14:48:02PMunchDamn it, Nim isn't able to tell the difference between [newLit(100)] and newLit[100]
14:48:09PMunchErr newLit(100)
14:48:29narimiranm4r35n357: great to hear that you've succeeded! but i would highly recommend you to quickly go through some of the tutorials, just to make you more familiar with nim. yeah, we managed to answer some of your questions, but who knows what low hanging fruits are still there :)
14:48:41PMunchI tried to have an overloaded template, one that takes NimNode, and one that takes openarray[NimNode]
14:49:03*shadowbane joined #nim
14:49:20narimiranm4r35n357: especially if you plan to compare nim solution to those you have in other languages
14:49:25m4r35n357narimiran, I will. my problems are mostly numerical, so it is normal for language examples not to give me a great start ;)
14:49:29*shadowbane quit (Client Quit)
14:49:56m4r35n357nim is two lines shorter than Python version owing to default return value
14:50:03narimiranm4r35n357: my were too when i discovered nim, and i just blindly translated my python code to nim. it was a disaster :D
14:50:10PMunchIs ElifExpra nd ElifBranch also the same?
14:51:19*shadowbane joined #nim
14:55:24AraqPMunch, kind of
14:55:26*nsf quit (Quit: WeeChat 2.7)
14:55:39Araqthere is nkIfStmt vs nkIfExpr and the rest follows from there
14:55:56PMunchWait what?
14:56:33*nadavl joined #nim
14:57:49*nadavl quit (Client Quit)
15:01:52FromDiscord<clyybber> Araq: You had a branch where we could change the mapping right? So that we can get rid of those Expr/Stmt nodes
15:02:28*endragor quit (Remote host closed the connection)
15:02:30*PMunch quit (Quit: Leaving)
15:02:35Araqyeah but it has a very bad effort vs benefit tradeoff
15:02:48FromDiscord<clyybber> well the benefit has delay here
15:03:05FromDiscord<clyybber> couldn't we change macros.nim ?
15:03:11AraqI'd rather play with alternative IRs and then provide NimNode -> IR and IR -> NimNode operations
15:03:54FromDiscord<clyybber> Eh?
15:04:05FromDiscord<clyybber> You mean internally in the compiler?
15:04:50*endragor joined #nim
15:04:53Araqwell a good IR is good for compilers and macro systems
15:05:09disruptekthat would be huge.
15:05:23*Hideki_ quit (Ping timeout: 272 seconds)
15:05:39FromDiscord<clyybber> Eh, I dunno
15:05:50FromDiscord<clyybber> AST is pretty universal
15:05:51FromDiscord<clyybber> IMO
15:06:06disruptekbut we can't get it in and out 1:1.
15:06:19FromDiscord<clyybber> What?
15:06:37Araqthe AST already works well and unifying nkIfStmt and nkIfExpr is lots of work for very little benefit
15:07:11FromDiscord<clyybber> The practical benefit is not that big, I agree
15:07:26FromDiscord<clyybber> but its just a cleanup that feels like it /should/ have long be done
15:07:59FromDiscord<clyybber> unneccessary is the right word
15:08:13FromDiscord<clyybber> removing unneccessary stuff is never that big of a benefit
15:08:21FromDiscord<clyybber> but its still a good thing to do
15:08:45Araqnot if it implies regressions or code breakage
15:08:50FromDiscord<clyybber> yeah
15:08:51*dwdv joined #nim
15:09:08Araqknown successful languages without cruft: {}
15:10:25*endragor quit (Remote host closed the connection)
15:11:21taneAraq, C?
15:11:50AraqC: 'volatile' part of the type system (why? just provide volatileLoad/Store)
15:12:14Araqno less than 4 ways of writing 'inc', i += 1, ++i, i++, i = i + 1
15:13:14Araqstructs can have ': bits' annotations which is against the language's nature of doing imperatively what others do declaratively (in other words, there is already | & ~ to implement the same)
15:14:58Araqplus the bizzare 'struct X' vs 'typedef struct X' scoping decisions
15:15:17tanewell, structs have their own namespace, which is an ok decision
15:15:43Araqit was never copied to any other language out there.
15:15:54Araqthat means the decision is not 'ok', it's weird crap.
15:15:54Zevvno matter how much badmouthing you will do, you will never ever diminish my love and devotion to the C language
15:16:04taneon the increment/decrement operators I fully agree though, using i++/++i in other expressions is just careless :)
15:17:27AraqZevv, I don't care, you are allowed to like C.
15:17:42Zevvnah you are no fun
15:18:36alehander42i think the type/macro systems of C can be more powerful/flexible with the same amount of stuff in there
15:18:50alehander42otherwise C does seem as a good lang
15:20:28alehander42about good IR, i still think ast(typed) / cfg seem enough for most cases, but i wonder if i misunderstand the nanopass people somehow
15:20:41alehander42{.push hints: off.}
15:21:50alehander42narimiran: does that work now?^
15:22:01narimiranalehander42: system.nim uses it
15:24:46alehander42thanks, it seems as a great fit, but it just doesnt make the hint disappear for my case
15:24:58alehander42probably some kind of edge case in hint handling
15:32:02*marmotini_ quit (Remote host closed the connection)
15:32:38*marmotini_ joined #nim
15:34:31*rockcavera quit (Remote host closed the connection)
15:34:34*ptdel joined #nim
15:36:52Araqhmm Clyybber, nkStmtList doesn't introduce a scope
15:37:19Araqno wonder my branch breaks code
15:37:19*marmotini_ quit (Ping timeout: 260 seconds)
15:37:56*luis_ joined #nim
15:39:22disruptek#12945
15:39:24disbothttps://github.com/nim-lang/Nim/issues/12945 -- 5mutable iterator cannot yield named tuples ; snippet at 12https://play.nim-lang.org/#ix=25VT
15:39:57*floppydh quit (Quit: WeeChat 2.7.1)
15:40:15disruptekthis is not fixed.
15:44:11Araqaccording to cooldome, it is
15:44:26disruptek#13510
15:44:28disbothttps://github.com/nim-lang/Nim/issues/13510 -- 3mutable iteration over mutable type produces a codegen error ; snippet at 12https://play.nim-lang.org/#ix=2cJp
15:45:05lqdev[m]I need some help debugging a segv without a stack traceback available. I assume this might be stack corruption or something. running valgrind on my code, I get this error at the time of the segv http://ix.io/2cJn digging a bit further, this is the line that causes the segfault: https://github.com/liquid600pgm/rdgui/blob/master/src/rdgui/control.nim#L91 basically it's a call to a proc stored in an object. problem is, *as far as
15:45:05lqdev[m]I can tell*, the proc is not nil, but attempting to access my object in any way terminates the whole process, so I can't even `echo obj.repr` to check if the object is initialized properly
15:45:53lqdev[m]well actually, accessing the object's fields works fine afaict
15:45:59disruptekso check if the field is nil.
15:46:13lqdev[m]it's not
15:46:16lqdev[m]I can `echo obj.renderer.repr` and it's not nil
15:46:26disruptekit does some nil-fu, then.
15:46:35lqdev[m]seems like it.
15:46:39lqdev[m]probably something with closures.
15:47:27lqdev[m]oh wait, *now* `echo obj.renderer.repr` doesn't work!!
15:47:31lqdev[m]this is nuts
15:47:45disruptekassume nothing!
15:47:52*disruptek aiiiiieeeee!
15:49:25lqdev[m]like, attempting to do `obj == nil` yields in a segv, `obj.isNil` returns false
15:49:54alehander42huh
15:50:06Araquse -d:useMalloc --gc:arc with valgrind
15:50:18Araqor set a watchpoint inside GDB
15:50:37lqdev[m]if only I could use latest devel I'd try, but I can't
15:50:40lqdev[m]because nimterop is broken
15:50:52lqdev[m]because regex is broken
15:50:53disruptekunlikely!
15:50:58alehander42yes, run it under gdb, or even rr with gdb to be able to go back to the watchpoint previous change
15:51:13lqdev[m]it crashes on startup in gdb
15:51:18lqdev[m]somewhere in libgc
15:51:21alehander42huh
15:51:32alehander42are you using linux or osx
15:52:10lqdev[m]linux
15:52:24alehander42let me try
15:52:27lqdev[m]default gc doesn't even yield a segv, it just shuts the program down with an exit code
15:52:43disrupteksome programs shouldn't even be allowed to run.
15:52:50lqdev[m]alehander42: https://github.com/liquid600pgm/nadio `nim c -r src/nadio/nadio`
15:52:52disrupteksome programs shouldn't even be allowed to segv.
15:53:49lqdev[m]this is where the offending object is created https://github.com/liquid600pgm/nadio/blob/master/src/nadio/gui/node_editor.nim#L437
15:54:09lqdev[m]and this is where the offending object is initialized https://github.com/liquid600pgm/nadio/blob/master/src/nadio/gui/context_menu.nim#L43
15:56:02lqdev[m]alehander42: to crash it, right click somewhere in the node editor
15:57:25lqdev[m]http://ix.io/2cJw here's the stacktrace from gdb, using default gc
16:00:53FromDiscord<clyybber> Araq: Oh, yeah I noticed that too when implementing dup
16:00:54alehander42ok!
16:01:52lqdev[m]oh, forgot to mention if you're getting a build error, use `nimble install` or `nimble develop` in the program's dir
16:02:11alehander42no problem!
16:08:10lqdev[m]oh shit, I think I found the offender (?)
16:09:41lqdev[m]changing Option[ContextMenu] to ContextMenu here https://github.com/liquid600pgm/nadio/blob/master/src/nadio/gui/context_menu.nim#L14 stopped the segfaults
16:10:24lqdev[m]it's not that bad, since ContextMenu can be nil
16:10:52lqdev[m]but I'm wondering why'd an Option with a ref object cause a crash
16:11:06alehander42interesting yeah
16:11:18*theelous3 joined #nim
16:12:04Araqthat was changed in nim devel
16:12:07Araqiirc
16:12:17Araqso that Option[proc] does something better
16:13:01lqdev[m]but here it's Option[ref]
16:15:43lqdev[m]and it causes a segfault where it shouldn't
16:16:53*luis_ quit (Quit: luis_)
16:18:41*marmotini_ joined #nim
16:20:26*alehander42 quit (Ping timeout: 240 seconds)
16:24:20*luis_ joined #nim
16:33:48*zahary1 quit (Quit: Leaving.)
16:39:19*luis_ quit (Quit: luis_)
16:39:42*luis_ joined #nim
16:40:58luis_Hi everyone, I am stuck with the error:
16:42:15luis_In the section
16:42:57*luis_ quit (Client Quit)
16:44:16*LER0ever quit (Remote host closed the connection)
16:45:55*luis__ joined #nim
16:46:13luis__https://i.imgur.com/9rP9fex.png
16:46:39luis__https://i.imgur.com/bT7lpY4.png
16:47:17narimiranuse `$i`
16:47:23luis__thanks
16:47:30narimiranand don't do `var result` on your line 7
16:47:52luis__thanks
16:48:00luis__is $i a way to type cast?
16:48:05*LER0ever joined #nim
16:48:14narimiran`$` is to convert things to string
17:01:44*clyybber joined #nim
17:04:03luis__this solved, thanks
17:04:13luis__how do I cast an int to a float?
17:04:30clyybbercast[float](someInt)
17:04:36narimiranyou probably want to *convert* it, not cast it
17:04:43narimiranfloat(someint)
17:06:10narimiranbut the best recommendation would be https://nim-lang.org/learn.html before diving any deeper
17:06:12luis__just found out that I can use variable.float
17:06:17luis__for casting
17:06:20luis__easy
17:06:25narimiranfor *converting*!!
17:10:06luis__thanks, will look it up
17:12:33*rockcavera joined #nim
17:13:51*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
17:17:33*icebattle joined #nim
17:20:17*zahary1 joined #nim
17:20:28*LER0ever quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:21:50*zahary1 quit (Client Quit)
17:21:57*nsf joined #nim
17:22:05*zahary1 joined #nim
17:24:08*drewr joined #nim
17:26:34*zahary1 quit (Ping timeout: 258 seconds)
17:32:10*luis__ quit (Quit: luis__)
17:33:59*icebattle quit (Ping timeout: 260 seconds)
17:35:54*Trustable joined #nim
17:36:05m4r35n357trying to convert a command line parameter to float64, but let h = float64(params[2]) does not work, same for let n - int(params[1)
17:36:17m4r35n357test.nim(6, 12) Error: type mismatch: got (TaintedString) but expected 'int'
17:36:45m4r35n357what is tthe right way to do this (yes I am looking at Nim bt Example and the nim & library manual)
17:37:10Zevvyou need to parse the string into a float
17:37:22ZevvparseFloat()
17:37:37m4r35n357ah OK, another new one on me . . . ;)
17:37:39m4r35n357thanks
17:42:07*Kaivo joined #nim
17:46:17m4r35n357I am now using parseInt(params[1], n, 0), but not using the return value, and getting: Error: expression 'parseInt(params[1], n, 0)' is of type 'int' and has to be discarded
17:46:32m4r35n357do I have to consume the return value?
17:46:44Zevvor discard it :)
17:46:50clyybbereh
17:47:08clyybberyou should assign it
17:47:13clyybberit returns the parsed value
17:47:52m4r35n357Result is the number of processed chars or 0 if there is no integer
17:48:04m4r35n357the parsed value is a parameter
17:48:40m4r35n357https://nim-lang.org/docs/parseutils.html#parseInt%2Cstring%2Cint%2Cint
17:49:09*muffindrake quit (Quit: muffindrake)
17:49:09clyybberoh, yeah sorry
17:49:19m4r35n357Zevv, I am already discarding it, but I get the error in my question
17:49:22*muffindrake joined #nim
17:49:35m4r35n357I don't full understand what the error message means
17:49:43clyybberI thought you'd be using strutils.parseInt
17:50:26m4r35n357I am doing what the docs say, i think!
17:50:40clyybberm4r35n357: In nim you have to discard explicitly
17:50:48clyybberdiscard parseInt(...)
17:51:05clyybberBut really, just use strutils.parseInt if you don't need that extra stuff
17:51:06m4r35n357so declare a dummy var of each type that I want to parse . . . ?
17:51:22clyybberm4r35n357: Use strutils.parseInt :)
17:51:35m4r35n357OK I didn't know about the alternative, I was just searching the docs, I will try strutils
17:51:48m4r35n357parseutils sounded right
17:51:51*fanta1 quit (Quit: fanta1)
17:52:25*clemens3 quit (Ping timeout: 240 seconds)
17:52:47Zevvyeah, another victim of the stdlib. parseutils is kind of "advanced" use, you should probably not need that in most cases
17:54:56m4r35n357Zevv, yep thanks working now as I expected it to!
18:11:26leorizeAraq: it appears to me that ormin was trying to prep the statement once and once only
18:11:45leorizebut then it tried to use `{.global.}`, which requires the db to be opened before the program runs
18:13:26leorizeshould I keep the "optimization" by using the `once:` template or just get rid of `{.global.}`?
18:42:10*clemens3 joined #nim
18:45:00disruptekhow could you get rid of .global. for once:?
18:45:09disruptekany stream requests?
18:47:51solitudesfstream explanation of why cant i compile nimph/gittyup
18:48:20disruptekcan try to repro if you want.
18:48:59disruptekwhich version?
18:49:38solitudesflatest, using bootstrap.sh
18:49:49solitudesfhttp://ix.io/2cKK
18:50:35leorizedisruptek: here's the current code: var `gensym-ed` {.global.} = prepareStmt(db, stmt)
18:51:01leorizethe thing is that db might not yet be opened by the time prepareStmt runs
18:51:10leorizeso I can fix this by either removing {.global.}
18:51:41leorizeor var `gensym-ed`: PStmt; once: `gensym-ed` = prepareStmt
18:52:06disruptekhttps://twitch.tv/disruptek
18:52:15disrupteksolitudesf: your issue is that your libgit2 is too old.
18:52:30disruptek0.99 is a pre-release for 1.0, which is due Real Soon.
18:52:43disruptek#master is the branch we support in gittyup.
18:53:27*lvmbdv joined #nim
19:02:06*Hideki_ joined #nim
19:06:37*Hideki_ quit (Ping timeout: 258 seconds)
19:17:04*hax-scramper joined #nim
19:20:57disruptekpairs is not working on my table on devel but it works on 1.0.6.
19:21:19leorizenew regression then
19:21:20disrupteki think maybe values() is only broken on, like, cpp with arc?
19:21:40disruptekpairs is producing an empty key where none is expected.
19:22:54Araqit's a new regression, fix is in a PR
19:23:00disrupteksweet, thanks.
19:33:21*natrys joined #nim
19:39:59*hax-scramper quit (Ping timeout: 260 seconds)
20:23:40*nsf quit (Quit: WeeChat 2.7)
20:27:36m4r35n357Just knocked together a high-order Lorenz ODE solver as my first nim, comments regarding style/efficiency/accuracy welcomed https://paste2.org/mWep27e3
20:28:30shashlicklooking for feedback - https://markdownshare.com/view/fc238813-d725-459c-b506-184a0c665ecd - draft article
20:31:33clyybberm4r35n357: Very nice!
20:31:41clyybberOnly suggestion would be to use cligen
20:31:50clyybberits a very cool library
20:32:51disrupteki'm adding testament shimming to testutils on the stream.
20:32:58disruptekcome fix my bugs.
20:33:07clyybberayy I'll hop on mumble
20:33:29*hax-scramper joined #nim
20:35:15m4r35n357clyybber, looks like argparse on steroids! My example is probably not worth it, as it conforms to the way I already run the (more serious) c and Python implementations. Thanks for looking though, I'll bear cligen in mind!
20:37:07lqdev[m]may I know why stack traces are broken for me? I get a SIGSEGV but I can't even debug it properly!!
20:37:44lqdev[m]and `import segfaults` doesn't help
20:38:49leorizeyou're not using -d:release, right?
20:39:00clyybberwhen your stacktrace is broken your code is too probably :p
20:39:20lqdev[m]leorize: nope
20:39:31lqdev[m]clyybber: but this is such a simple use case
20:39:40lqdev[m]like, it's literally just dealing with objects and seqs
20:39:41clyybbershow me
20:39:43clyybberoh
20:39:48lqdev[m]wait a sec
20:40:45*marmotini_ quit (Remote host closed the connection)
20:40:49lqdev[m]the segv literally happens somewhere in this proc https://github.com/liquid600pgm/nadio/blob/b5df3d5fb462c76d24b659779b13539906af1900/src/nadio/gui/node_editor.nim#L108
20:41:04lqdev[m]and something gets corrupted and I get a SIGSEGV without a stacktrace
20:41:12lqdev[m]must not be my lucky day.
20:41:22*matti quit (Quit: Updating details, brb)
20:41:22*marmotini_ joined #nim
20:42:03*matti joined #nim
20:42:19clyybberrun it through valgrind
20:42:49leorizeAraq: can you take a look at the PRs I made for ormin?
20:43:40Araqok
20:43:55lqdev[m]clyybber: but valgrind slows down my program considerably and I have to go through all the garbage output because garbage collection is a thing
20:44:15lqdev[m]and my terminal doesn't have pgup/pgdown to scroll quickly
20:44:37lqdev[m](how can I set this up for alacritty by the way kthx)
20:44:44leorizeyou aren't using --gc:arc
20:45:16leorizeit's gonna be slow on valgrind
20:45:17clyybberlqdev[m]: Its shift + pgup/pgdown
20:45:31leorizenah, not bound by default
20:45:35leorizefor alacritty afaict
20:45:46Araqlqdev[m], use 'koch valgrind'
20:45:47*marmotini_ quit (Ping timeout: 260 seconds)
20:46:00clyybberleorize: It is
20:46:05clyybberif you have scrollbuffer enabled
20:46:14Araqor read koch.nim to see how to config valgrind with a suitable supression file
20:46:53lqdev[m]leorize: thank you I'd use --gc:arc but limited support for `addr` in the VM and breakage of regex is not my fault
20:47:46leorizelqdev[m]: well edit alacritty.yml
20:47:54leorizethere's a section on the bottom with all the mappings
20:48:44lqdev[m]didn't know about shift+pgup/pgdown, nice
20:49:03*lqdev joined #nim
20:49:33lqdev[m]oh by the way, I just noticed but the channel topic has an outdated Nim version
20:49:49*lqdev quit (Client Quit)
20:51:43stefantalpalaruGetting a Nim object's base type at runtime (based on an {.emit.} tip from Zahary): https://gist.github.com/stefantalpalaru/82dc71bb547d6f9178b916e3ed5b527d
20:54:09AraqI simply use cast[ptr PNimType](objAddr)[]
20:57:02stefantalpalaruI don't think PNimType is available outside the compiler and that simple cast would not work if you don't know the number of inheritance levels, so you can manually add the right number of Sup.Sup.Sup... struct traversal steps.
20:57:09*marmotini_ joined #nim
21:00:49Araqthe point of Sup.Sup.Sup is to workaround C's strict aliasing rules, the RTTI is always at offset 0
21:01:18Araq(except for C++ based exceptions which are broken, have a PR that fixes that)
21:01:42*marmotini_ quit (Ping timeout: 265 seconds)
21:07:53*hax-scramper quit (Read error: Connection reset by peer)
21:08:21*leorize quit (Quit: WeeChat 2.6)
21:08:25*hax-scramper joined #nim
21:09:35*narimiran quit (Ping timeout: 260 seconds)
21:19:19*hax-scramper quit (Read error: Connection reset by peer)
21:20:09*hax-scramper joined #nim
21:21:35*filcuc joined #nim
21:21:38*tane quit (Quit: Leaving)
21:26:55*Jesin quit (Quit: Leaving)
21:29:46*Jesin joined #nim
21:33:15*marmotini_ joined #nim
21:42:49*Jesin quit (Quit: Leaving)
21:45:24shashlickCome on folks, zero feedback?
21:48:07*letto quit (Ping timeout: 255 seconds)
21:48:30*Jesin joined #nim
21:49:56*letto joined #nim
21:53:29clyybbershashlick: I like it
21:53:38*uvegbot quit (Ping timeout: 245 seconds)
21:53:39clyybberBut I am probably not the target audience
21:55:40*sigmapie8 joined #nim
21:56:21sigmapie8facing "Could not download: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init" while nimble refresh
21:57:15sigmapie8my openssl version is - OpenSSL 1.1.1d 10 Sep 2019
21:58:03*uvegbot joined #nim
22:01:35*Trustable quit (Remote host closed the connection)
22:01:52*sigmapie8 quit (Quit: Leaving)
22:12:27shashlickClyybber: thanks, but your inputs will be helpful at the end since that's Nim devs
22:21:38*filcuc quit (Ping timeout: 240 seconds)
22:23:19*solitudesf quit (Ping timeout: 260 seconds)
22:24:51*lritter quit (Remote host closed the connection)
22:32:18rayman22201shashlick, maybe mention the package managers: nimble / nimph.
22:32:43rayman22201a big part of developer workflow is tied into the package management
22:35:03shashlickMakes sense, need to think about how it can fit into this
22:35:24shashlickAm i missing any particular workflow
22:36:17*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
22:50:17clyybberdont think so
22:51:56shashlickIf you have any alternate ways to use Nim than what I've noted, please share
22:57:57FromDiscord<treeform> shashlick, I think your typical user vs new users is backwards... I develop on windows and I don't really use scoop and chocolatey... on windows its much more common to download zips or run installer.exe then package managers.
22:58:26FromDiscord<treeform> New user will just use "choosenim"?
22:58:52FromDiscord<treeform> Then if they are adventurous use git checkout and build.bat
22:59:25FromDiscord<Recruit_main70007> i think they will download precompiled binaries of the wen rather than choosenim
22:59:40FromDiscord<treeform> what is "wen"?
23:00:33FromDiscord<treeform> I did not even know that `scoop install nim` will work... is that at 1.0 thing?
23:02:44FromDiscord<treeform> I can see users on Mac and linux using a package manager, but windows is not really...
23:03:33*Hideki_ joined #nim
23:08:07*Hideki_ quit (Ping timeout: 260 seconds)
23:08:56*abm quit (Quit: Leaving)
23:13:01*natrys quit (Quit: natrys)
23:19:25shashlickIt's a suggestion to use package manager's on windows
23:19:41shashlickOr to download and install from zip
23:19:47Araqyeah, Windows is the PM-free heaven
23:20:07Araqit's one of the reasons why I still use Windows, no freaking package manager
23:20:10shashlickScoop works pretty nicely, been using it for a couple years
23:20:34shashlickScoop is up to date with Nim
23:20:38shashlick1.0.6
23:21:35shashlickThe whole point of the post is to use choosenim and have multiple releases and devel coexisting
23:21:46shashlickBut not everyone needs to start or go there
23:23:43shashlickAraq: curious on your thoughts on the post as well
23:25:30disruptekwhat's the link?
23:26:01clyybberhttps://markdownshare.com/view/fc238813-d725-459c-b506-184a0c665ecd
23:26:40*theelous3 quit (Ping timeout: 255 seconds)
23:29:27*Hideki_ joined #nim
23:36:52*luis__ joined #nim
23:43:19*luis__ quit (Quit: luis__)
23:44:58*theelous3 joined #nim
23:47:35*Hideki_ quit (Remote host closed the connection)
23:50:58*theelous3 quit (Ping timeout: 255 seconds)
23:52:20*leorize joined #nim
23:52:38*Hideki_ joined #nim
23:53:08*luis__ joined #nim
23:57:07*Hideki_ quit (Ping timeout: 260 seconds)
23:57:57Araq> but most distros not too far behind.
23:58:05Araqbut most distros are not too far behind.
23:58:16Araq> Forking can be done on the github UI.
23:58:23AraqForking can be done via the github UI.
23:58:54Araqall in all, it could use some spice