<< 04-10-2019 >>

00:01:45*sealmove joined #nim
00:05:28FromDiscord<treeform> does not look easy to me
00:05:30disrupteklooks like it's just a hash of the base64 but might take a little trial and error to get the padding right. maybe it should be obvious to me, but... it's not.
00:06:11FromDiscord<treeform> well all of crypto is hash of some thing... the hash can be quite complex
00:08:27*abm quit (Ping timeout: 240 seconds)
00:09:26sealmovehi, can someone point me to a way to do delta comparison for floats?
00:09:56sealmovefor example 1.2345 == 1.234500050544739 be true
00:12:06FromGitter<zetashift> write a proc that compares them using float?
00:12:15FromGitter<zetashift> not float but strformat sorry
00:13:23FromDiscord<treeform> sealmove, maybe abs(1.2345 - 1.234500050544739) < 1E-5
00:13:28sealmovewas wondering if there is ready good work on this, yeah np
00:13:40sealmoveme getting lazy :?
00:14:07FromDiscord<treeform> you can probably make a proc `~`(a, b): abs(a - b) < 1E-5
00:14:20FromDiscord<treeform> and do 1.2345 ~ 1.234500050544739
00:17:34sealmovei also realized it suffices to prefix with 'f32. for example myF32Float == 1.2345'f32
00:18:03sealmovebut it's hard for me to generate 'f32 prefix i think
00:24:01disruptektreeform: i think you're gonna need to fix your openssl.
00:30:29disruptekare you sure you're actually passing a key?
00:33:49sealmovetreeform: I used your solution as a quick fix, though zetashift's sounds faster, and treeform's more elegant :>
00:35:11FromGitter<zetashift> yeah, I agree with that treeforms one is the way to go lol
00:38:29FromDiscord<treeform> disruptek, yes. I have two ubuntu servers, both use nim 1.0.0, both use openSSL 1.1.0g, and are running same code. One of them crashes though in openSSL. I hate openSSL.
00:39:53FromGitter<zetashift> Can't you use something like BearSSL?
00:41:27disruptekis the binary the same?
00:41:54FromDiscord<treeform> Probably not
00:42:23FromDiscord<treeform> I'll copy the binary and test, good idea.
00:42:35disruptekjust md5sum it or something.
00:42:45FromDiscord<treeform> I am too angry at this, will try tomorrow.
00:42:47disrupteki'm gonna try 1.0.2t
00:43:23FromDiscord<treeform> I am sure they don't match, one has print statements...
00:44:17sealmove11 tests pass!! https://i.ibb.co/tZsvfXf/2019-10-04-03-42.png
00:45:02disruptekprint statements...?
00:46:19sealmovelol
00:47:34FromGitter<zetashift> nice one sealmove always good to see green
00:47:44sealmove:)
00:58:52disruptek1.1.1d works for me, too.
01:04:56*theelous3 joined #nim
01:26:38*traviss quit (Read error: Connection reset by peer)
01:27:04*traviss joined #nim
01:28:48*sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in)
01:29:05*sacredfrog joined #nim
01:30:02*Jesin quit (Ping timeout: 245 seconds)
01:32:07*snooptek quit (Ping timeout: 245 seconds)
01:32:50*Jesin joined #nim
01:34:16*leorize quit (Remote host closed the connection)
01:34:49*leorize joined #nim
01:54:57*Romanson joined #nim
01:59:38*theelous3 quit (Ping timeout: 276 seconds)
02:34:42rockcaveraWere the concept, end, interface, and out keywords not implemented?
02:35:31rockcaveraI saw that they are on the reserved keyword list, but I found nothing about how they work in the manual
02:36:29rockcaveraThe 'do' keyword also has nothing specific, just 2 passages of code.
02:38:09FromGitter<zetashift> concepts are a WIP, but the rest I don't know the backstory
02:40:24FromDiscord<YouCantSeeMe> Hey
02:41:14FromGitter<zetashift> hello
02:41:36yumaikasyo
02:42:21sealmoverockcavera: http://nim-lang.github.io/Nim/manual_experimental.html
02:46:29FromDiscord<namra> hello
02:47:01yumaikasAnyone here know of some good example Jester code?
02:47:14FromDiscord<namra> i want to disable nimsuggest minor mode by default in spacemacs but whatever method i tried it justn doesn't work. it is always enabled.
02:47:33FromDiscord<namra> ```
02:47:33FromDiscord<namra> (spacemacs|use-package-add-hook nimsuggest
02:47:34FromDiscord<namra> :post-init
02:47:34FromDiscord<namra> (remove-hook 'prog-mode-hook 'nimsuggest-mode))
02:47:34FromDiscord<namra> ```
02:47:34FromDiscord<namra> my latest attempt
02:47:48FromGitter<zetashift> @yumaikas https://github.com/dom96/nim-in-action-code and https://github.com/nim-lang/nimforum
02:48:09FromDiscord<namra> also tried
02:48:09FromDiscord<namra> ```
02:48:10FromDiscord<namra> (add-hook 'nim-mode-hook (lambda () (nimsuggest-mode -1))
02:48:10FromDiscord<namra> ```
02:48:32FromGitter<zetashift> careful with code pasting from Discord, Gitter and IRC don't format well so it's always suggested to use a pastebin :D
02:48:34yumaikasnamra: Could I ask you to use a pastebin?
02:48:43yumaikaswhat zetashift said, lol
02:49:13FromDiscord<namra> sorry
02:49:27yumaikasno worries
02:50:10FromDiscord<namra> https://pastebin.com/qAp6cs0T
02:50:26FromDiscord<namra> also tried some other variations of add-hook
02:50:30rockcaverasealmove thanks
02:50:31rockcavera:)
02:50:59*yumaikas scrates head at stdtmpl files....
02:51:56yumaikas`type #<2>` .....
02:52:04yumaikashttps://github.com/dom96/nim-in-action-code/blob/master/Chapter7/Tweeter/src/database.nim#L2
02:52:13FromGitter<zetashift> @namra I can't help you with this since my elisp sucks balls and our resident emac'ers are sleeping I think. this google thing I did might help? http://ix.io/1ilQ
02:52:22FromGitter<zetashift> krux02 used `(nimsuggest 0)`
02:52:28FromGitter<zetashift> not sure where you would plug that though
02:53:02sealmovehow does (9837 mod 13) equal 4? -_-
02:53:18FromGitter<zetashift> !eval 9837 mod 13
02:53:20NimBotCompile failed: /usercode/in.nim(1, 6) Error: expression '9' is of type 'int literal(9)' and has to be discarded
02:53:38FromGitter<zetashift> echo 9837 mod 13
02:53:42FromGitter<zetashift> fml
02:53:44FromGitter<zetashift> I need to sleep
02:53:45yumaikas!eval echo (9832 mod 13)
02:53:47NimBot4
02:54:11FromDiscord<namra> also tried with 0 :/
02:54:29FromGitter<zetashift> I think the `#<2> ` are notes from the book
02:54:49yumaikasYeah, I am still getting used to # as a comment
02:55:22FromGitter<zetashift> it'll grow on ya
02:55:30sealmove!eval echo $int(-9837 mod 13)
02:55:33NimBot9
02:55:37yumaikasFor sure.
02:55:56FromGitter<zetashift> wtf nimbot
02:56:06sealmoveint conversion messes it up
02:56:16yumaikas!eval for i in 1..10000:;echo(i)
02:56:18sealmove!eval echo (9837 mod 13)
02:56:18NimBotCompile failed: /usercode/in.nim(1, 19) Error: expression expected, but found ';'
02:56:20NimBot9
02:56:31yumaikas!eval for i in 1..10000: echo(i)
02:56:33NimBot1↵2↵3↵4↵5↵6↵7↵8↵9↵10↵11↵12↵13↵14↵15↵16↵17↵18↵19↵20↵21↵22↵23↵24↵25↵26↵27↵28↵29↵30↵31↵32↵33↵34↵35↵36↵37↵38↵39↵40↵41↵42↵43↵44↵45↵46↵47↵48↵49↵50↵51↵52↵53↵54↵55↵56↵57↵58↵59↵60↵61↵62↵63↵64↵65↵66↵67↵68↵69↵70↵71↵72↵73↵74↵75↵76↵77↵78↵79↵80↵81↵82↵83↵84↵85↵86↵87↵88↵89↵90↵91↵92...
02:56:56FromGitter<zetashift> Might want to keep code like that on: https://play.nim-lang.org/
02:57:01yumaikasSmart moves there
02:57:25yumaikaszetashift: I was more interested in making sure that nimbot didn't flood irc
02:57:46FromGitter<zetashift> the bot is getting smarter :D
02:57:51sealmovehttps://miniwebtool.com/modulo-calculator/?number1=-9837+&number2=13
02:58:07yumaikasI've made evalbots before, and tipped them over before
02:58:10yumaikas:D
02:58:13sealmove!eval echo uint32(9837 mod 13)
02:58:15NimBot9
02:58:25sealmove!eval echo uint32(-9837 mod 13)
02:58:27NimBot9
02:58:32sealmove!eval echo int(-9837 mod 13)
02:58:35NimBot9
02:58:41sealmove-.-
02:58:44yumaikas!eval echo 9
02:58:47NimBot9
03:09:53*lritter quit (Ping timeout: 245 seconds)
03:10:56*lritter joined #nim
03:12:48FromGitter<gogolxdong> @lmariscal good to know you are working on nimgl, we are working on Vulkan , probably can share something with you.
03:18:18yumaikasSo, are all SQL query results casts to strings?
03:22:46FromDiscord<Frederich Engels> @namra I recommend you join the Gitter
03:22:52FromDiscord<Frederich Engels> Community isn’t very active here
03:26:18FromGitter<yumaikas> So, for SQL queries, is there any way to pull the results back without having having each row dumped into a seq of strings?
03:29:16sealmoveok so... in programming languages `a mod b` is defined as `a - (a / b) * b`, but in math it's actually different: https://play.nim-lang.org/#ix=1Xxn
03:31:05*rockcavera quit (Remote host closed the connection)
03:36:54FromGitter<yumaikas> So, the fact that none of the db wrappers have a way to fetch anything other than strings out of a database row kinda bothers me, a little
03:37:30FromGitter<yumaikas> Like, for sqlite, that's not terrible, but for odbc or postgres, that seems problematic
03:44:37*nsf joined #nim
03:47:27FromDiscord<namra> ah great figured it finally out with some more googling \o/
03:47:44FromGitter<yumaikas> Figured out what now?
03:48:08FromDiscord<namra> why emacs (spacemacs) frooze when using nimsuggest minor mode
03:48:32FromGitter<yumaikas> Your first mistake was using spacemaces, IMO
03:48:35*FromGitter * yumaikas ducks
03:49:13FromDiscord<namra> ^^. been using vim for years before that. but spacemacs makes some things just a lot nicer ^^
03:49:29*chemist69 quit (Ping timeout: 276 seconds)
03:50:29FromGitter<yumaikas> Eh, it also makes it harder to figure out what's going on, or, it did for me when I was trying out emacs
03:51:06FromDiscord<namra> i agree with that
03:51:14*chemist69 joined #nim
03:57:00*dddddd quit (Remote host closed the connection)
04:27:18sealmovejust use VSCode :P
04:32:27*actuallybatman quit (Ping timeout: 240 seconds)
04:44:02*sealmove quit (Quit: WeeChat 2.6)
04:58:52FromGitter<yumaikas> So.... I see that setLen for seq[T] is implemented via a magic pragma?
05:19:43leorizemagic just means that the implementation is hidden in the compiler
05:20:18FromGitter<yumaikas> And so I'd have to read the source code for the compiler to see the internals of that
05:22:05FromGitter<yumaikas> Off the top of your head, do you know what allocation strategy is used by add and/or setLen when the underlying capacity has to grow?
05:24:00leorize[m]this is newruntime seqs: https://github.com/nim-lang/Nim/blob/devel/lib/core/seqs.nim
05:24:13leorize[m]but I imagine that it'd be the same for the GC-ed one
05:24:15FromGitter<yumaikas> what about the GC'd seqs?
05:25:16leorizehttps://github.com/nim-lang/Nim/blob/devel/lib/system/gc.nim
05:25:20leorizethey should be in there
05:29:12FromGitter<yumaikas> I'm not seeing them in there for now, but I don't think I need to know a great deal about it atm. Mostly, I'm trying to figure out what sort of capacity growth algorithm is used if you're starting from an empty sequence
05:29:48leorizejust read the newruntime one
05:30:00leorizeit should be the same algo for the gc-ed ones
05:30:05FromGitter<yumaikas> so, if I start with `var mySeq: seq[int] = @[]` and then call add 100 times, how many times does the seq ge reallcoated?
05:30:25FromGitter<yumaikas> *get
05:30:40FromGitter<yumaikas> That's hard to tell from the code at the moment
05:30:49leorizehttps://github.com/nim-lang/Nim/blob/devel/lib/core/seqs.nim#L170
05:31:56leorizethe resize() proc should have the algorithm
05:32:50leorizetracing: https://github.com/nim-lang/Nim/blob/devel/lib/core/seqs.nim#L119
05:33:06*narimiran joined #nim
05:33:15leorizehttps://github.com/nim-lang/Nim/blob/c94647aecad6ed7fd12152800437a6cda11e06e6/lib/system/sysstr.nim#L18
05:33:16leorizethere
05:34:15FromGitter<yumaikas> Looks simple enough. That's about what I would have expected, thought the case for larger arrays is interesting. Thanks for helping me look around!
05:46:36*gangstacat quit (Quit: Ĝis!)
05:48:45*gangstacat joined #nim
05:53:48*skoude joined #nim
06:07:46*LargeEpsilon joined #nim
06:07:57*skoude_ joined #nim
06:11:11*skoude quit (Ping timeout: 276 seconds)
06:32:18*solitudesf joined #nim
06:39:07*Vladar joined #nim
06:39:25narimiranyay, fibonacci PR #12358 is mine!
06:55:12*PMunch joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:44*gmpreussner joined #nim
07:14:58FromDiscord<arnetheduck> looks like people are waking up to sobering thoughts about the impossible promises made in the blog post about 1.0 😉
07:15:32FromDiscord<arnetheduck> the only release that will ever exist that is compatible with 1.0.0 is 1.0.0
07:16:50FromDiscord<arnetheduck> as in "100% compatible"
07:17:24FromDiscord<Rika> what do you mean
07:18:38Mister_Magistercan i do like: var thread: Thread[void]
07:20:08Araqarnetheduck: huh? 1.0.2 will be 100% compatible to a very good approximation to 100%
07:20:14Mister_Magisteror do i have to make array with one element
07:21:34FromDiscord<arnetheduck> any change you make to a piece of software introduces that changes behavior introduces incompatibilities. in nim more so than in other modern languages, due to how the symbol namespace is global, but that's beside the point. you can potentially make the argument that you remain 100% compatible with the "intended" behavior, but that's kind of weak. microsoft learned that the hard way, and had an army of resources trying to mitigate the c
07:21:58narimiranRika: don't listen to @arnetheduck, he just likes very much to gloat :P
07:22:19Araqso in other words, "people" is just you and you are spreading your usual FUD
07:22:26FromDiscord<arnetheduck> Araq, if I depend on a bug and you fix it, you break my program. if someone adds an overload to a module I import, they break my program.
07:22:57Araqwhich is why 1.0.2 doesn't have new procs or bugfixes that change the behaviour
07:23:36FromDiscord<arnetheduck> every bugfix changes behaviour, else it wouldn't fix anything
07:24:03Araqoh yeah really? how about "compiler crashed with nil access, now it doesn't anymore"
07:24:22Araqsure your build could rely on the compiler crashing
07:24:22Araqbut that's silly.
07:25:17narimiranhttps://xkcd.com/1172/ once again
07:25:50Araqor how about "we fixed a typo in the documentation", sure you have awesome tests that checked all the produced HTML and so we break you build. in the meantime, in the real world, nothing happens.
07:26:43FromDiscord<arnetheduck> lol, yeah, it's silly, agree, but nonetheless true.. there's always risk of unintended consequences when you upgrade because you cannot test all programs out there - you make a best effort etc, but it's silly to promise that nothing will break
07:27:31narimiran"silly to promise that nothing will break" and also silly to be anal about what others can read with common sense
07:28:09narimirangah, i'm making the same mistake as yesterday evening. i should just log out, and not participate in this kind of things
07:28:23Mister_Magisterk threads works yay
07:28:26FromDiscord<arnetheduck> clearly not, since it caused confusion and quite the discussion yesterday 😉
07:29:05FromDiscord<juan_carlos> Python is full of `if sys.version > version_that_works: ... else: ...` :P They breaked Regex whitespace significance on a patch version last time I remember.
07:29:57*skoude_ quit (Ping timeout: 240 seconds)
07:30:36FromDiscord<arnetheduck> yup, and so is our code - in fact, stew is in part an effort to insulate the rest of our code from "bugfixes", so we can more easily upgrade in the future.. we can lower that risk by using less of the std lib for example because there are fewer moving parts being upgaded together
07:30:49FromGitter<OldhamMade> Hey all. qq: is there an `lxml`-like library for Nim? I have a new project that requires parsing a number of separate XML sources, filtering, and merging them into an output doc, so lots of XPath expressions. Python+lxml is my "go-to" for this, but I'm trying to use Nim more and more. Thoughts?
07:30:50narimiranthe yesterday's confusion was not about what you're saying
07:31:57FromDiscord<arnetheduck> I read it as a discussion about what constitutes a breaking change, with a few different angles
07:32:10*skoude joined #nim
07:32:19FromDiscord<juan_carlos> Python is worse because you dont have `when` then all broken code end up in the AST and all anyway, but yeah.
07:32:52Mister_Magistergot question. https://nim-lang.org/docs/asynchttpserver.html if there is waitFor it won't be really async will it?
07:33:47*floppydh joined #nim
07:33:57FromDiscord<arnetheduck> seriously though, who here hasn't been affected by a bugfix that had unintended consequences?
07:34:51Araqseriously though, do you think we don't know? we only backport bugfixes that are not critical like the mentioned "nil access" crashes.
07:35:23Araqlook at contributing.rst for a proof. the default changed to "don't backport".
07:35:43ZevvHa I wasn't making this up: http://blog.reverberate.org/2013/08/parsing-c-is-literally-undecidable.html
07:36:15Mister_Magisterhow can i make async server async?
07:36:21Zevvfunny how the '++' is dropped from the URL
07:36:42leorizeMister_Magister: don't waitFor :P
07:36:53leorizepoll() every once in awhile
07:37:05leorizepoll() have a timeout that you could use
07:37:09Zevvbetter yet: do *everything* async and do runForever()
07:37:27Zevvyou do work in timers or in events. If there are no timers or events, there is no work to do.
07:37:35leorizenarimiran: did you see my PM?
07:37:40narimiranleorize: nope
07:37:59Mister_Magisterleorize: can i just run it in separate thread if i have something else waiting too?
07:38:36Mister_Magisternah now both things aren't working :/
07:38:42FromDiscord<arnetheduck> well, fwiw I'm mostly on the other side of the argument and think that we should build systems that optimize for containing and managing breakage, not rely on avoiding it..
07:40:31Mister_MagisterZevv: i don't get you tho
07:40:47Mister_Magisterwondering why asynchttpserver doesn't work in thread
07:40:48FromDiscord<arnetheduck> we can have tools that hold things static (ie lockfiles), but trying to change and not change at the same time is a difficult game with few good outcomes
07:41:48Mister_Magisterwait no, server is working
07:41:52Mister_Magistermy bad
07:41:56AraqZevv: I think it's wrong :P
07:41:56Araq"These two are completely different parse trees, and the difference between them cannot be delayed to further stages of the compiler." says who? the standard doesn't say much if anything about "parse trees" and I can come up with an AST design where it's just a StarSep(x, y) node
07:41:56AraqI mean, it's a terrible AST for a compiler
07:41:56Araqbut it seems possible
07:42:22Mister_Magistereverything works fine!
07:45:23PMunchOldhamMade, there is xmldom and xmldomparser in the stdlib, not sure if that supports XPath though
07:48:01PMunchMister_Magister, yay!
07:49:01PMunchI'm currently working on an article series on multi-tasking in Nim, the async article is done (save for any potential changes I want to make when writing about other topics), you could have a look at it if you want even though it's not officially published yet
07:49:09PMunchThe threading one is still upcoming
07:49:45PMunchMaybe you will have some interesting insight on getting into async/await in Nim as a beginner :)
07:50:09Mister_MagisterPMunch: ping me when you finnish it then please :P
07:50:28*abm joined #nim
07:51:02PMunchThe threading one, or the async one? The async one is already done
07:52:52Mister_Magisterboth :P
07:53:00Mister_Magisterthe more knowledge the better
07:53:29PMunchI PM'ed you the introduction and the async one :)
07:54:36leorizeMister_Magister: the point of async is that it doesn't use threas :P
07:54:38leorizethreads*
07:57:58FromGitter<OldhamMade> Thanks @PMunch. A quick search through the standard docs doesn't really return any results for `xpath`.
07:58:47FromGitter<OldhamMade> https://github.com/vegansk/xmltools seems to come close, but doesn't look like it has full xpath support.
07:59:00Mister_Magisterleorize: if only it was working tho :P for one async thing it's aokay but i can't get it to work with 2
07:59:29FromGitter<OldhamMade> I'm looking for something closer to lxml; some sort of wrapper around libxml and libxslt that presents a "clean" interface.
08:01:50PMunchOldhamMade, maybe https://github.com/vegansk/xmltools or https://github.com/OpenSystemsLab/q.nim is close to what you want?
08:03:34*krux02 joined #nim
08:04:54PMunchHmm, unfortunately xmltools doesn't seem to have been updated to 1.0.0
08:10:54Mister_Magisterhow can i change StringStream to string?
08:11:53FromGitter<OldhamMade> Hmm... not sure `q` would hit the mark. XPath is a lot more powerful than CSS selectors (preceding-sibling, sub-selects, functions, etc). I'll give it a quick try, though. Might be "good enough".
08:13:26PMunchMister_Magister, readAll?
08:13:46Mister_Magisteroh thanks
08:13:55Mister_Magisteri'm trying to integrate https://flyx.github.io/emerald/tutorial.html this and asynchttpserver
08:17:22*Mister_Magister and failing
08:21:21PMunchHmm, I can't get emerald to work
08:22:37FromDiscord<juan_carlos> Emerald is unmaintained AFAIK.
08:23:11Mister_MagisterPMunch: i got it to work
08:23:41Mister_Magister@juan_carlos https://github.com/flyx/emerald/commits/devel doubt
08:23:49Mister_MagisterPMunch: you need to do ss.flush()
08:23:55PMunchAaah
08:24:16PMunchWait, that still didn't work..
08:24:32PMunchNvm, I was being an idiot..
08:25:51PMunchI forgot to do ss.setPosition(0)
08:26:13FromDiscord<juan_carlos> `This repository has been archived by the owner. It is now read-only.` "Templating for Nimrod" 🤷‍♀️
08:26:27Mister_Magisterah ye
08:26:52Mister_Magisterwell works for me i guess
08:28:28*oculux quit (Ping timeout: 265 seconds)
08:33:25PMunchMister_Magister, working example with asynchttpserver and emerald: http://ix.io/1Xyk/nim
08:38:56PMunchSuper off-topic, but does anyone have any good autumnal dinner recipes?
08:39:35Mister_MagisterPMunch: ye ye i got it too
08:39:39*oculux joined #nim
08:39:58PMunchAnd on-topic, Nim v1.0.0 fails with this error when trying to compile the tests from xmltools: http://ix.io/1Xyo
08:40:11Mister_MagisterPMunch: instead of what you did i did ss.flush() and ss.data just like in tests
08:40:18AraqPMunch: pumpkin soup
08:41:02PMunchMister_Magister, I guess that works as well
08:41:19PMunchAraq, I had baked butternut pumpkin yesterday :P
08:41:45AraqPMunch: I've seen this error before
08:41:58Araqdefinitely something for 1.0.2
08:47:28*couven92 joined #nim
08:47:57*asymptotically joined #nim
08:52:06*shomodj joined #nim
08:53:37*asymptotically quit (Remote host closed the connection)
08:55:16*solitudesf- joined #nim
08:55:50*asymptotically joined #nim
08:57:39*solitudesf quit (Ping timeout: 246 seconds)
08:58:29Zevvnarimiran: did you close/reopen to retrigger CI?
08:58:34narimiranyep
08:59:00Zevvah ok. I already did an add-unobtrusive-whitespace-and-force-push-amend
08:59:21*skoude_ joined #nim
09:01:08*skoude quit (Ping timeout: 245 seconds)
09:03:54*ng0 joined #nim
09:04:37*Romanson quit (Quit: Connection closed for inactivity)
09:04:46*clyybber joined #nim
09:10:59*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:25:22*shomodj joined #nim
09:27:03FromGitter<kayabaNerve> I'm on 0.20.2 as I haven't yet updated to stable. Found this error: `/nim-0.20.2/lib/pure/collections/tables.nim(260, 18) Error: undeclared identifier: 'result'` :thinking:
09:27:07FromGitter<kayabaNerve> Anyone have any ideas?
09:27:41FromGitter<kayabaNerve> *beyond update to 1.0*
09:28:24*tklohna joined #nim
09:29:27FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d9710f792920c36a10ca058]
09:30:27PMunchHuh, that's weird
09:30:41PMunchMaybe it's the same issues I've been seeing with macros and symbols
09:31:05PMunchWould think the tables module had a test that would cover this though..
09:31:27FromGitter<kayabaNerve> I saw some regressions with result in StInt (Status lib) around 0.20 as well.
09:31:51FromGitter<kayabaNerve> The weird thing is that this is Tables, on the 0.20 patch, and I already have plenty of tables in use yet this is the one which errors.
09:32:13FromGitter<kayabaNerve> I do import the tables lib and have a hash() function for my custom index type which I also use elsewhere.
09:33:59*tklohna quit (Ping timeout: 276 seconds)
09:34:06FromGitter<kayabaNerve> I found the issue.
09:34:21*tklohna joined #nim
09:34:51FromGitter<kayabaNerve> `Error: type mismatch: got <Table[Hash[384], void], Hash[384], VerificationPacket>` when I added a []= before hand. It was using the file as a type instead of the type in the file with the same name as the file.
09:35:18FromGitter<kayabaNerve> That said, I have no idea why it manifested as result undeclared. I'm guessing because the type of result was `void` but...
09:53:03*narimiran quit (Ping timeout: 265 seconds)
10:07:45FromGitter<mratsim> Stint allows runtime and compile-time bigint but the NimVM compile-time does not behave properly
10:08:42FromGitter<mratsim> https://github.com/status-im/nimbus/issues/399
10:10:15*ehmry quit (Ping timeout: 268 seconds)
10:10:51FromGitter<mratsim> Also for your error @kayabaNerve is it inside a macro perhaps?
10:13:57FromGitter<kayabaNerve> @mratsim No. It has to do with files having precedence over types for a generic.
10:13:57*aEverr quit (Read error: Connection reset by peer)
10:14:16*aEverr joined #nim
10:14:42FromGitter<kayabaNerve> It creates the generic with void if a file is specified which breaks a lot of things. Sometimes obviously, like with []=, sometimes not, like with [].
10:15:18FromGitter<kayabaNerve> The StInt issue I'm referring to also has to do with result, and it happened with toString. I've brought it up before and it no longer exists.
10:18:26*Trustable joined #nim
10:23:55Mister_Magister!eval waitFor me
10:23:56FromDiscord<arnetheduck> https://github.com/nim-lang/Nim/issues/12332 is the ideal bug for the point about backwards compatibility: fixing it means breaking at least one one of sem, compile time and runtime, and you can make arguments about what "correct" behaviour is to begin with.. If it's not fixed in the stable series, we might consider not upgrading to 1.0.x since its pretty serious - it's risky for nimbus not to be able to rely on basic math, but now the
10:23:57NimBotCompile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'waitFor'
10:25:56FromGitter<kayabaNerve> @arnetheduck ⏎ 1) You're on Discord? Nice ⏎ 2) Your message cuts off on Gitter afr "basic math, but now the"
10:26:21FromDiscord<arnetheduck> kayabaNerve, from what I remember about stint and tostring it was actually a null reference issue somewhere that we had a wrong todo about
10:27:14FromDiscord<arnetheduck> "it's risky for nimbus not to be able to rely on basic math, but now the behaviour is there.."
10:27:49FromDiscord<arnetheduck> I'm also on a phone, doesn't help 😂
10:29:25FromGitter<kayabaNerve> Uhhh maybe, but I looked over the code. The issue I saw was that you used last line returns which the compiler didn't like (without `result =`.
10:29:34FromGitter<kayabaNerve> Forgot a missing parentheses :(
10:29:56FromGitter<kayabaNerve> I think nimcrypto had a similar issue. 0.20 had a lot of regressions tbh
10:30:11FromGitter<kayabaNerve> Or breaking changes depending on how you look at it but...
10:31:30*ehmry joined #nim
10:32:50FromDiscord<arnetheduck> Well, I know for a fact that what happened in one case was that our code was wrong, but introducing result masked the crash because of memory being initialized on the stack in different order and therefore not crashing because the leftovers on the stack randomly had safe values
10:34:50FromDiscord<arnetheduck> But like you say, there are likely multiple bugs here.. Generally last line returns have worked well for us except in macros which tend not to understand them
10:37:59*LargeEpsilon quit (Ping timeout: 268 seconds)
10:38:36FromGitter<alehander42> arnetheduck what do you think about providing a switch `--breakingFixes` or e.g. something similar to editions
10:39:13FromGitter<alehander42> this way such breaking fixes of wrong behavior can be easily used by 1.0 people and still keep the default behavior compatible
10:39:19FromGitter<alehander42> for existing 1.0 code
10:40:35FromGitter<alehander42> imo fixing type checking bugs: unsoundness etc might be ok with a deprecation period even for minor versions: it seems to me e.g. rust does it
10:46:53FromGitter<kayabaNerve> My problem was a compile time error :P
10:47:07FromDiscord<juan_carlos> `--bugingFixes --fixingBugings` 🤪
10:47:56FromGitter<alehander42> mm :)
10:49:23FromGitter<mratsim> We will add more tests compile-time / runtime tests in stint so hopefully testament will catch those regressions. But ideally we have a spec for math and bitops in the VM
10:50:13FromGitter<kayabaNerve> `--bugFixes --BugFixesFixes --bugFixesFixesFinal --bugFixesFixesFinalFixes`
10:50:58FromGitter<alehander42> well the point is
10:51:14FromGitter<alehander42> i see what you mean
10:51:52FromGitter<alehander42> but if you use `--bugFixes` or `devel`, you can make sure your code runs with the new changes
10:52:17FromGitter<alehander42> so it's not an issue to have 5 "finally fixing this"
10:52:35FromGitter<alehander42> breakingFixes*
10:53:58FromGitter<OldhamMade> @PMunch so, a quick test with `q`, and it seems to expect HTML, so any XML is "fixed up" (or, rather, broken) to fit. So that's a no-go. thanks for the suggestion though!
10:54:34FromGitter<OldhamMade> Also seems that `xmltools` won't build with v1.0.0, so that's a non-starter too.
10:55:00FromGitter<OldhamMade> Seems I may have to switch (back) to Python+lxml for this project. :(
10:55:25FromGitter<alehander42> what error do you get
10:55:32*ibutra joined #nim
10:56:48*Vladar quit (Remote host closed the connection)
10:56:51PMunchalehander42, the build error from xmltools: http://ix.io/1Xyo
10:57:00PMunchWith a Nim debug build on v1.0.0
10:57:10*Vladar joined #nim
11:00:22*LargeEpsilon joined #nim
11:04:17*absolutejam joined #nim
11:04:57FromGitter<alehander42> its not because of it
11:05:16FromGitter<alehander42> import fp :O
11:06:51clyybberHey Vladar can you merge my nimgame PR?
11:07:00clyybberIts a blocker for a PR to Nim.
11:08:30Vladaroh… let me take a look
11:10:28FromGitter<alehander42> its because of lines like instance KleisliInst, Option[_], exporting(_)
11:10:43FromGitter<alehander42> so some usage of the classy lib is failing with 1.0
11:10:46*floppydh quit (Quit: WeeChat 2.6)
11:10:50Vladarok, done
11:10:51FromGitter<alehander42> probably some macro stuff
11:10:52clyybberTHanks
11:15:34*navinmistry joined #nim
11:20:15PMunchIs there a way to pass varargs from a template to a call? I have template log(logLevel: LogLevel, args: varargs[string, `$`]) and want to pass args over to echo.
11:20:32PMunchBut just echo args echoes it as a list, args.join works, but requires strutils.
11:20:39PMunchIs there a generic way to do this?
11:22:18FromDiscord<arnetheduck> alehander42, I believe much more in not making the promise to begin with, and building tools to deal with breakage instead: code rewriters, warnings about UB, package managers, strong automated testing culture, smaller stdlib so that upgrades are smaller can be contained to areas of interest
11:23:02PMunchHmm, there is unpackVarargs in macros which does what I want
11:24:30FromGitter<AiguyGary_twitter> Newbie here...Getting this error on Levenshtein example on RosettaCode nim compile --verbosity:0 --hints:off --run "c:\nim-1.0.0\examples\Levenshtein.nim" ⏎ c:\nim-1.0.0\examples\Levenshtein.nim(3, 26) Error: typeless parameters are obsolete I'm guessing this was a change in 1.0 any the examples on RosettaCode haven't been updated yet?
11:25:07clyybberThis was a change long before 1.0.
11:25:41clyybberTo fix it look into the parameters of your templates and add :typed where there is no type.
11:26:01clyybberAnd if you manage to fix it maybe push the change to RosettaCode
11:26:13*actuallybatman joined #nim
11:28:26clyybbernarimiran: WDYT about making CI's for devel check the @#head versions of important packages and stable branches the released versions?
11:28:35FromDiscord<arnetheduck> promising to never break things mean promising to keep accumulating and compounding the technical debt
11:28:45*navinmistry quit (Remote host closed the connection)
11:29:10clyybberarnetheduck: I totally agree.
11:29:38*navinmistry joined #nim
11:31:16clyybberAraq: WDYT about making CI's for devel check the @#head versions of important_packages and stable branches the released versions?
11:31:41FromDiscord<arnetheduck> I also don't believe in `--breakingFixes` and the like - again you're combounding complexity which will slow down development of nim itself and make it harder to steer - instead, give us tools to make it deterministic which nim version is in use (treat the language as any other library), split it up into smaller pieces so that the cost of upgrading isn't 1-1.5 years of development over areas ranging all the way from core language featur
11:32:20clyybberExactly, as I pointed out yesterday a few times those switches make the code incredibly messy, especially with refactorings.
11:34:38FromGitter<alehander42> so, in this case whats the point of versions?
11:34:51FromGitter<alehander42> i am not disagreeing
11:35:32FromGitter<alehander42> but what does "upgrading to .n + 1" mean in this case
11:35:42FromDiscord<arnetheduck> we're quite competent enough to upgrade code as long as we're maintaining our libraries - it's not a big deal that we have to make a few fixes here and there if we can isolate them and calculate the cost/risk, and do so at our own pace. if we're not upgrading or maintaining something, it's because it's no longer interesting enough to upgrade so breaking it is not a problem - it deserves to wither and be overtaken
11:36:17FromDiscord<arnetheduck> alehander42, versions are a social promise from the maintainer to the user to help estimate the cost of upgrading, so that the user can factor that into their decision
11:37:03FromGitter<alehander42> yeah, but you can argue with this version model, many users would expect this cost to be close to 0
11:37:08FromGitter<alehander42> for minor versions
11:38:05FromGitter<alehander42> i am trying to understand what is the cost of patch vs minor vs major in your example version model
11:38:10FromDiscord<arnetheduck> yes, and as a way to manage expectations, you'll be better off if you're honest about it being a best effort thing rather than an absolute
11:39:03FromGitter<alehander42> ok, but i'd say the point is
11:39:12FromGitter<alehander42> maybe 1.0 -> 1.1 would be very little work
11:39:22FromGitter<alehander42> but a project might say: we'll stay on 1.0 until 2.0
11:39:29FromDiscord<arnetheduck> in fact, you'll be doing the community a service by educating them about this reality if you nudge your language and tooling to make it not a big deal to fix - it's a lesson that has taken people long time to learn (ie dll hell etc)..
11:39:33FromGitter<alehander42> and then you have the combined 5 or 10 or more
11:39:41FromGitter<alehander42> minor version breaking changes
11:39:57FromGitter<alehander42> but ok, that is the point of 2.0 on the other hand
11:40:25FromGitter<alehander42> i still think its mostly valuable to be able to run
11:40:26FromGitter<alehander42> 1) 0 libs
11:40:33clyybberalehander42: The point is if we release often those breaking changes will not accumulate
11:40:39clyybberBecause packages will adapt
11:40:41FromGitter<alehander42> for a long time: as foreign code isnt easy to change as your own code
11:40:44clyybberAssuming they are maintained
11:40:49FromGitter<alehander42> so this is a big cost: its easy to fix your breakages
11:41:00FromGitter<alehander42> but you'd want to be able to use existing libs
11:41:12clyybberalehander42: IMO nimble should make it simple to change foreign code.
11:41:32FromGitter<alehander42> i think thats one of the biggest points of e.g. c compat or linux compat: you can run very old third party libs/apps
11:41:45FromGitter<alehander42> without change: its very hard to change them yourself
11:41:48clyybberLike it should init a git repo for every package and then I can just do a change commit it and nimble will know that I have changed the package
11:42:00FromGitter<alehander42> thats not really realistic
11:42:04FromGitter<alehander42> in a normal ecosystem
11:42:08FromGitter<alehander42> most users are not lib authors
11:42:14FromDiscord<arnetheduck> well, semver is a great social tool, I'm a big fan. it's really useful in the discovery phase of finding a bunch of libraries that work well together
11:42:17FromGitter<alehander42> we cant expect them to just fork and fix their dependencies
11:42:34FromGitter<alehander42> its like xmltools
11:42:58clyybberalehander42: Most users are coders. So they should be able to fix a small breakage here and there. Also this only applies to unmaintained packages.
11:42:59FromGitter<alehander42> if it was working with 1.0 and was broken e.g. in 1.4
11:43:10FromGitter<alehander42> i come to nim, i see it doesnt work for some reason , i dont fix it, i just go to e.g. crystal or other
11:43:12*ibutra left #nim ("Textual IRC Client: www.textualapp.com")
11:43:19clyybberAnd making it easier to change foreign code doesnt have any downsides
11:43:23FromDiscord<arnetheduck> it's just that people blame it for lots of common failures when in fact the failure is elsewhere (such as in nimbles defaults that promote no versioning and global installations)
11:43:37Araqthe point of this discussion is lost on me, we have 1.0.x and 1.1.x product lines, 1.0.x is super conservative with bugfixes because we figured out that it's often the bugfixes that break your code
11:43:44*rockcavera joined #nim
11:44:13FromDiscord<arnetheduck> Araq, so is https://github.com/nim-lang/Nim/issues/12332 worthy of a fix for 1.0.2?
11:44:25*a_b_m joined #nim
11:44:30FromGitter<alehander42> clyybber thats true: its good to be able to change deps, but even if you can do it, you need to PR, do the whole merge or not thing
11:44:38FromGitter<alehander42> its much much more work than just fixing your own code
11:44:43FromGitter<alehander42> and "just maintain a new fork"
11:44:47FromGitter<alehander42> is also a lot of work
11:44:59FromGitter<alehander42> if e.g. we have n web developers using web libs
11:45:11FromGitter<alehander42> you cant expect more than 5% of them to be bothered to do this
11:45:12FromGitter<alehander42> imho
11:45:26clyybberI hope we don't get so many "web developers"
11:45:32Araqarnetheduck: interesting case, I don't know yet.
11:45:34FromDiscord<arnetheduck> I think that naturally when maintaining the fork becomes more onerous than upstreaming, people can deal with that
11:45:57FromGitter<alehander42> clyybber no elitism mate
11:46:11FromGitter<alehander42> its all just coding
11:46:40clyybberalehander42: Sorry, it wasn't meant to come of as that. But if you can't be bothered to fix issues with upgrading why upgrade at all?
11:46:41FromDiscord<arnetheduck> Araq, that's what I was referring to when I said backwards compat is tricky 😉
11:46:46FromGitter<alehander42> but its an example: e.g. it applies imo to science people or whatever
11:46:55FromGitter<alehander42> clyybber, but most people just need to do their own work
11:47:12FromGitter<alehander42> we cant expect from most people to go and fix breaking changes in third party libs all the time
11:47:14*absolutejam quit (Ping timeout: 276 seconds)
11:47:28clyybberalehander42: But it is essentially their own work. Features don't come for free. If you upgrade, be prepared to deal with the upgrade..
11:47:39*abm quit (Ping timeout: 240 seconds)
11:47:50FromGitter<alehander42> yes, but you might need some new things from the language
11:47:54clyybberalehander42: Ok yeah, but why upgrade if you don't want anything to change?
11:47:56FromGitter<alehander42> and still need to use another lib
11:48:00FromGitter<alehander42> and not all fixes are trivial ..
11:48:03FromGitter<alehander42> e.g. this xmltools
11:48:10FromGitter<alehander42> even if i have no idea what is happening
11:48:15FromGitter<alehander42> after some debugging
11:48:26FromGitter<alehander42> it can easily take a day or more
11:48:31FromGitter<alehander42> for some things
11:48:58FromGitter<alehander42> its just very useful to be able to somehow uprgade to a.n + 1 but keep using this a.0 package
11:48:59FromDiscord<arnetheduck> alehander42 - you just explained why smaller libs / stdlib make sense: if you need feature X from A, you ideally want to upgrade A without B, C, D...
11:49:10FromGitter<alehander42> yes
11:49:47FromGitter<alehander42> and this might just mean that the compiler compiles a package code with a switch somehow differently than the main code using it or something
11:49:54FromGitter<alehander42> i dont know, but it still sounds useful
11:50:08FromDiscord<arnetheduck> there exists a good reason to follow updates though, it's not completely clear cut: arguably, the maintainer of a library often is the best one to judge if a particular upgrade is "good" or not
11:50:27FromDiscord<arnetheduck> so semver gives a way for the author to communicate that in a discoverable way
11:50:49FromGitter<alehander42> this is also related to the "run different versions of same package" thing
11:50:58FromGitter<alehander42> but not sure if there is a solution for it currenntly
11:51:24FromGitter<alehander42> anyway, i agree that on the other hand this might not be a priority for an active ecosystem, there are different approaches to breaking
11:51:27FromGitter<alehander42> just a possible angle
11:51:34FromDiscord<arnetheduck> global switches are the devils work: what if libraries A and B that you're using require different settings? we've hit this a few times already (another reason why we avoid stdlib)
11:52:18FromGitter<alehander42> i myself like breaking changes and upgrading
11:52:46FromDiscord<arnetheduck> there exist solutions for multiple versions, nim doesn't implement them yet. they're fairly advanced problems to have 😉
11:52:49clyybberI like that too. You put a bit of effort in, but you get back new features and improvements
11:53:02FromGitter<alehander42> but i am saying that the fact i like that doesnt mean
11:53:04FromGitter<alehander42> all people do
11:53:26FromGitter<alehander42> anyway , the core team should decide it
11:53:39FromGitter<alehander42> need to debug this pipe thing..
11:53:50clyybberYesterday the main argument against any kind of breakage was companies, but as arnetheduck has told us small breakages that are easy to fix don't bother them much.
11:54:02*absolutejam joined #nim
11:54:19FromGitter<alehander42> i think different people have different arguments
11:54:43Araqwell regarding #12332, most probably the fix won't be backported
11:55:02Araq1.0.x should be *bug compatible* with 1.0.0
11:55:15FromGitter<alehander42> but should 1.1 be bug compatible
11:56:14FromGitter<alehander42> man, versioning is harder than actual lang design imo
11:56:18FromGitter<alehander42> bb
11:56:20AraqI don't know, 1.1 vs 2.0 is a silly thing.
11:57:36Araqin other words: 1.1 might have a switch for compat with 1.0 but nothing more. and now you can argue "but then it should be 2.0" and ok, whatever. 1.1 won't be a thing then, *shrug*
11:58:39federico3arnetheduck: smaller libs? hell no.
12:00:03clyybberAraq: Yesterday the conclusion was more or less that we should call current 1.1 -> 2.0 to fulfill the promise made to the community, but maybe it would be better to just change that promise.
12:00:32Araqwith our planned 'nil' changes it should be 2.0 anyway
12:01:06Araqinternally we had a discussion that came to the conclusion that "1.1" could be "additions to the tooling, but not the language"
12:02:16Araqbut IMHO x.y.z is the wrong model for most software, it should be x.y. major.patch is good enough and simpler.
12:02:37*Kaivo joined #nim
12:02:45clyybberI agree
12:03:17*couven92 quit (Ping timeout: 240 seconds)
12:03:22Araqmy Chrome is on version 76.0.3809.100 and I have no clue what this means
12:04:10clyybberlol. Well webbrowsers are in some special situation there, because of security updates and the like
12:04:34clyybberAraq: x.y.z only makes sense for Nim when y means small breaking change
12:04:35federico3clyybber: no, they are just poorly versioned
12:06:32clyybberAraq, narimiran: With the azure pipiline changes (thanks miran) there have been a few packages added to important_packages. Also this coro package, which doesn't work under 1.0 and is unmaintained since a year or so.
12:06:59clyybberCan I remove it? It makes tests red for the csize -> uint change and its broken anyways
12:07:09Araqsure
12:11:13FromDiscord<arnetheduck> > argument against any kind of breakage was companies
12:11:13FromDiscord<arnetheduck>
12:11:13FromDiscord<arnetheduck> I guess we're not a company really, but regardless, I think there are all kinds of companies that value different things - but I suspect for most, it's not breakage in and of itself that is an issue, but the lack of control if that breakage cannot be managed in a controlled way
12:16:03FromGitter<alehander42> but Araq, not nil doesnt break existing coe i think
12:16:08FromGitter<alehander42> because it just produces warnings
12:16:26FromGitter<alehander42> and errors only with switch
12:16:42Araqyeah but 'nil/may T' is new and we want to update some libs to take advantage of it
12:16:58Araqand 1.0.x doesn't understand 'may T'
12:17:01FromGitter<alehander42> maybe it changes current `not nil` behavior tho
12:17:10Araqexactly.
12:17:22FromGitter<alehander42> and btw how should we call
12:17:24FromGitter<alehander42> `not nil` now
12:17:41FromGitter<alehander42> i thinkg its strange to have `may A` and then `A not nil` (e.g.)
12:17:44FromGitter<alehander42> one is prefix, other postfix
12:17:49Araqthere is nothing wrong with "it's version 2.0 but still really, really simple to upgrade your codebase to"
12:18:01clyybber`nil REF` and `REF` and `notnil REF`?
12:18:21Araqalehander42: IMO it should be 'nil ref T'
12:18:34clyybberAraq: The question remains what to use for not nil
12:18:44Araqclyybber: nothing, it's the default
12:18:48FromGitter<alehander42> but no
12:18:54clyybberBut you may want to overwrite it in arguments
12:18:57FromGitter<alehander42> sometimes an existing api exposes only a nilable type
12:19:08FromGitter<alehander42> and you want to not nil it in some cases
12:19:15Araq?
12:19:34FromGitter<alehander42> e.g. i get a Stream which is nilable
12:19:39FromGitter<alehander42> but i want to write my own functions
12:19:43FromGitter<alehander42> acting on notnil Stream
12:19:58clyybber`type Stream = nil ref SomeThing` `proc someProc(s: notil Stream)`
12:20:02clyybberbeat me to it
12:20:03*skoude_ quit (Ping timeout: 240 seconds)
12:20:16Araqmeh, I don't think it comes up
12:20:32FromGitter<alehander42> its a valid usecase
12:20:33Mister_Magister!eval echo "i luv u all xoxo"
12:20:35NimBoti luv u all xoxo
12:21:01clyybber!eval echo "/me loves you all"
12:21:03NimBot/me loves you all
12:21:12PMunchHmm, trying to create a new Nim docker image. I created one that cloned it and built it, then copied the binaries in "bin" and the entire "lib" folder over to a new container. But trying to build anything that requires a thing from lib just fails, even if I add --lib:./lib to the build options
12:21:29FromGitter<alehander42> many people would just add `nil/may` to their types to just keep the previous behavior and the consumers of their api might still want to use those types in better ways
12:21:30Araqwell we already have 'not nil'
12:21:40FromGitter<alehander42> ok, thats one posibility
12:21:49FromGitter<alehander42> but can we somehow move it prefix
12:21:55clyybberAraq: Yeah alehander42's argument is that the one thing is prefix and the other one suffix
12:21:58FromGitter<alehander42> owned, may sink etc are all prefix
12:22:11clyybberI'd vote for notnil
12:22:34PMunchWhat do I need to set for nim to find the lib folder?
12:22:45FromGitter<alehander42> this might be even good for compat, as it additionaly makes it clear its different than the old checking
12:22:58FromGitter<alehander42> but this doesnt matter, its more of a design thing
12:27:35PMunchHmm, I'm confused, how does Nim find it's lib folder?
12:28:33clyybberPMunch: Is that a docker specific issue?
12:29:18PMunchI don't know, never tried to build Nim and copy the build over to a different machine :P
12:29:34PMunchI'm just trying to figure out how Nim finds the lib folder so I can place it in the correct spot
12:29:40PMunchOr tell Nim where to find it
12:30:33clyybberPMunch: --lib should just work: https://nim-lang.github.io/Nim/nimc.html#compiler-usage-search-path-handling
12:30:48clyybberOr do you require c libraries?
12:31:09clyybberThen you have to set --clib too
12:31:20clyybberSorry, --clibdir
12:32:29PMunchI was just testing with strutils
12:32:42PMunchNim dump shows the lib folder..
12:35:04PMunchThis is the file I'm trying: http://ix.io/1XzF
12:41:57FromGitter<zetashift> ,
12:44:55PMunch.
12:46:22*a__b__m joined #nim
12:47:43*a__b__m quit (Client Quit)
12:49:51*a_b_m quit (Ping timeout: 250 seconds)
12:53:30*vesper11 quit (Ping timeout: 244 seconds)
12:54:49*vesper11 joined #nim
12:55:33*Trustable quit (Remote host closed the connection)
12:55:42*rockcavera quit (Remote host closed the connection)
12:57:26clyybberPMunch: Hmm, I really have no idea why that wouldn't work
12:58:01clyybberNice, azure pipelines is apparently too fast for some async tests..
12:58:09clyybberThey are getting flaky
12:58:52*solitudesf- quit (Quit: Leaving)
12:59:14*solitudesf joined #nim
12:59:31*rockcavera joined #nim
12:59:40*ibutra joined #nim
12:59:42*ibutra quit (Client Quit)
12:59:51*vesper11 quit (Ping timeout: 246 seconds)
13:01:44PMunchHmm, is there a way to get the thread ID (the same thing returned by getThreadID) from a Thread[T] variable?
13:02:17*rockcavera is now known as Guest79990
13:02:17*Guest79990 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
13:02:35*tiorock joined #nim
13:02:35*tiorock quit (Changing host)
13:02:35*tiorock joined #nim
13:02:35*tiorock is now known as rockcavera
13:03:38FromGitter<alehander42> hm
13:03:40*Trustable joined #nim
13:09:53FromGitter<alehander42> it seems it should be the SysThread value
13:09:54FromGitter<alehander42> in .sys
13:09:55FromGitter<alehander42> for linux
13:10:10FromGitter<alehander42> as pthread_create etc
13:10:13FromGitter<alehander42> seems to store it there
13:10:17FromGitter<alehander42> from what i read
13:10:53PMunchEh, it's not that important. I just passed the array index instead
13:11:18FromGitter<alehander42> hm but its not the same
13:11:23FromGitter<alehander42> anyway i think you cant
13:13:01PMunchWell that is what I actually needed to know
13:13:14PMunchI just wanted to use the thread ID to find it in the array
13:14:40FromGitter<alehander42> no problem
13:14:57FromGitter<alehander42> i wonder why would read return me size > 0 < arg size
13:15:22FromGitter<alehander42> i thought when this happens the reader just somehow reads again whats left
13:15:23FromGitter<alehander42> silly me
13:17:20FromGitter<alehander42> "call to transfer the remaining bytes."
13:17:26FromGitter<alehander42> In the event of a partial write, the caller can make another write() call to transfer the remaining bytes. *
13:17:44FromGitter<alehander42> ok, one step closer to syscall 1st grade
13:23:50Zevvhehe
13:25:56FromGitter<alehander42> so i guess looping until i send all my data is fine?
13:27:11*vesper11 joined #nim
13:28:43*sammich quit (Remote host closed the connection)
13:31:06*sammich joined #nim
13:31:39*vesper11 quit (Ping timeout: 240 seconds)
13:32:19*vesper11 joined #nim
13:32:23*nsf quit (Quit: WeeChat 2.5)
13:34:11Zevvif you don't care blocking
13:34:32Zevvand of course keep an eye on errors in your loop
13:34:39FromGitter<alehander42> oh man
13:34:46FromGitter<alehander42> of course i missed two places to break
13:34:53*ehmry- joined #nim
13:34:58*ehmry left #nim (#nim)
13:35:01Zevvand if your write() returns an error
13:35:10Zevvit can by EAGAIN, which is actually not an error
13:36:18*ehmry- is now known as ehmry
13:36:18FromGitter<Clyybber> @yglukhov Hey, I made a PR to nimx for that csize -> uint thing
13:37:52*ehmry_ joined #nim
13:38:21*dddddd joined #nim
13:39:29*ehmry_ quit (Client Quit)
13:43:15PMunchHmm, fun..
13:43:34PMunchThe compiler crashes without any error and the error code 139
13:45:48*navinmis_ joined #nim
13:47:26*Romanson joined #nim
13:49:13*navinmistry quit (Ping timeout: 250 seconds)
13:49:15PMunchThis is apparently the offending line: type Task = iterator(): ptr Task {.closure.}
13:49:34PMunchJust having that in a file and trying to compile it crashes the compiler
13:50:45PMunchWith a debug build I can see what happens http://ix.io/1XA4
13:50:56PMunchApparently it's a recursion thing
13:52:10shashlick@PMunch is it possible to use your wxnim wrapper without all the dlls
13:52:15shashlickMinimal
13:52:30PMunchYeah, you can statically link against wxWidgets
13:53:00shashlickWell that's how your wrapper is setup - static
13:53:18shashlickBut it pulls in all the a files
13:53:34PMunchI don't think it is, is it?
13:53:52FromGitter<alehander42> very good find PMunch
13:53:53FromGitter<alehander42> type Task = proc(): Task
13:54:01FromGitter<alehander42> gives an ok error
13:54:09FromGitter<alehander42> type Task = proc(): ptr Task
13:54:10FromGitter<alehander42> does not
13:54:19FromGitter<alehander42> so probably a fix would catch that case as well
13:54:21PMunchYeah, it's the ptr thing that fails it..
13:54:31FromGitter<alehander42> but overally it seems it would give you a type error
13:54:35FromGitter<alehander42> even if it works :P
13:54:35PMunchSoo, this is impossible?
13:54:48FromGitter<alehander42> well .. what does it mean
13:54:56FromGitter<alehander42> a function that returns a function like it
13:55:13PMunchI want to have an iterator that can return a pointer to a new iterator (or a nil pointer)
13:55:13FromGitter<alehander42> its recursive
13:55:15*nixfreak48 joined #nim
13:55:44clyybberShould probably work
13:55:47shashlick@PMunch https://github.com/PMunch/wxnim/blob/master/wxCompile.nim#L58
13:56:11PMunchshashlick, oh right, no idea what the Windows target does :P
13:56:35PMunchAsk couven92 next time he's online, he's the one who wrote that part
13:56:41clyybberalehander42: But procs are function pointers anyway? So why should they not be allowed to be recursive?
13:56:46*nixfreak48 is now known as nixfreak_work
13:57:01shashlickSo you don't need every single lib right, only the ones you're using?
13:57:11PMunchI guess..
13:57:17nixfreak_workgood morning trying to figure out what ssl wrapper I need to get md4 to work http://rosettacode.org/wiki/MD4
13:57:47PMunchshashlick, I think I mentioned something about this in my article about the wxnim genui macro
13:57:49nixfreak_workI am using libssl.so.1.0.1 on my system , but still not working
13:57:57FromGitter<alehander42> well, thats the error currently
13:58:00PMunchNothing that would be helpful though I think
13:59:19nixfreak_workdo i need to add libssl.so to the nim.cfg ?
14:00:09shashlickIs gcc smart enough to only statically link if the lib is really needed
14:03:59FromGitter<alehander42> PMunch doesnt seem trivial to fix to me
14:04:08FromGitter<alehander42> but i agree its probably possible
14:05:03FromGitter<alehander42> you can workaround by using an object
14:05:06FromGitter<alehander42> butyeah
14:05:57PMunchAn object?
14:06:19FromGitter<alehander42> yeah, i think only objects can be recursive
14:06:26FromGitter<alehander42> and you can override `()` for them
14:06:29PMunchJust as a wrapper for the ptr Task?
14:06:49FromGitter<alehander42> or items
14:06:56FromGitter<alehander42> i mean as a wrapper for task
14:07:01FromGitter<alehander42> so if you override items
14:07:06PMunchBy the way, what I'm toying around with: http://ix.io/1XA9/nim
14:07:07FromGitter<alehander42> i guess it would act similarly to an iterator?
14:08:11FromGitter<alehander42> well you can have a field with the iterator and
14:08:18FromGitter<alehander42> return an instance of task with that field set
14:08:50PMunchCreate a bunch of tasks, then start a set amount of threads which will run the tasks, if a thread runs out of tasks, and there are no more global tasks, steal some tasks from the other threads
14:09:47FromGitter<alehander42> well, it seems a bit confusing to me to return new iterators from each
14:09:53FromGitter<alehander42> but i just have to look at it more
14:10:03PMunchYeah, that was probably a bad idea
14:10:25PMunchIt was meant to emulate how the iterators created by async returns a Future
14:10:42PMunchBut it registers the task before the Future is returned
14:10:48PMunchSo it wouldn't be the same either way
14:10:51FromGitter<alehander42> otherwise a cool idea
14:11:08FromGitter<alehander42> and a valid ICE
14:11:18PMunchICE?
14:11:31FromGitter<alehander42> with a bugfix which is not breaking !
14:11:36FromGitter<alehander42> internal compiler error
14:11:53PMunchAh
14:12:04PMunchYeah it should at least show an error :P
14:12:11PMunchBut I'm off
14:12:13*PMunch quit (Remote host closed the connection)
14:12:29FromGitter<alehander42> bbbye
14:12:29FromGitter<alehander42> which reminds me
14:12:36FromGitter<alehander42> Araq, is myProcess called
14:12:42FromGitter<alehander42> for all top statements
14:12:50FromGitter<alehander42> i assumed that it works on module by module
14:18:17FromGitter<alehander42> oh nvm i should look at xOpen
14:18:23Araqyup
14:18:24FromGitter<alehander42> not at the process functions
14:19:29*rockcavera quit (Remote host closed the connection)
14:19:46*rockcavera joined #nim
14:25:49FromGitter<alehander42> why doesnt
14:25:54FromGitter<alehander42> reset use default
14:26:00FromGitter<alehander42> in the non new runtime
14:28:21shashlick@Araq - why doesn't nimgrep search symlinks with --filenames
14:28:24FromGitter<alehander42> overally this looks a little bit problematic
14:28:27FromGitter<alehander42> in jsgen
14:28:34FromGitter<alehander42> as `null` seems to be almost like 0 for int
14:28:45FromGitter<alehander42> e.g. reset intValue => null but then
14:28:47FromGitter<alehander42> intValue + 2 works
14:28:52FromGitter<alehander42> but == and $ dont work
14:29:45FromGitter<alehander42> maybe just using genDefault for genReset in jsgen
14:29:46FromGitter<alehander42> can work
14:40:28nixfreak_workwhat openssl wrapper do I need to create say md5 or md4 ?
14:40:58nixfreak_workbut strutils is the only import , so it must be a module ?
14:54:10FromGitter<alehander42> Araq, can the compiler be parallelized somehow
14:54:16FromGitter<alehander42> i was thinking about IC
14:54:51FromGitter<alehander42> and overally, if its easy to memory-map data structures, maybe this make possible to build
14:55:09FromGitter<alehander42> independent groups of modules in the same time
14:55:58Araqshashlick: dunno, I never use symlinks
14:56:15Araqcan't be hard to change
14:56:20*navinmis_ quit (Remote host closed the connection)
14:56:37*narimiran joined #nim
15:01:12shashlickOsx brew libs are all symlinks
15:01:16shashlickDon't ask
15:06:58*couven92 joined #nim
15:07:13*absolutejam quit (Ping timeout: 250 seconds)
15:11:54*navinmistry joined #nim
15:16:19*navinmistry quit (Ping timeout: 250 seconds)
15:16:38FromGitter<awr1> @alehander42 orthagonality with `not nil` shouldn't matter too much if `not nil` syntax is getting deprecated since `not nil` will be default
15:17:49*abm joined #nim
15:18:26FromGitter<alehander42> but it shouldnt be deprecated
15:18:36FromGitter<alehander42> or at least an alternative should remain
15:19:05FromGitter<alehander42> as it doesnt matter if its the default: you can still receive a nilable type from third party
15:20:45FromGitter<awr1> why should an alternative remain? what would be the use case?
15:20:57FromGitter<alehander42> you use a lib A
15:21:05FromGitter<alehander42> it exposes only a type Stream = nilable ..
15:21:13*nsf joined #nim
15:21:17FromGitter<alehander42> you want to write your own function working with not nil Stream
15:23:05FromGitter<awr1> that would be `ref Stream[]`(I think `[]` works on types now)
15:24:29clyybberawr1: But you don't want to dereference nil?
15:24:51clyybberSo you make a proc signature with `Stream not nil`
15:24:58clyybberOr `notnil Stream`
15:25:12FromGitter<awr1> no you're "dereferencing the type" (obviously that doesn't make sense, but `Steam[]` means to get the root value type)
15:25:21FromGitter<awr1> *`Stream[]`
15:26:12clyybberBut SomeNilableStream[] != SomeStream
15:26:50FromGitter<awr1> ifi that doesn't work then i am mistaken, i thought i saw a PR for it earlier this year
15:27:48clyybberIt shouldn't work that way for nil ref at least.
15:27:56FromGitter<nixfreakz_twitter> Error: unhandled exception: FAILED: nimgen nimssl.cfg [OSError]
15:28:05FromGitter<nixfreakz_twitter> do I need to edit this file ?
15:28:19FromGitter<awr1> either way procs that take in nilable args should be able to take in not nil versions anyway
15:29:01clyybberawr1: Yes, but not the other way around.
15:29:10clyybberWhat alehander42 was trying to say is
15:29:12FromGitter<awr1> yes
15:29:17clyybberWe still need some notnil annotation
15:29:37clyybberTo overwrite the nil annotation for types like these: `Stream = nil ref`
15:30:23clyybberWell, we don't "need" it per se, but it makes sense.
15:30:32clyybbers/sense/sense to have it
15:30:42FromGitter<alehander42> we do need it
15:31:06disrupteknah, we just want it.
15:31:14FromGitter<alehander42> it would be a bad design
15:31:16FromGitter<alehander42> to not have it
15:31:22FromGitter<alehander42> it would be like 2 + 3 works
15:31:23clyybberalehander42: Technically we don't even need non-nilable refs
15:31:25FromGitter<alehander42> but 3 + 2 doesnt
15:31:33clyybberalehander42: I totally agree
15:32:02FromGitter<alehander42> well, i mean that if we have a non-nilable feature, it should be possible to use it with nilable types independently of their origin
15:32:06FromGitter<awr1> okay. suppose `Stream` was a `may ref`, like what was originally said. module A has procs that take in `Stream` args. suppose that you also could use `[]` to get root types of refs (which i'm like 90% sure at least an issue for exists). why would `ref Stream[]`not work? you get the root value type of `Stream` and then create a nilable ref to it
15:32:29FromGitter<awr1> *not-nilable ref to it
15:32:45FromGitter<alehander42> but you can already do that
15:32:47FromGitter<alehander42> that's not the problem
15:32:58FromGitter<alehander42> its enough to do if not stream.isNil
15:33:09FromGitter<alehander42> the problem is that if after that you do call(stream)
15:33:15FromGitter<alehander42> your proc call can't say that its not nil
15:33:42FromGitter<alehander42> think about the case when you define `call`
15:33:43clyybberawr1: Ah, now I understand
15:33:47FromGitter<awr1> yeahh that was the other thing i was thinking of
15:34:02FromGitter<awr1> what if your proc assigns that `Stream` to `nil`
15:34:15FromGitter<awr1> that breaks the guarantee
15:34:24FromGitter<alehander42> well it does not
15:34:24clyybberIt can't?
15:34:26FromGitter<awr1> i can't spell
15:34:33FromGitter<alehander42> we never make `Stream` itself not nil
15:34:38disruptekit's a separate type.
15:34:41FromGitter<alehander42> but we can take an argument which is `notnil Stream`
15:34:49FromGitter<alehander42> and you can't set such an arg to nil
15:34:54FromGitter<alehander42> because .. its not nil
15:35:18FromGitter<awr1> that breaks the guarantee if *it takes in a not nil argument even though expects a nilable one*
15:35:21FromGitter<awr1> at least
15:35:25FromGitter<awr1> that's the way i see it
15:35:26disrupteka better argument is whether you can have a generic modifier to constrain to `may` types.
15:35:47clyybberawr1: But that guarantee doesn't exist??
15:35:54FromGitter<alehander42> its fine to take a `not nil` argument for nilable
15:35:57clyybberBecause nilable is a superset of nonnilable
15:36:13FromGitter<alehander42> or at least thats the plan for now
15:36:24FromGitter<alehander42> disruptek example?
15:36:27FromGitter<alehander42> ah i see
15:36:35FromGitter<alehander42> i get it
15:36:52FromGitter<alehander42> e.g. if you get a may A to return may B
15:36:57FromGitter<alehander42> but otherwise A -> B
15:38:24FromGitter<alehander42> hmmmmmmmm
15:38:41clyybberHmm? I dont get it
15:38:56FromGitter<alehander42> no, i thought about what if you pass
15:39:15FromGitter<alehander42> `call(a: var may B) = a = nil`
15:39:42FromGitter<alehander42> but thats ok
15:39:47FromGitter<alehander42> because we check calls which take var
15:39:49FromGitter<awr1> this is what i'm referring to
15:39:49FromGitter<awr1> https://play.nim-lang.org/#ix=1XAM
15:39:59disruptekno, i mean `proc foo[may T](x: T)` has its own namespace versus `proc foo[T](x: T)` ...
15:40:48FromGitter<alehander42> yes @awr1 i also thought of this right now
15:40:52*navinmistry joined #nim
15:40:55FromGitter<alehander42> read my previous message
15:41:04FromGitter<awr1> ah ok
15:41:06FromGitter<alehander42> a very good example, I agree
15:41:22clyybberStatic analysis shoud catch that
15:41:28FromGitter<alehander42> so what would happen
15:41:31FromGitter<alehander42> is that yeah
15:41:47clyybberdisruptek: may should behave like a subset similar to how var behaves rn
15:41:47FromGitter<alehander42> if s is originally nilable
15:41:57FromGitter<alehander42> it just becomes nilable again
15:42:01FromGitter<alehander42> if its originally not nil
15:42:05FromGitter<alehander42> then its a warning/error indeed
15:42:28disrupteki'm not for or against the idea, i just thought it was an interesting question.
15:42:35FromGitter<alehander42> "you can't pass `a` as var: it might assign nil to it"
15:42:41clyybberdisruptek: Ah ok.
15:43:01disruptekit's kinda like a typeclass constraint.
15:43:19clyybberalehander42: But thats what we have static analysis for right?
15:43:34clyybberWhy don't we use it to ensure that it won't get assigned nil?
15:43:54FromGitter<alehander42> but .. thats what i am explaining
15:43:57FromGitter<alehander42> ahh
15:44:04FromGitter<alehander42> you mean why not check if doThing
15:44:06FromGitter<alehander42> assigns nil?
15:44:09clyybberYeah
15:44:24clyybberEven for nilable ref arguments we have to do that
15:44:45clyybberAnd then depending on if its arguments in some invocation are nilable or not error out or not.
15:44:53FromGitter<alehander42> we cant do that, no
15:44:56FromGitter<alehander42> this is not how it works
15:44:56clyybberWhy?
15:44:59FromGitter<alehander42> because we only do
15:45:02FromGitter<alehander42> local analysis
15:45:06FromGitter<alehander42> no inter procedural
15:45:13disruptekdoesn't matter
15:45:13FromGitter<alehander42> so we should depend purely
15:45:15FromGitter<alehander42> on signatures
15:45:28disruptekyou only need the cfg to do the analysis, and only locally.
15:45:37clyybberIt's still local. It just means we generate two instantiations.
15:45:47FromGitter<alehander42> i am talking
15:45:52*couven92 quit (Remote host closed the connection)
15:45:56FromGitter<alehander42> i am talking about the awr1 example
15:46:04FromGitter<alehander42> not about disruptek's
15:46:10disruptekso am i.
15:46:16FromGitter<alehander42> but this isnt how it works
15:46:19FromGitter<alehander42> if function a
15:46:21FromGitter<alehander42> calls doThing
15:46:50FromGitter<alehander42> its possible that doThing's analysis happens after it
15:47:01FromGitter<alehander42> so all you have is the type of doThing
15:48:05clyybberalehander42: I see. Shouldn't be a problem though, since you can collect all invocations of doThing until it gets analyzed
15:48:20disrupteki guess i'm confused, then. i don't see the problem.
15:48:42FromGitter<awr1> i can't find the [] on types issue
15:49:22disrupteki think you're assuming that may Stream is somehow available as Stream and i think that's wrong.
15:49:27FromGitter<alehander42> sorry
15:49:31FromGitter<alehander42> i got it now
15:49:54FromGitter<alehander42> yes, i see, so you want doThing to just generate two doThing "overloads" or something similar
15:49:58disruptekas i understand it, `may Stream` is a totally different type from `Stream`.
15:50:01FromGitter<alehander42> but this still cant work
15:50:03FromGitter<alehander42> i think
15:50:03clyybberalehander42: Yeah
15:50:09clyybberI think it can
15:50:15FromGitter<alehander42> because for this you need to first go thru doThing
15:50:35FromGitter<alehander42> and this is not generally possible imo: because you might first analyze its caller
15:50:52FromGitter<alehander42> also, what if doThing calls doThing
15:51:18FromGitter<alehander42> and overally i am not sure even if somehow possible it would make sense
15:51:20clyybberalehander42: But thats not a problem. Lets say you pass a notnil Ref to doThing, you then make it generate a new instance of itself, overloaded for notnil Refs.
15:51:32clyybberAnd then in the later step it will get analyzed
15:51:38disruptekwhen you analysis the cfg you don't need to actually execute the cfg.
15:51:43disruptekanalyze, too.
15:51:50FromGitter<alehander42> my point is
15:52:01FromGitter<alehander42> cfg works on a function basis
15:52:11FromGitter<awr1> you can do this though
15:52:12FromGitter<awr1> https://play.nim-lang.org/#ix=1XAQ
15:52:20FromGitter<awr1> w/r/t [] on types
15:52:24FromGitter<awr1> but this is dumb
15:52:35FromGitter<alehander42> you cant just create new overloads in cfg imo
15:52:45FromGitter<alehander42> and even if you could
15:52:48disrupteksomeone needs to decide if these are separate types.
15:52:51FromGitter<alehander42> you cant and you dont want to guarantee
15:52:52clyybberalehander42: It can continue working like that. We only need doThing(arg: nil ref) to count essentially as doThing(arg: nil ref | notnil ref)
15:53:00FromGitter<alehander42> byt clyybber listen to me
15:53:04FromGitter<alehander42> even if you can
15:53:08FromGitter<alehander42> then you have mutual recursion
15:53:15FromGitter<alehander42> you have a which calls b and b which calls a
15:53:29clyybberNot a problem, the type stays the same
15:53:31FromGitter<alehander42> you can't combine their cfg analysis
15:53:33FromGitter<alehander42> it doesnt
15:53:41FromGitter<alehander42> you always analyze one of them first
15:53:57FromGitter<alehander42> the first one cant possibly guess if the second one would generate a notnil overload
15:54:26clyybberBut it can, depending on wether the argument is a notnil ref type or not?
15:54:51FromGitter<alehander42> well i am talking about the var nilable
15:54:56clyybberI know
15:55:16FromGitter<alehander42> well no
15:55:18FromGitter<alehander42> it cant know
15:55:21FromGitter<alehander42> and this whole exercise is not useful imo, as if a notnil overload *is* possible, it just means the nilable one doesnt make sense
15:55:28FromGitter<alehander42> and additionally
15:55:31FromGitter<alehander42> `var notnil `
15:55:34FromGitter<alehander42> also wouldnt work
15:55:39clyybberWhy?
15:55:39FromGitter<alehander42> anyway
15:55:43FromGitter<alehander42> because we dont nilcheck var arguments
15:55:46FromGitter<alehander42> iirc
15:55:56FromGitter<alehander42> because they can be global
15:56:03FromGitter<alehander42> and each call and thing
15:56:17*LargeEpsilon quit (Ping timeout: 240 seconds)
15:56:17clyybberSo? Make it an error to pass a global to var notnil
15:56:17FromGitter<alehander42> can possibly nil them
15:56:45clyybberIt doesn't make sense to analyze globals at all.
15:56:47FromGitter<alehander42> but it can be aliased
15:56:49FromGitter<alehander42> somewhere else
15:56:52FromGitter<alehander42> we dont analyze globals
15:57:03FromGitter<alehander42> but you cant really prove aliasing
15:57:07FromGitter<alehander42> for var arguments
15:57:12FromGitter<alehander42> it can be aliased to anything
15:57:17FromGitter<alehander42> including other args
15:57:20*LargeEpsilon joined #nim
15:57:21FromGitter<alehander42> which become nil
15:57:30FromGitter<alehander42> you need a whole new aparatus
15:57:35FromGitter<alehander42> for analyzing aliasing
15:57:41clyybberHow can var alias anything?
15:57:47clyybberCan you give an example?
15:57:48FromGitter<alehander42> the var argument you pass
15:57:52FromGitter<alehander42> can be aliased to anything
15:58:00FromGitter<alehander42> and when you set that other thing to nil
15:58:08FromGitter<alehander42> your argument becomes also nil
15:58:13FromGitter<alehander42> e.g.
15:58:15FromGitter<alehander42> you have
15:58:17clyybberAh, I see
15:58:21FromGitter<alehander42> yea
15:59:22clyybberWell, that can be easily fixed by having `=`(a: var notnil ref, b: nil ref) {.error.}`
15:59:45FromGitter<alehander42> no
15:59:48FromGitter<alehander42> no
15:59:50FromGitter<alehander42> the point is
15:59:52FromGitter<alehander42> you can have
15:59:59FromGitter<alehander42> var a = refstuff
16:00:01FromGitter<alehander42> var b = a
16:00:23clyybberBut the type carries over?
16:00:48FromGitter<alehander42> the point is
16:00:56clyybberWhen a is nilable, b will be too. Meaning that an assignment like `var notNilable = b` will be illagal
16:01:02clyybber*illegal
16:01:06FromGitter<alehander42> you can have call(a: var may A, b: B)
16:01:18FromGitter<alehander42> and write b.field = nil
16:01:20FromGitter<alehander42> and bam
16:01:22FromGitter<alehander42> a becomes nil
16:01:24FromGitter<alehander42> what happened
16:01:37Araqdude
16:01:43FromGitter<alehander42> i forgot my example
16:01:45Araqwe've been through this before
16:01:51FromGitter<alehander42> yes, i am trying to explain it
16:01:56FromGitter<alehander42> but i forgot the example as always
16:02:34Araqparameters of type 'var' are not like 'let' variables
16:02:44clyybberalehander42: I think you mean `call(a: notnil A, b: B)
16:03:15clyybberBut I get your point now.
16:03:17Araqthere is nothing interesting about 'var T' parameters or globals or aliasing
16:04:19FromGitter<alehander42> hm my example was closures, but yeah it didnt work like that for closures
16:04:22FromGitter<alehander42> sorry, ok
16:04:48FromGitter<alehander42> but anyway the other point stays that call(var notnil) to call that takes nilable shouldn't work
16:04:59FromGitter<alehander42> shold warn*
16:05:02FromGitter<alehander42> bb
16:07:37disruptekanyone super familiar with cligen?
16:07:56clyybberNot super duper, but I use it
16:08:17disrupteki wanna do `command --foo but then -- --more --stuff`
16:08:30disruptekcan i do `--` somehow? any idea?
16:08:57clyybberHmm, no Idea sorry. But cblake is really helpful and active so I'd just open an issue for it.
16:09:10disruptekkk
16:09:30disruptektreeform: let me know what you've learned?
16:11:15FromGitter<kaushalmodi> disruptek: that's supported out of box
16:11:26FromGitter<kaushalmodi> Look at the cligen README
16:12:07FromGitter<kaushalmodi> I misunderstood
16:13:03FromGitter<kaushalmodi> So you mean the standalone `--`. Sorry, I also don't know (haven't looked into that)
16:15:15Zevvaraq, did you get z3 up and running, or do I need to do some work on that?
16:18:17*NimBot joined #nim
16:21:53FromGitter<Clyybber> @yglukhov Hey, I missed a thing with the previous nimx PR, since I wasn't testing on windows. I made a follow up PR: https://github.com/yglukhov/nimx/pull/378
16:25:12disruptekgolden can now benchmark the nim compiler. shashlick am i doing the libgit2 wrapper?
16:25:14dom96so, still nothing was cleared up from Araq nor narimiran
16:25:52dom96Either say "What our release article says is correct" or "I will write a new article clarifying the problems"
16:26:08FromDiscord<Lunar> So y'all know how with Tkinter, you can open a file with the Windows file explorer?
16:26:10FromDiscord<Lunar> I.e
16:26:26FromDiscord<Lunar> "Select a file to open"that the program uses?
16:26:31FromDiscord<Lunar> How can I do that with Nim?
16:26:45clyybberdisruptek: Whats golden?
16:27:20disrupteksomething i'm working on to become our version of lolbench.
16:27:39clyybberlol
16:27:41clyybberbench
16:28:01clyybberOh cool
16:28:08clyybberSo it tracks performance regressions
16:28:26disruptekyeah
16:28:49disruptekours is gonna be more compilation/runtime agnostic.
16:29:23disrupteki just pushed a demo of the compiler bench to the readme.
16:30:38clyybberawesome!
16:31:08disrupteklolbench is awesome, this is just basically a glorified shell script at the moment.
16:32:05clyybberI think you should make it possible to specify the amount of probes in cli
16:32:20clyybberBecause doing ctrl-c is bad for automated testing.
16:32:20disruptekthe longer you run it, the more it runs and the less it outputs.
16:32:51disruptekeventually, it will end when it has narrowed the error bars per your instruction.
16:32:57clyybberAh, cool
16:33:52disrupteki wanna be able to import it into my code as a macro and benchmark sections, having them integrated into the same database.
16:34:06FromDiscord<Kiloneie> Does the "break" keyword only break loops and block statements, ignoring "case" statements etc, so by using "break" inside a "case" statement nested inside a "while" loop, breaks the "while" loop ?
16:34:16disruptekit stores everything to sqlite or whatever.
16:34:27disruptekkiloneie: correct.
16:34:35FromDiscord<Kiloneie> okay
16:35:22clyybberKiloneie: You can put a case statement into a named block though, and then do `break name`
16:36:53*LargeEpsilon quit (Ping timeout: 268 seconds)
16:40:27FromDiscord<Rika> are there any plotting libraries in nim which are most recommended?
16:40:33rayman22201@Dom96 @Araq, everybody got lost in the yak shaving about the version scheme stuff, and lost the original context. Here is a recap. https://github.com/nim-lang/Nim/blob/devel/changelog.md#breaking-changes-in-the-compiler. Specifically the "implicit conversions for const". That was slated for 1.1, but Dom, me, and few others were concerned that would break the 1.1 promise. Which is "New features (which do not break
16:40:33rayman22201backwards compatibility) will continue in steadily advancing 1.x branches." Specificallly the break compatibility part.
16:41:17rayman22201changing implicit conversions obviously breaks compatibility. It's not just "adding a new feature"
16:41:30FromDiscord<Kiloneie> what is this * called ?
16:41:34rayman22201This is why Dom did this: https://github.com/nim-lang/Nim/commit/4ab9b6146b02bd707e8918aeab14ecbd5569a0b7
16:41:46rayman22201But we want your opinion @Araq
16:42:26disruptekkiloneie: it's an export decorator.
16:42:32FromDiscord<Rika> was gonna answer
16:42:35FromDiscord<Rika> darn
16:43:06FromDiscord<Kiloneie> i mean as in multiplication sign, is that correct ? or is there another name, like star ?
16:43:13disrupteksteve.
16:43:20FromDiscord<Kiloneie> i know its used for export too
16:43:28disruptekasterisk.
16:43:51FromDiscord<Rika> it's just a symbol
16:43:55FromDiscord<Rika> ah
16:44:02rayman22201the symbol is called asterisk, yeah, lol
16:44:09FromDiscord<Kiloneie> thanks
16:44:24FromDiscord<Kiloneie> Gotta use the correct terms when explaining xD...
16:44:35disruptekyou can mention that it answers to `steve`. i think that'd help.
16:44:59FromDiscord<Kiloneie> oO
16:45:14disruptekno,
16:45:19disruptekyou gotta use a really husky voice.
16:45:23disrupteklike this,
16:45:32*disruptek steeeeeeeve
16:45:55FromDiscord<Kiloneie> Pretty sure this flew over my head
16:46:15*disruptek *******************************
16:46:30clyybberKiloneie: pipe through espeak for enlightenment
16:46:59FromDiscord<Kiloneie> I pray to my hamster
16:47:22clyybberThat is laudable
16:47:56FromDiscord<Kiloneie> my hamster is a mighty octa core beasty ! Hail !
16:48:25clyybberDoes he conditions have race he?
16:49:24FromDiscord<Kiloneie> I don't speak gibberish.
16:49:46clyybberIbethevalueslocality
16:49:57disrupteki think what he's trying to say is,
16:50:07FromDiscord<Rika> praise the eeeeeeeee
16:50:07disruptekle toucan has arrived
16:50:15disruptekPRAISE
16:51:09clyybberI mean I would post it, but I also don't want to be scolded by our fellow IRC ppl
16:51:33disrupteklol
16:51:46disruptekyou can post it to offtopic. 😁
16:54:12*NimBot joined #nim
16:58:04*yumaikas has some general grumbling about db_sqlite and co, is curious why rows is a seq[string]
16:58:07*navinmis_ joined #nim
17:00:10yumaikasOr, rather, why each row is a seq[string]
17:00:38rayman22201what were you expecting it to be?
17:01:05FromGitter<zetashift> https://github.com/moigagoo/norm might be better for you depending on your needs
17:01:08*navinmistry quit (Ping timeout: 245 seconds)
17:01:16Araqyumaikas: there are nimble packages that use something else
17:02:17yumaikasrayman22201: I was expecting it to be a bit more like other database code I've uses, where you can access row data and pull it out as the underlying types
17:02:32yumaikasrow.getInt("colName"), that sort of thing
17:04:07yumaikasIt's not something hugely cricital at the moment or anything, just something that confused me for a while last night
17:04:37rayman22201Yup. db_sqlite is a bit low level. You probably want a nimble package with a higher level api
17:05:47yumaikasEh, yes and no. db_postgres also returns rows of seq[string]. I think someone is working on a nimble package that does what I'd like, but anywho
17:05:52disruptekitym it's high level.
17:06:05disruptekthe db_ stuff is high level by design.
17:06:15yumaikas^
17:06:28yumaikasI've dealth with far lower-level SQL apis
17:06:32disruptekyou can use a wrapper if you want something more direct. i think there's a lower-level nim sqlite interface, too.
17:07:22rayman22201You are being Pedantic. It doesn't do orm stuff or try to get the types. That's lower level than some other libs
17:07:41yumaikasFair enough. I am curious how seq[string] was decided on.
17:07:50disruptekwell, if you don't like my language, you can submit a pr to the manual.
17:08:10disruptek"A higher level SQLite database wrapper. This interface is implemented for other databases too."
17:08:16disruptekliterally the first line of the document.
17:08:47disrupteki am using it in golden and i'm okay with the strings, though it may make me actually port ryu.
17:09:01yumaikasI'd call it higher level as well
17:09:13yumaikasIt's not an ORM, but it's pretty high level for not being an orm
17:09:24rayman22201It's not binary. There isn't just "low level" and "high level". There are degrees
17:09:50disrupteki'm not sure `pedantic` means what you think it means.
17:09:54clyybberdisruptek: You mean https://github.com/ulfjack/ryu ?
17:10:00disruptekclyybber: yeah.
17:10:04yumaikasdisruptek: Yeah, I'm getting used to the idea myself, easy casting makes it less painful
17:10:15disruptekit's just not the priority for me.
17:10:26clyybberI was planning to do that at some point too, but I won't be mad, but interested if you manage to do it first
17:10:28disrupteki just need something simple that other tools can use.
17:10:39clyybberbbl
17:10:42rayman22201Pedantic "overly concerned with formal rules and trivial points of learning."
17:10:43disruptekclyybber: i threatened to do it months ago but i was too new to nim.
17:10:51rayman22201Stop being a troll disruptek
17:11:11disruptekyou're the one picking nits on the fact that db_sqlite is a high-level interface.
17:11:14disruptekgimme a break.
17:11:53disruptekyumaikas: yes, i see a sqlite3 wrapper in stdlib. so i guess that's a route you can take.
17:12:16yumaikasit's just something I'd keep in the back of my mind if I ever tried to use it for something that needed to be super fast. I don't have code that needs that kind of speed right now. Just a certain correctness bug in my bonnet atm, that's all
17:12:41yumaikasI do like a lot of the other parts of nim
17:14:15*nixfreak_work quit (Ping timeout: 260 seconds)
17:16:14*Trustable quit (Remote host closed the connection)
17:21:28Araqyumaikas: there are a couple of reasons behind this decision
17:22:03Araq1. it's close to what many DBs offer natively (char**)
17:22:18Araq2. it hides the number of types that the DB supports
17:23:02Araq(int? int64? decimal up to 10 places? geo coords?)
17:24:03Araq3. it's convenient when all you do is to forward the data to somewhere else (echo, log, put the data into a new query)
17:24:55AraqI also considered to use seq[JsonNode] instead but JSON doesn't support datetimes so it would be an alien representation too
17:25:45Araqbut as I said, if you disagree, use some other wrapper
17:28:46rayman22201@Araq did you see my ping earlier?
17:28:53Araqno
17:30:29rayman22201https://irclogs.nim-lang.org/04-10-2019.html#16:40:33
17:33:31Araqas I said, we know what to do with 1.0.x and probably the next version will be 2.0.x
17:33:36Araqinstead of 1.1.x
17:35:40rayman22201perfect. That is what I hoped the answer would be
17:36:21rayman22201I think Dom will be ok with that answer too
17:36:23rayman22201though I'm sure people will find reasons to disagree :-P
17:37:08*Romanson quit (Quit: Connection closed for inactivity)
17:41:00clyybberAraq: Finally, it is green: https://github.com/nim-lang/Nim/pull/12321
17:44:26rayman22201@disruptek @yumaikas: https://github.com/nim-lang/Nim/compare/devel...rayman22201:patch-1
17:44:34rayman22201thoughts?
17:45:31Zevvwell worded! :)
17:45:53disruptek+12,-0 has my vote.
17:46:05disruptekwhat we really need is docs for ormin.
17:46:25rayman22201here we go: it's a proper PR now: https://github.com/nim-lang/Nim/pull/12362
17:46:25disrupteki had to skip it because i just couldn't be bothered to learn how it worked.
17:47:10rayman22201docs for ormin would be nice. :/ I don't volunteer though, too many other plates I'm juggling atm
17:47:30leorizelooks like azure pipelines is fast \o/
17:48:11clyybberoh yeah it is
17:48:24rayman22201indeed, woot
17:48:25clyybberits much better than stupid travis :p
17:48:46clyybberor appyveyor
17:48:46*ng0 quit (Quit: Alexa, when is the end of world?)
17:49:26FromGitter<OldhamMade> hey again. according to https://github.com/nim-lang/nimble, it says nimble "currently supports installation of packages from a local directory". however, if I try `requires "../mypackage/"` it fails. am I misinterpreting that statement?
17:49:26disruptek`nimble develop` your local package.
17:50:45*NimBot joined #nim
17:50:53disruptekyes.
17:51:39disruptekgit clone some.broken.stuff; cd some.broken.stuff; nimble develop; cd ~/my.package; edit my.package.nimble; add requires "some.broken.package"; edit my.package.nim; add "import some.broken.package" ... and away you go.
17:51:54FromDiscord<Kiloneie> is there a way to unindent iv VS Code by 1 level ?
17:51:59FromDiscord<Kiloneie> a shortcut maybe ?
17:52:06disruptekintravenous vs code?
17:54:09*rockcavera quit (Remote host closed the connection)
17:55:54*theelous3 joined #nim
17:57:42FromGitter<OldhamMade> @disruptek thanks, that worked.
17:58:03FromGitter<OldhamMade> 👍
17:58:26FromDiscord<kodkuce> @Kiloneie Shift + Tab i think
17:58:43FromDiscord<kodkuce> yp
18:00:26*disruptek quit (Ping timeout: 240 seconds)
18:00:48*navinmis_ quit (Remote host closed the connection)
18:01:04*LargeEpsilon joined #nim
18:05:55*navinmistry joined #nim
18:09:45shashlick@arnetheduck had an sqlite wrapper
18:09:54shashlick@disruptek I'm already working on git2
18:10:34FromDiscord<Kiloneie> Man and i did manual un indenting in the video. i should read VS Code shortcuts i keep linking myself xD
18:11:47*rockcavera joined #nim
18:14:45shashlick@nixfreakz_twitter I think nimssl is broken
18:14:56shashlickNeeds to be updated with nimterop
18:26:21*superbia joined #nim
18:27:23Araqclyybber: ok.
18:28:09Araqclyybber: can you work on 'myfield: type = defaultValue' inside object declarations? 'defaultValue' can only a const
18:28:33Araqneeds patching of the 3 backends and some simple semantic checking
18:31:04*adeohluwa joined #nim
18:32:48*superbia quit (Quit: WeeChat 2.4)
18:33:59clyybberAraq: I wanted to do that for a long long time
18:34:11clyybberSo yeah sure
18:36:41Araqcool, thanks
18:39:59*LargeEpsilon quit (Ping timeout: 276 seconds)
18:52:42rayman22201So I have a super strange bug. working on the asyncEvent PR. About every 20 / 20 runs of this test gives a segfault: https://gist.github.com/rayman22201/e6a9dcde22e009dbd397b8755eae93d7
18:52:46rayman22201The segfault is here: https://github.com/nim-lang/Nim/blob/devel/lib/pure/ioselects/ioselectors_epoll.nim#L122
18:53:22*laaron joined #nim
18:53:39*sealmove joined #nim
18:53:49rayman22201looks like a valid file handle, and `addr data` looks like a valid pointer
18:54:43sealmoveis it possible to assign a value only if a symbol is defined?
18:55:08rayman22201@Zevv any ideas on this one?
18:55:19sealmove`if symbol exists: x = symbol`
18:55:36rayman22201@sealmove `when defined(symbol): x = symbol`
18:56:07clyybberI think its declared, not defined, right?
18:57:09sealmoverayman22201 nice, thanks
18:57:55yumaikas@Araq yeah, the more I think about it, the less I dislike that decision, but it's a strange choose at a first sniff.
18:58:06yumaikas*choice
18:58:26rayman22201@clyybber is right, it's `declared` not `defined`
18:58:37rayman22201@sealmove
18:59:12yumaikasI can think of a few cases where I'd want something that doesn't convert to string right away, but they're all performance related, and they all would imply tuning more closely to the DB beforehand
18:59:38*lmariscal quit (Quit: I'm out!)
19:00:52*lmariscal joined #nim
19:01:42*lmariscal quit (Client Quit)
19:02:54*lmariscal joined #nim
19:03:11FromDiscord<kodkuce> how do i write if char = '
19:03:34FromDiscord<kodkuce> how to write ' << " ' " or what? some escape /' ?
19:08:14rayman22201https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals
19:09:56sealmoveguys, is it possible there is a solution for this: https://play.nim-lang.org/#ix=1XC8
19:11:18*rockcavera quit (Remote host closed the connection)
19:11:53rayman22201https://play.nim-lang.org/#ix=1XC9
19:12:56sealmovewow thanks!
19:13:00FromDiscord<Kiloneie> Another tutorial boiz: https://youtu.be/atb8uY_kznc
19:14:24rayman22201🎉
19:15:00FromDiscord<Kiloneie> There are some rendering artifacts in the audio part of the video, 3-4 times o.O.
19:15:09FromDiscord<Kiloneie> I ain't fixing that <.<
19:16:58sealmovewow 11th
19:17:24FromDiscord<Kiloneie> 1 a day.
19:18:20Zevvrayman22201: is that against stock stdlib or with your PR? Can't reproduce, I get http://ix.io/1XCd
19:18:28rayman22201my PR
19:18:54rayman22201yeah, ironically, cheatfate's test doesn't even work with stock stdlib lol
19:19:12rayman22201works great with my PR, but I get this heisenbug.
19:19:23Zevvrayman/patch-1?
19:19:33rayman22201https://github.com/nim-lang/Nim/pull/12232
19:20:02Zevvrayman/VirtualAsyncEvents!
19:20:07rayman22201:-D
19:20:34dom96No more discussions about our favourite ranting topic, huh? :)
19:20:53Zevvoh that's based on pre-1.0, right, I get these nasty "unknown magic 'BitnotI64' might crash the compiler" errors again
19:20:56FromDiscord<Kiloneie> Yesterday was hot wooo
19:20:58rayman22201which one? we rant about so many things lol
19:21:43rayman22201@dom96 see here: https://irclogs.nim-lang.org/04-10-2019.html#17:28:46
19:22:17dom96ahh, I didn't see
19:22:22dom96Perfect
19:22:36dom96well, to a certain extent
19:23:09rayman22201@zevv, It has the symptoms of a race condition, but it seems to fail in the posix code, and I can't catch it in gdb soon enough to follow it down.
19:23:36FromDiscord<Kiloneie> It is healthy for mad rants to happen 😛
19:23:36rayman22201also, both other threads are sleeping. One on the join, the other on the epoll select, so IDK...
19:23:56Zevvrayman22201: Need to build my nim from scratch, new nim can't build your branch
19:24:19dom96So the situation we'll have is "Hey! Nim v1.0 is here... hey! Nim v2.0.0 is here and it breaks everything lolz"
19:24:22rayman22201bah... It's probably that stupid nimpretty merge conflict, sorry
19:24:38rayman22201I got sidetracked by this, so I wasn't able to resolve it yet
19:25:14rayman22201@dom96, I'm much more ok with that than Nim v1.0 is here! Nim 1.1 is here and it breaks everything lolz
19:25:14FromDiscord<Kiloneie> I do love the passion here.
19:25:39rayman22201at least we respect semantic versioning now
19:25:44dom96rayman22201, are you okay with nim 1.1 never being here?
19:25:55rayman22201yes
19:26:31FromDiscord<Kiloneie> nim 2.0 should be Nim on steroids, a freaking AI coding for you 😛
19:26:47rayman22201lol. yup. 🤯
19:26:51clyybberWhats the difference between MINOR and PATCH now?
19:26:59clyybberBoth will be non-breaking
19:27:00Zevvrayman22201: help me out here: /tmp/Nim/lib/pure/asyncfutures.nim(115, 60) Error: cannot instantiate Future
19:27:31rayman22201wat. You got anything more to go with that @Zevv?
19:27:55Zevvmwah wait I might be building the wrong stuff
19:28:10dom96clyybber, the difference is you get new features in MINOR
19:28:19dom96except that you won't, since apparently 2.0 is the next version
19:28:30dom96and then what? We'll have 2.1?
19:28:31*rockcavera joined #nim
19:28:45dom96but never 1.1?
19:28:55dom96I don't understand this scheme
19:29:06rayman22201PATCH = bugfix / security fix, MINOR = added new stuff without changing old stuff (well best effort to not change old stuff).
19:29:13Zevvrayman22201: good news: I crash 100% of the times
19:29:23dom96clyybber, please read semver.org
19:29:29rayman22201orly? This is great news actually @Zevv
19:29:45rayman22201why do I not crash 100% or the times? That's confusing
19:29:48clyybberdom96: I know about semver. I'm thinking if it really makes sense for nim
19:30:55rayman22201We kind of already did it though. People have been arguing about it forever, Araq finally just made the call, so we have it now, and we need to make it work.
19:31:55dom96Araq just clarified one thing
19:31:59dom96but I have more questions
19:31:59FromDiscord<Kiloneie> Wait what?
19:32:17dom96We still have tons of problems to clarify
19:32:29FromDiscord<Kiloneie> 2.0 can't be the next version, that is not a good versioning...
19:32:59dom96Don't worry, we'll follow years instead, it'll be 20.0 next /s
19:33:03rayman22201why not? It will be exactly what it says on the box. "New features that break old behavior"
19:33:17rayman222011.1 can still happen
19:33:51FromDiscord<Kiloneie> go with 1.0.0... 1.0.1 for small changes bug fixes, 1.1 minor upgrades, 2.0 should be huge
19:34:05rayman22201That's not what semver says
19:34:19clyybbersemver doesn't make sense. Why would I differntiate between feature addition and bugfix when both are nonbreaking?
19:34:35rayman22201you as an individual don't care, but companies care.
19:35:18FromDiscord<Kiloneie> you can't make the next version 2.0, took 11 years for 1.0. Nope.
19:35:39clyybberwell, companies whose managers read and praise semver care.
19:35:54dom96clyybber, because new features are more risky
19:36:00rayman22201there are a lot of companies with managers like that
19:36:02FromDiscord<kodkuce> i dont get why is it relevant if you do 1, 2 ,4 ,5 or 1.1, 1.2, 1.3 , its just numbers, if you want to really trolle it start using letters to so next v v1.two
19:36:08dom96clyybber, just because something is non-breaking in theory doesn't mean it is in practice
19:36:51dom96Here is the thing: we want developers to adopt Nim. Do you seriously think this will happen if 2.0 comes out a month after 1.0?
19:36:53*rockcavera quit (Read error: Connection reset by peer)
19:37:16*rockcavera joined #nim
19:37:25FromDiscord<Kiloneie> That would be a terrible naming scheme...
19:37:58clyybberdom96: Exactly, its a bit weird. So I say: Break the promise, reserve MAJOR for major breaking changes MINOR for minor potentially breaking changes and PATCH for nonbreaking bugfixes.
19:38:35clyybberBut both things are bad PR for companies: breaking the promise or releasing 2.0 a month after 1.0
19:38:39clyybberyou have to choose one
19:38:43FromDiscord<kodkuce> personally i think it dosent meter, and what will bi in 2.0 thats will go in a month
19:39:19rayman22201fair enough @clyybber. We already dug our grave. Now it's just finding the best way to make it work.
19:39:25clyybberHehe
19:39:37dom96No, it's not just those two choices.
19:39:37kungtotteI think you guys are way overthinking this. The Linux kernel ups its major version whenever Linus thinks the minor version gets too high, and they let the 4.x run to 4.20 for the drug related joke
19:39:46FromDiscord<kodkuce> newruntime going wild in 2.0 , or just adding already some magical braking changes ?
19:39:53kungtotteTheir PR is just fine and completely unrelated to their versioning.
19:40:04Zevvrayman22201: your p is nil in event2
19:40:10FromDiscord<Kiloneie> make it 1.1 not 2.0
19:40:30rayman22201wat!?!? it's not when I print it out in gdb
19:40:36Zevvrepr
19:40:38FromDiscord<kodkuce> personaly i like more 2 🙂
19:40:38dom96There is many different options. And I don't think it's just a case of "Araq said it's like this", there are open questions so we need to discuss it.
19:40:43rayman22201I did repr too
19:40:45rayman22201wth
19:40:48rayman22201I'm so confused
19:40:52rayman22201How
19:41:12Zevvthis is stuff with threads. I should not be doing this. I will get hurt, over and over again.
19:41:27*rockcavera quit (Read error: Connection reset by peer)
19:41:36FromDiscord<Kiloneie> @kodkuce i don't agree because 1.0 took 11 years to get, 2.0 will sound to everyone like nim just went from one awesome language to freaking godzila, and it will be a lie.
19:41:51*rockcavera joined #nim
19:42:01*rockcavera quit (Read error: Connection reset by peer)
19:42:24*rockcavera joined #nim
19:45:53*disruptek joined #nim
19:45:56rayman22201@Zevv, I have to go to lunch. I'm not sure how that is happening. thanks for your help.
19:46:02FromDiscord<kodkuce> is it a lie? its magic just people needed 11 years to figure it out
19:46:48shashlickThis whole conversation is a solved problem - best to learn from experienced projects that lasted years and got corporate support
19:46:53rayman22201@Zevv where are you printing the value of `ev.p`?
19:47:22shashlickThere are really three kinds of people - creators, maintainers and transformers
19:47:40shashlick1.1 is a maintainers mindset
19:47:43Zevvasyncdispatch.nim tirgger() line 1672 `echo ev.repr`
19:47:56Zevvjust before the dereferencing of p
19:48:03Zevvget your lunch dude
19:48:17*theelous3 quit (Ping timeout: 240 seconds)
19:48:27rayman22201must be a race condition. but I put the same exact code in the same exact spot, and don't see that
19:48:31shashlickThat's why startup guys move on once the company becomes big
19:48:46shashlickThey don't know how to maintain balance and stability
19:48:48rayman22201yeah... My wife will be angry if I'm late :-P bbl
19:49:22shashlickIt's boring for a creator but crucial for any real product
19:50:47yumaikasWhat do transformers do then?
19:51:45Araqand what am I?
19:51:59*snooptek joined #nim
19:52:39shashlickThey love to throw out the old
19:52:53shashlickLet's rewrite this from scratch
19:52:57FromDiscord<kodkuce> i want to be a transformer so i can "IT'S MORPHIN' TIME"
19:53:30shashlickNo one is 100% in any camp but it is good to know your talent
19:53:55shashlickAnd every category has the other two in it at some level
19:54:25shashlickNim wouldn't be successful if @Araq couldn't maintain
19:54:39*whaletechno joined #nim
19:54:44shashlickBut primarily you're a creator
19:55:17*thomasross quit (Ping timeout: 240 seconds)
19:55:31shashlickAnd perhaps some transformer too cause you know when to throw out bad stuff and not hoard forever
19:56:26shashlickRegardless, if anyone wants to work on 2.0, more power to you but know you still need to enable 1.x either by putting some time in it yourself or enabling others
19:58:34shashlickThe ultimate challenge is to leave space for the creators to thrive while maintainers run the routine work
19:59:20shashlickBoth are equally important, just like deprecating or rewriting when absolutely required (transforming)
20:00:08shashlickAnyway end rant - hope everyone feels empowered in this process since all points of view are legitimate and need to coexist
20:03:31*tiorock joined #nim
20:03:31*rockcavera quit (Killed (cherryh.freenode.net (Nickname regained by services)))
20:03:31*tiorock is now known as rockcavera
20:03:31*rockcavera quit (Changing host)
20:03:31*rockcavera joined #nim
20:07:03*thomasross joined #nim
20:07:28*navinmis_ joined #nim
20:08:20disruptekshashlick: git2... thanks. 😀
20:08:36disrupteklet me know if i can help with testing or w/e.
20:10:32*navinmistry quit (Ping timeout: 252 seconds)
20:12:57*navinmis_ quit (Remote host closed the connection)
20:13:28*navinmistry joined #nim
20:13:42clyybberHehe
20:14:04clyybberDamnit
20:14:23clyybberDisregard the above, got confused with my windows.
20:17:30*Vladar quit (Remote host closed the connection)
20:19:33*lmariscal quit (Quit: I'm out!)
20:20:17*sealmove quit (Quit: WeeChat 2.6)
20:23:13FromGitter<Bennyelg> Im trying to parse 1.5 mb json (parsed well in python ) ⏎ im getting ⏎ Error: invalid token: _ (\95)
20:23:18FromGitter<Bennyelg> anyidea
20:23:18FromGitter<Bennyelg> ?
20:24:28disruptekis there an underscore in there?
20:24:56*disruptek left #nim (#nim)
20:25:02*disruptek joined #nim
20:25:14FromGitter<Bennyelg> guess yes
20:25:21FromGitter<Bennyelg> what is the problem with underscore ?
20:25:56FromGitter<Bennyelg> example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d97aad30e67130aae15501e]
20:26:04FromGitter<Bennyelg> its a list of these
20:26:18disruptekthis is the spec: https://json.org/
20:27:03FromGitter<Bennyelg> ?
20:28:30FromGitter<Bennyelg> (https://files.gitter.im/nim-lang/Nim/FNYz/image.png)
20:28:44disrupteki can't read your code paste on gitter because they think advertising the viewership and their site is more important than the content.
20:29:35FromGitter<brentp> @Vindaar ggplotnim looks great! will it be able to make interactive vega plots?
20:30:11disruptekthat looks like valid json to me. is it?
20:30:59FromGitter<Bennyelg> yep its valid.. but not working
20:31:16FromGitter<Bennyelg> this guy here: https://github.com/nim-lang/Nim/issues/3938 ⏎ had the same error but nothing related to json read
20:31:53clyybberAraq: Old cis pass now too: https://github.com/nim-lang/Nim/pull/12321 . After merging this can we remove the wontfix tag from the issue?
20:32:04disruptekwell, it's working for me in nim.
20:32:09disruptekwhich version of nim are you running?
20:35:04FromGitter<Bennyelg> found the error
20:35:14disruptekomit the ,?
20:35:17FromGitter<Bennyelg> I had a _id on some type i created.
20:35:27disruptekcool.
20:35:50FromGitter<Bennyelg> type ⏎ X: = ref object ⏎ ⏎ ``` _id: int``` [https://gitter.im/nim-lang/Nim?at=5d97ad265173c33ca16bb46e]
20:36:00FromGitter<Bennyelg> _id not allowed nim i guess
20:36:11disruptekwell, i give up on reading gitter, but yes. you cannot start an identifier with an _ in nim.
20:36:23disruptekunless the identifier is _.
20:36:46*absolutejam joined #nim
20:44:44clyybberAraq: Is genObjInit the right place to do this IYO?
20:44:53*navinmistry quit (Ping timeout: 245 seconds)
20:51:48lqdev[m]@Bennyelg the general convention is to prefix your field with `f`, eg. `id` becomes `fId`
20:56:59*nsf quit (Quit: WeeChat 2.5)
20:58:13*vsantana joined #nim
20:58:36*narimiran quit (Ping timeout: 265 seconds)
20:59:25shashlickHah after that I had to take a nap
21:01:33disruptekold man.
21:02:58shashlickStill time but slow and steady
21:03:52*lf-araujo joined #nim
21:05:44FromGitter<Bennyelg> what is the flag to compile "production mode"
21:05:50FromGitter<Bennyelg> d:release changed to ?
21:06:15disruptek-d:danger is the most dangerous.
21:06:50shashlickAraq recommends --opt:speed
21:07:05FromGitter<Bennyelg> wow the -d:danger is so fast
21:07:20FromGitter<Bennyelg> checking --opt:speed
21:18:50dom96I don't suppose anyone's got an SVG reading library in Nim that's not in Nimble's repo?
21:33:10dom96shashlick, some feedback regarding nimterop's readme: it would be nice to have a step-by-step guide showing how to get a wrapper.
21:33:25dom96There is far too much text to read under "Usage" when I just want to get stuff done :)
21:34:47disruptekZevv: your performance test requires packedjson. does nimble have a way to express development or testing dependencies?
21:38:34clyybbergn8
21:38:37*clyybber quit (Quit: WeeChat 2.6)
21:41:10*adeohluwa quit (Remote host closed the connection)
21:41:46rayman22201@Zevv. you beautiful Dutch bastard. It was a race. I'm pushing a fix I would like you try shortly.
21:42:27shashlick@dom96 - noted
21:42:30shashlickwhat are you trying to wrap
21:42:36dom96resvg
21:52:25*clyybber joined #nim
21:52:44*lf-araujo quit (Ping timeout: 265 seconds)
21:53:49*lmariscal joined #nim
21:57:10*clyybber quit (Client Quit)
22:02:47*absolutejam quit (Ping timeout: 276 seconds)
22:16:23*Slagar quit (Quit: Connection closed for inactivity)
22:19:35rayman22201I just love how any code reformatting tool just completely destroys gits ability to do a merge :/
22:21:53*vsantana quit (Quit: leaving)
22:22:45*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:24:03*paxis quit (Ping timeout: 245 seconds)
22:24:15*asymptotically quit (Quit: Leaving)
22:24:41*LargeEpsilon joined #nim
22:29:32*LargeEpsilon quit (Remote host closed the connection)
22:29:49*LargeEpsilon joined #nim
22:31:21*shomodj joined #nim
22:31:24*solitudesf quit (Ping timeout: 246 seconds)
22:34:30*lf-araujo joined #nim
22:38:33*LargeEpsilon quit (Remote host closed the connection)
22:38:51*LargeEpsilon joined #nim
22:43:03*LargeEpsilon quit (Remote host closed the connection)
22:43:20*LargeEpsilon joined #nim
22:54:07*Jjp137 quit (Read error: Connection reset by peer)
22:58:23FromDiscord<Kiloneie> Has anyone tried Godot Nim for 3.1 Godot ?
22:58:47FromDiscord<exelotl> yeah, it seemed to work for me
22:59:32*LargeEpsilon quit (Remote host closed the connection)
23:00:15FromDiscord<exelotl> assuming the stub project is supposed to take you to a 3D scene with an unshaded 'capsule' object
23:01:05FromDiscord<Kiloneie> Okay i will try it out tomorrow, im bored i need something to play with when not making videos xD... will also help me for the future when i will be making videos for that, or soon idk.
23:11:17*snooptek quit (Remote host closed the connection)
23:13:15*krux02_ joined #nim
23:15:43*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:16:16*krux02 quit (Ping timeout: 264 seconds)
23:23:30*njoseph joined #nim
23:28:17*NimBot joined #nim
23:28:26*lf-araujo quit (Ping timeout: 265 seconds)
23:33:17*Jjp137 joined #nim
23:57:42rayman22201So this failure is pretty weird: https://dev.azure.com/nim-lang/Nim/_build/results?buildId=47&view=ms.vss-test-web.build-test-results-tab&runId=620&resultId=101330&paneView=debug
23:58:20rayman22201If you look at the full log, testament cuts it off, and starts another test, but the test is still going, and you see the rest of the output later on...
23:58:49rayman22201also, this does not repo on my local machine. So wth is Azure doing differently?