<< 29-05-2019 >>

00:00:07*deech quit (Remote host closed the connection)
00:00:35*deech joined #nim
00:03:47*stefanos82 quit (Remote host closed the connection)
00:19:59sealmoveare all operations on system.set O(1)?
00:20:24*lritter quit (Ping timeout: 258 seconds)
01:28:12*deech quit (Remote host closed the connection)
01:28:34*deech joined #nim
02:01:58*cyberjpn joined #nim
02:01:59*cyberjpn quit (Client Quit)
02:02:07*banc quit (Quit: Bye)
02:04:26FromGitter<jrfondren> I believe so, but you confirm with a benchmark of sets over different range types. range[1..10], range[1..1000], range[1..10_000]
02:16:40*xet7 quit (Quit: Leaving)
02:20:31*theelous3 quit (Ping timeout: 268 seconds)
02:22:51*seerix joined #nim
02:23:34*banc joined #nim
02:44:00FromGitter<kayabaNerve> If you have a seq with a length of 5, and call `mySeq.delete(100, mySeq.len - 1)`, the seq's length becomes 100 :/
02:51:30*laaron quit (Remote host closed the connection)
02:53:42*laaron joined #nim
03:04:08*dddddd quit (Remote host closed the connection)
03:07:51leorizeAraq, narimiran: pushed a new (simpler) implementation for 32-bit testing with less unrelated bugs
03:09:57*smitop quit (Quit: Connection closed for inactivity)
03:13:23*kapilp quit (Quit: Connection closed for inactivity)
03:34:02*rnrwashere quit (Remote host closed the connection)
03:57:19*deech quit (Ping timeout: 248 seconds)
04:04:15*rnrwashere joined #nim
04:04:21*laaron quit (Remote host closed the connection)
04:04:22*cyraxjoe quit (Ping timeout: 246 seconds)
04:07:08*laaron joined #nim
04:08:41*laaron quit (Remote host closed the connection)
04:09:37*laaron joined #nim
04:12:12*jasper_ joined #nim
04:27:54*nsf joined #nim
04:35:56*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:36:33*macsek1911[m] quit (Remote host closed the connection)
04:36:36*Manny8888 quit (Read error: Connection reset by peer)
04:36:36*leorize[m] quit (Read error: Connection reset by peer)
04:36:40*spymasterd[m] quit (Remote host closed the connection)
04:36:45*lqdev[m] quit (Read error: Connection reset by peer)
04:36:45*Connor[m] quit (Read error: Connection reset by peer)
04:36:47*Cold[m] quit (Remote host closed the connection)
04:36:48*planetis[m] quit (Read error: Connection reset by peer)
04:36:48*BitPuffin quit (Read error: Connection reset by peer)
04:36:51*TheManiac[m] quit (Remote host closed the connection)
04:36:57*Demos[m] quit (Remote host closed the connection)
04:37:10*skrylar[m] quit (Read error: Connection reset by peer)
04:37:10*yglukhov[m] quit (Write error: Connection reset by peer)
04:37:10*narimiran[m] quit (Write error: Connection reset by peer)
04:37:10*GitterIntegrati4 quit (Write error: Connection reset by peer)
04:37:10*Miguelngel[m] quit (Remote host closed the connection)
04:37:10*xomachine[m] quit (Remote host closed the connection)
04:37:10*isaac[m]1 quit (Read error: Connection reset by peer)
04:37:10*gh0st[m] quit (Read error: Connection reset by peer)
04:37:10*zielmicha[m]1 quit (Remote host closed the connection)
04:37:10*k0mpjut0r quit (Write error: Broken pipe)
04:43:19*Connor[m] joined #nim
04:51:33FromGitter<Varriount> Anyone seen ryukoposting lately?
04:54:25*Senketsu quit (Quit: WeeChat 2.4)
05:01:40*Manny8888 joined #nim
05:01:40*BitPuffin joined #nim
05:01:40*Demos[m] joined #nim
05:01:40*leorize[m] joined #nim
05:01:40*k0mpjut0r joined #nim
05:01:40*isaac[m]1 joined #nim
05:01:40*gh0st[m] joined #nim
05:01:40*GitterIntegrati4 joined #nim
05:01:47*planetis[m] joined #nim
05:01:47*TheManiac[m] joined #nim
05:01:47*macsek1911[m] joined #nim
05:01:47*Cold[m] joined #nim
05:01:47*narimiran[m] joined #nim
05:01:47*spymasterd[m] joined #nim
05:01:48*zielmicha[m]1 joined #nim
05:01:48*lqdev[m] joined #nim
05:01:48*skrylar[m] joined #nim
05:01:49*yglukhov[m] joined #nim
05:01:50*xomachine[m] joined #nim
05:01:53*Miguelngel[m] joined #nim
05:14:55*narimiran joined #nim
05:24:56*leorize quit (Quit: WeeChat 2.3)
05:30:18*laaron quit (Remote host closed the connection)
05:37:11*laaron joined #nim
05:53:16*solitudesf- joined #nim
06:02:40Zevv17 april last
06:04:28*leorize_ joined #nim
06:13:32*leorize_ quit (Remote host closed the connection)
06:15:45FromGitter<alehander42> So await is not a macro but a keyword right
06:17:14Araqwrong
06:17:29leorize[m]it's not even in the keyword list
06:17:43Araqit's detected within .async
06:22:32*leorize_ joined #nim
06:23:51Zevvlib/pure/asyncmacro.nl:333
06:33:19*ShalokShalom joined #nim
06:36:03*PMunch joined #nim
06:36:46leorize_so after my new 32 bit ci got up, the error count dropped to 2 :p
06:39:51*leorize_ quit (Quit: WeeChat 2.3)
06:40:15*leorize_ joined #nim
06:41:31Araqleorize_, can you disable these 2 tests so that we can merge the PR?
06:43:42leorize_sure
06:46:01*kapilp joined #nim
06:47:15*leorize_ is now known as leorize
06:52:09*marcazar joined #nim
06:53:54narimiranleorize: one of those tests is just wrong ordering, otherwise is ok, right? and the other one?
06:58:59FromGitter<alehander42> Oh right
06:59:27FromGitter<alehander42> So in this case people can detectawait
06:59:34FromGitter<alehander42> Dot await
06:59:53FromGitter<alehander42> But I am not sure it's a better syntax honestly
07:00:00*gmpreussner quit (Quit: kthxbye)
07:02:39*krux02 joined #nim
07:04:21*gmpreussner joined #nim
07:06:55leorizenarimiran: "closureleak" <-- doesn't seem to be a nice thing
07:07:21leorizeand it's not just wrong ordering I think, the output is ridiculously large (see that barrage of newlines)
07:09:38*leorize quit (Remote host closed the connection)
07:12:55*rnrwashere quit (Remote host closed the connection)
07:15:01Araqthe newlines are a separate issue we're working on
07:28:27*leorize joined #nim
07:31:22*hoijui joined #nim
07:32:44*solitudesf- quit (Ping timeout: 258 seconds)
07:40:36*Amun_Ra quit (Ping timeout: 244 seconds)
07:42:54*Amun_Ra joined #nim
07:52:55leorizeAraq: looks like the excessive newlines leaked to 64-bit builds :/
07:54:44*laaron quit (Remote host closed the connection)
07:55:59*laaron joined #nim
08:00:38livcd custom exceptions need to be object of Exception ? i see somewhere in my old nim files ref object of Exception :O
08:03:42*hoijui quit (Remote host closed the connection)
08:06:43*couven92 joined #nim
08:10:36PMunchHmm, I'm trying to read a large list of string into my program to create an array on compile-time
08:10:53PMunchBut it doesn't seem to like staticRead("filename").splitLines()
08:23:24narimiranleorize: excessive newlines were here before, for quite some time. but we just fixed it :)
08:24:06leorizenarimiran: it's failing for my PR :p
08:24:24*ShalokShalom quit (Remote host closed the connection)
08:25:30narimiranleorize: https://github.com/nim-lang/Nim/pull/11351
08:26:03leorizeyay
08:26:05WilhelmVonWeineris there a "best practices" way to run tests in nim?
08:26:33WilhelmVonWeinerthere's a unittest module but I see in some stdlib files they end in "when isMainModule"
08:26:43leorizeAraq dislikes unittest
08:26:52leorizethat's why stdlib don't use it :p
08:27:09leorizenarimiran: aside from that one problem, 32bit is passing now :p
08:27:28livcdi wish i could just bypass windows defender
08:28:19narimiranleorize: can't you disable tests/errmsgs/twrong_at_operator.nim ? it's just the order of expected procs
08:29:07narimirangithub down for everybody or just me?
08:29:43lqdev[m]probably just you
08:29:45narimiranit's back up :)
08:30:07leorizenarimiran: disabled for 32bit then it dies for everything else
08:30:07narimiranlqdev[m]: have you seen the mentions from yesterday about you memory consumption problem?
08:30:24*clyybber joined #nim
08:30:44Araqclyybber, the '=move' stuff is getting important, want me to take over?
08:30:53lqdev[m]yes, I've just been reading through those messages
08:31:05narimiranleorize: ah, yeah, now i see i was looking at 64bit tests
08:32:04narimiranAraq: is "disabled: 32bit" a valid 'flag'? https://github.com/nim-lang/Nim/pull/11337/commits/0039e2f3a91b48cc5f11b41f4e692c79e3181884
08:32:58Araqdisabled: "32bit"
08:33:05narimiranleorize: ^
08:33:10Araqsee testament/specs.nim line 211
08:33:11leorizeit seems to work without the quotes, but sure
08:33:31Araqit's not documented well, but the code isn't overwhelming once you know it a bit :P
08:34:21PMunchUhm, Additional info: "Could not find command: \'/bin/sh\'. OS error: Bad file descriptor" [OSError]
08:34:55*stefanos82 joined #nim
08:36:19clyybberAraq: Yeah, sry, I can't seem to figure out why the tests fail
08:36:37Zevvlqdev[m] / varriount: is this helpful? https://github.com/zevv/npeg/tree/dot#grammar-graph
08:38:01clyybberAraq: Removing NilLit from movable Node kinds should not cause problems right?
08:38:50Araqclyybber, why did you introduce the nfNoConst? it's bad, I don't like it
08:39:29PMunchI'm getting a lot of these strange errors..
08:40:04clyybberAraq: Yeah, it's really WIP. I didn't want to replicate the codegen logic in injectdestructors
08:40:27PMunchAfter switching my code from spawning one thread per domain query but rather doing a set amount of threads and feeding them domain names to resolve over a channel
08:42:14*arecaceae quit (Remote host closed the connection)
08:42:33*arecaceae joined #nim
08:43:08WilhelmVonWeinerCan someone better at Nim tell me what I might be doing wrong here? https://hastebin.com/oseqatiriq.cs
08:46:05PMunchBy the way, this is the code I'm running. It works sometimes, but not always: http://ix.io/1KmD/Nim
08:47:38PMunchWilhelmVonWeiner, works fine if you change it to var q: Queue[10, int]
08:48:11PMunchThat holds for both examples
08:49:28WilhelmVonWeiner"got: <static[int literal(10)](10) but expected: <N, T>"
08:49:46WilhelmVonWeiner`var q: Queue[10, int]`
08:50:45WilhelmVonWeinernevermind
08:50:48WilhelmVonWeinerI'm an idiot
08:51:27WilhelmVonWeineri should RTFO next time...
08:52:09PMunchHaha, no worries, we've all been there
08:53:44Araqclyybber, well literals are like function calls, they always produce a fresh value that can be moved
08:54:47clyybberOk, that might be the cause of some of the problems then...
08:59:08*neceve joined #nim
09:13:22PMunchHmm, it seems like it's the creation of streams that fails: http://ix.io/1KmJ
09:16:55*abm joined #nim
09:18:32*jasper_ quit (Quit: Page closed)
09:21:41PMunchSo what would cause something like that..
09:24:17ZevvPMunch: cna you share your domain_list.txt?
09:24:49PMunchhttps://yurisk.info/domain_list.txt.gz
09:24:52PMunchIt's a pretty long list..
09:25:04PMunchGot it from here: https://yurisk.info/2010/08/14/list-of-valid-domain-names/index.html
09:25:16PMunchNot all the domains on it are still valid though
09:25:37ZevvOk, stuff is running. How long does it take to break down for you?
09:26:28PMunchIt's kinda weird, it might do a full run, or it might crash after only 20 or so
09:26:36PMunchBy the way, change that IP
09:26:42Zevvhm ok
09:26:59PMunchIt's for the DNS server that I'm testing, so dig will probably list all of those as failures
09:30:49Zevvcan't get it to crash here :/
09:31:19PMunchHmm, I think it might be my computer that's running out of file descriptors or something like that
09:31:24PMunchBut that would be strange..
09:31:30Zevvstrace
09:32:04*Vladar joined #nim
09:34:47*floppydh joined #nim
09:35:59PMunchTried to hard-code the threads count to 1, seems to still crash
09:36:13PMunchAt least that'll make strace a bit easier
09:36:48PMunchAlthough it does happen a lot less
09:37:52PMunchHmm, a snippet from the strace output: http://ix.io/1KmT
09:38:24Zevvyou need strace -f
09:42:09PMunchhttp://ix.io/1KmX
09:42:51PMunchI'm off to lunch now, back in a bit
09:54:44lqdev[m]Zevv: those graphs seem like a helpful debugging feature
09:56:17Zevvyeah, I guess so - it nicely shows complexity and relations. And everybody loves colorful graphs, so that's a pro. I'll merge it to main soon.
10:02:10Araq-d:nimv019 is a thing now
10:02:31Araqcollecting all the switches you need for a transition period form 0.19 to 0.20
10:03:17narimirana.k.a now it's even easier to ignore deprecation warnings and never fix you code :P
10:04:34Araqwell to be honest, Nim's development now outpaces the compiler's development
10:04:55FromGitter<mratsim> too fast too furious
10:04:55Araqand the Nim compiler NEEDS -d:nimOldCaseObjects
10:15:24*leorize quit (Remote host closed the connection)
10:17:37*solitudesf- joined #nim
10:18:03*leorize joined #nim
10:18:45*leorize quit (Client Quit)
10:29:27PMunchnimOldCaseObjects?
10:30:41PMunchZevv, npeg makes graphs now? Sweet!
10:31:24narimiran...only if your computer has enough RAM :P
10:31:49lqdev[m]...and you dont F up your parser like I did
10:32:24Zevvhehe
10:33:37*a_b_m joined #nim
10:36:01PMunchHmm, least helpful error message: "test.nim(52, 19) Error: type mismatch"?
10:36:16*abm quit (Ping timeout: 244 seconds)
10:36:29lqdev[m]:thinking: `you must provide a compile-time value for the discriminator 'kind' in order to prove that it's safe to initialize 'sons'.`
10:36:53lqdev[m]how do I prove that it's safe to initialize `sons`? I tried using a concept, no luck
10:37:24*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/PwaZMQDfcZkRadAyzaMlVkYA >
10:37:29leorize[m]Zevv: do you still want my email matcher?
10:37:47Zevvyes, please
10:43:36*sealmove quit (Quit: WeeChat 2.4)
10:44:40PMunchHmm, is there a type-safe way to have an array indexed by an enum?
10:45:10lqdev[m]yes, `array[low(YourEnum)..high(YourEnum), YourEnum]`
10:45:32lqdev[m]pretty repetitive but works
10:46:10lqdev[m]if you don't specify the range explicitly you won't be able to use the `high(YourEnum)` as the index
10:47:48*xet7 joined #nim
10:52:55leorize[m]Zevv: here you go: http://ix.io/1Kna
10:53:16leorize[m]please let me know once you're done w downloading it :p
10:53:56leorize[m]my stuff still hasn't been graded so... gotta limit exposure :p
10:54:33Zevvaaand its here
10:55:20Zevvghehe: NPeg: grammar too complex :)
10:56:07leorize[m]oops, can't delete it
10:56:21leorize[m]well, it's not like anyone will look for it
10:57:05leorize[m]Zevv: lol
10:59:17leorize[m]I'm pretty sure this can be optimized
10:59:40Zevvwell, I'll add some smarts to do the Right Thing - only inline if rules are "small enough"
11:00:37PMunchlqdev[m], oh, my bad. I just assumed it used the int value in that case :)
11:00:38Zevvhere you go: http://zevv.nl/div/mail.png, enjoy the view
11:01:37PMuncharray[YourEnum, int] works as well
11:03:07leorize[m]Zevv: nice :)
11:03:35leorize[m]oh and that email matcher also come w a ip matcher & domain name matcher :p
11:03:50FromGitter<data-man> @Zevv tests/performance.nim buildpatt.nim(172, 9) Error: NPeg: syntax error: {'0' .. '9', 'A' .. 'F', 'a' .. 'f'}{4} for nim-devel ?
11:04:16Zevvdata-man: have to make my train, will look in an hour or so
11:04:46FromGitter<data-man> Cool!
11:07:01Zevvoh performance.nim is simply out of date, it probable should not be in git
11:08:07leorize[m]narimiran: quoted 32bit and still failing for non 32 bit
11:08:19FromGitter<data-man> @Zevv Why? Add more benchmarks! :)
11:08:21narimiranleorize[m]: gaaah
11:09:55leorize[m]maybe should just wait until araq get that newline pr in
11:10:01FromGitter<data-man> @Zevv https://github.com/pointlander/peg/blob/master/grammars/c/c.peg can be adapted for npeg?
11:10:36*jken joined #nim
11:12:08lqdev[m]Zevv: I think you should choose a different operator than `$` for referencing captures, it conflicts with the stringify operator
11:12:26lqdev[m]If you use it in a template, it just stringifies `1`
11:13:18Zevvdata-man: not sure if you want to go there. nice toy project, but man: parsing C with a peg is pure machosism
11:13:35Zevvlqdev[m]: open for ideas. But why does it conflict?
11:14:20Zevvhehe, ment masochism but machosism is also true
11:14:26lqdev[m]it conflicts only if you use it in a template
11:15:00Zevvlqdev[m]: $1 is sugar for captures[0], which get injected
11:15:14*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/LnPVTGmKlAqGBBWJMHrarXlx >
11:15:45Zevvtry push captures[0] instead
11:15:59lqdev[m]Zevv: I know, it's just that the sugar just so happens to conflict with system.`$` in templates
11:16:11lqdev[m]already done that
11:16:37Zevvok :) I already anticipated some problems there, but not sure about alternatives. ideas?
11:17:05lqdev[m]maybe use `\` instead of `$`? like in regex backreferences?
11:17:20Zevvdoes not parse in nim
11:17:48leorize[m]Zevv: https://rosettacode.org/wiki/Compiler/lexical_analyzer#Using_stream_with_lexer_library <- try writing that in npeg :) it would be some nice advertising for Nim :p
11:17:52lqdev[m]strange, this is a valid operator character according to https://nim-lang.github.io/Nim/manual.html#lexical-analysis-operators
11:18:35lqdev[m]perhaps `<` to complement `>`?
11:20:05Zevvhmm, or just reuse >, different context so no problem there
11:23:43FromGitter<data-man> @Zevv peg.go and cpp-peglib supports Packrat parsing. Are you planning to add it?
11:25:27Zevvnope. But thats just implementation, why would that matter, from a user perspective?
11:25:58FromGitter<kaushalmodi> lqdev[m], PMunch: `array[MyEnum]` works for me. See `terminal.nim` for an example.
11:27:05PMunchWith only one type?
11:27:32PMunchI'm keeping counts for every enum, so I need my array to be array[MyEnum, int] anyways
11:28:43FromGitter<data-man> @Zevv Because the linear-time parsing :)
11:29:40Zevvnpeg is linear time. and not a memory hog, like packrat
11:31:22Zevvdata-man: brows through https://github.com/zevv/npeg/tree/master/doc if you want to know about design and alorithms used
11:32:18FromDiscord_<kodkuce> so in asynchttp serwer do i need to return after await req.respond, or it auto terminates all after
11:36:01lqdev[m]Zevv: it would be really nice if NPeg errors stored their position in the parsed text in the NPegError object
11:36:21lqdev[m]NPegException*
11:37:55FromGitter<data-man> @Zevv Thanks! I even found more doсы on arxiv.org :)
11:42:01Zevvlqdev[m]: will look into that
11:48:23FromGitter<kaushalmodi> PMunch: sorry, yes, typed in hurry over phone
11:48:58FromGitter<kaushalmodi> I meant to say that I didn't need to specify the high and low of the enum type.
11:49:26PMunchOh yeah, I already discovered that :)
11:55:48*arecaceae quit (Remote host closed the connection)
11:56:07*arecaceae joined #nim
12:22:14ZevvIs the "Warning: programResult is deprecated" from unittest caused by something I do wrong, or is this a side effect of WIP?
12:22:48*abm joined #nim
12:23:43lqdev[m]kaushalmodi: really? the last time I tried that I got an IndexError
12:25:12*nc-x joined #nim
12:25:23nc-xZevv: programResult was deprecated/removed recently
12:25:36*a_b_m quit (Ping timeout: 258 seconds)
12:26:08nc-xhttps://github.com/nim-lang/Nim/pull/11075
12:26:09*kapilp quit (Quit: Connection closed for inactivity)
12:26:37narimiranhey, nc-x! mobile version of our website should be fixed now
12:26:49Zevvnc-x: ok, so if I understand correctly that's WIP, unittest complaining is a known issue
12:27:22FromGitter<kaushalmodi> lqdev[m]: see https://scripter.co/notes/nim/#enum-length-arrays
12:27:58FromGitter<kaushalmodi> I have a small snippet there, but I have been heavily using enum indexed arrays as quick dictionaries
12:28:36nc-xnarimiran: yay!!!
12:32:29nc-xThere are other changes that can/should be made to the website IMO
12:32:45narimirannc-x: of course there are :)
12:32:49nc-xfor e.g. - the header has both learn and documentation
12:32:53nc-xthey should be merged IMO
12:33:11nc-xesp. bcos Learn also contains links to the documentation
12:33:45narimiranyeah, and other stuff could be done differently, but i guess all that will wait until some major redesign
12:34:47nc-x👍
12:34:57*nc-x quit (Quit: Page closed)
12:37:22*solitudesf- quit (Ping timeout: 272 seconds)
12:38:41*Snircle joined #nim
12:39:24*tiorock joined #nim
12:39:24*tiorock quit (Changing host)
12:39:24*tiorock joined #nim
12:39:24*rockcavera quit (Killed (kornbluth.freenode.net (Nickname regained by services)))
12:39:24*tiorock is now known as rockcavera
12:42:25*dddddd joined #nim
12:43:20FromDiscord_<kodkuce> seq are passed by ref , right?
12:44:17PMunchYes
12:44:25PMunchWell, it depends
12:44:58PMunchI think the seq itself (the count and the pointer to the data) might be passed by value IIRC
12:45:53FromGitter<alehander42> it's {Sup: {len: .., cap: ..}, data: pointer to [2, 4, 5]} afaik
12:46:03FromGitter<alehander42> but i think it changed in the new runtime
12:47:18FromDiscord_<kodkuce> ok ye, i just wanted to ask it dosent duplicated my stuff in seq 😃 was afraid for sec xD
12:48:47FromGitter<alehander42> but yeah it is generally `tySequence_qwqHTkRvwhrRyENtudHQ7g*` or similar, so seq is passed by ref
12:49:13FromGitter<mratsim> the main slowness with seq is when aliasing like let x = a -> this will allocate a complete new x by default
12:50:48FromGitter<mratsim> in general, anything that is over 3 * sizeof(pointer) is passed by pointer, and any type below is passed by copy
12:51:11Zevv3 * sizeof(float), even :)
12:51:16FromGitter<mratsim> you can enforce behaviour with {.bycopy.} or {.byref.} for FFI
12:51:32FromGitter<mratsim> sizeof(float) is always 24 bytes
12:52:05FromGitter<mratsim> sizeof(int) or sizeof(pointer) is 12 bytes on 32-bit platforms
12:53:47FromGitter<mratsim> 3*sizeof
12:57:09dom96narimiran: we shouldn't wait for a redesign to do these things
12:57:23dom96progressive improvements make a lot of sense
12:58:19narimirandom96: ok, but how would you combine documentation and learn to make just one page?
12:58:38narimiranit's not that one is a subset of the other
12:59:04dom96I don't necessarily agree that we should combine those, but if you do you could just have a learn section and a docs section?
13:00:55*lritter joined #nim
13:06:53*theelous3 joined #nim
13:11:05*al_ joined #nim
13:11:32*apodo joined #nim
13:15:39*vlad1777d joined #nim
13:20:29*deech joined #nim
13:23:50lqdev[m]Zevv: take a look at https://nim-lang.github.io/Nim/manual.html#implementation-specific-pragmas-compile-time-define-pragmas, maybe it's a thing that could be used to fix https://github.com/zevv/npeg/blob/master/src/npeg/common.nim#L5
13:24:08lqdev[m]just make those variables {.intdefine.} and problem solved
13:24:14lqdev[m]consts*
13:24:56FromDiscord_<kodkuce> hmm
13:24:58FromDiscord_<kodkuce> http://ix.io/1KnO
13:25:19FromDiscord_<kodkuce> am i retarded or i dont get his error
13:26:05narimirankodkuce give us a reproducible snippet
13:26:36narimiranbut probably you just need to add `var`: errors: var seq[string]
13:26:58narimiranand while at it, add some spaces where needed, don't be a monster
13:27:28lqdev[m]^ please
13:27:39lqdev[m]spaces improve readability
13:28:18FromDiscord_<kodkuce> proc validate_username( inputed:JsonNode, var errors:seq[string] ) =
13:28:26narimirancan you read?
13:28:51FromDiscord_<kodkuce> spaces betiwn var:type too?
13:29:14FromDiscord_<kodkuce> that looks ugly
13:29:17lqdev[m]only there, don't add spaces after ( and before )
13:29:37lqdev[m]`proc name(arg1: type1, arg2: type2)`
13:29:54narimiranproc validate_username( inputed:JsonNode, var errors:seq[string] ) --> this won't work, and i won't tell you why, you have to read what people write to you
13:30:10FromDiscord_<kodkuce> spaces xD
13:30:33FromGitter<alehander42> he meant `var: errors: var seq[string]`
13:31:01FromGitter<alehander42> narimiran, those things are easy to miss, it wasnt obvious for me that he missed the second var as well
13:31:29lqdev[m]which second var?
13:31:32narimiranthere's only one var needed, the first was part of the sentence
13:31:33FromGitter<alehander42> the only var indeed
13:31:43FromGitter<alehander42> yes but it does seem very confusing!
13:31:45*shadowbane joined #nim
13:31:48Zevvlqdev[m]: thansks, thats a good and cheap solution.
13:32:04FromGitter<alehander42> so yeah better to always wrap in ``
13:32:14FromGitter<alehander42> but sorry
13:32:16narimiran@alehander42, but he didn't even copy-pasted both of those, he just put one where he wanted
13:32:22lqdev[m]I was about to write that ^
13:32:35FromDiscord_<kodkuce> >> 14 proc validate_username(inputed: JsonNode, var errors: var seq[string]) =
13:32:51FromDiscord_<kodkuce> hmm it complins about indetation now
13:33:20*narimiran flips table
13:33:22FromGitter<alehander42> narimiran because as you see, to a person not familiar with the syntax
13:33:31FromGitter<alehander42> it seems as you say `var errors: var ..`
13:33:33FromDiscord_<kodkuce> hmm removing var infront errors removed error
13:34:30narimiranok, here is the correct sentence, hopefully:
13:34:34FromDiscord_<kodkuce> proc validate_username(inputed: JsonNode, errors: var seq[string]) = WORK I THINK
13:34:48FromGitter<alehander42> that's why i said it's good to use quotes `` normally, as otherwise you just write a mess of code & text narimiran
13:34:52narimiranbut probably you just need to add `var`. <some empty non-confusing space here> like this: `errors: var seq[string]`
13:35:08FromGitter<alehander42> yes, great
13:35:25lqdev[m]kodkuce: allow me to explain. types are defined like `arg: mods type[generic1, generic2...]`, where `arg` is the type name, `mods` are any necessary modifiers like `var` or `ref` and `generic1`, `generic2`... are generics
13:35:30FromDiscord_<kodkuce> litteraly i am confused what you all trying to tell me xD
13:35:51FromGitter<alehander42> is kuce a dog in serbian as well
13:36:13FromDiscord_<kodkuce> yep, but kodkuce means athouse
13:36:26lqdev[m]kodkuce: please read: https://nim-lang.github.io/Nim/manual.html#procedures
13:36:35FromGitter<alehander42> sorry narimiran
13:36:40FromGitter<alehander42> oh nice ok
13:36:53FromDiscord_<kodkuce> and kuce is writed as kuche , like this kuče
13:37:00narimiranlqdev[m]: don't bother, his usual reply is: "i dident read it"
13:37:39FromDiscord_<kodkuce> i did read it kinda, i just go trought it fast , mostly looking just exmaples
13:37:51narimiranlqdev[m]: i have already gave him some links and begged him to read.... but nah
13:39:57FromDiscord_<kodkuce> if i read it while i dont need it , my brain just GC marks it... I prefer learn by doing it , i learn better that way
13:40:52narimiran...as we all can see :D :D
13:42:45narimiranbasically you're "outsourcing" searching/reading documentation, so we do it and just send you direct links to the parts you need at some moment
13:44:19FromDiscord_<kodkuce> hmm, possible, tought i newer thinked that way, i dident plan to be evil to community
13:45:15FromDiscord_<kodkuce> guess i can say i am sorry, but hmm will probbaly ask again at some point xD
13:45:29lqdev[m]here's a tip: ctrl+f in the manual (or any other part of the documentation)
13:45:39FromGitter<jrfondren> just make a chart out of your documentation requests. Then, if people don't answer you, you can draw a dip in the graph and report that the Nim community is losing their touch
13:45:40FromDiscord_<kodkuce> 😃
13:46:57FromGitter<jrfondren> "as you can see from this TTFR graph, over the summer the Nim community grew less responsive and this of course is a critical period for people still testing the language out."
13:48:19WilhelmVonWeinerTemplates and macros are awesome.
13:48:29livcdemacs users raise your hands
13:48:36WilhelmVonWeinerThe documentation could be more noob-friendly but I am lobing them
14:05:02PMunchWilhelmVonWeiner, really a fantastic feature :)
14:05:04*PMunch quit (Remote host closed the connection)
14:05:45*makerj quit (Quit: Page closed)
14:11:01Zevvlqdev[m]: -> privmsg
14:12:33dom96jrfondren: before long we'll have an SLA for answering questions in IRC :)
14:12:55*elrood joined #nim
14:31:12*Senketsu joined #nim
14:31:30*nsf quit (Quit: WeeChat 2.4)
14:49:59Araqbikeshedding question: should we remove the '0.' or go for 1.0?
14:50:13WilhelmVonWeinerno, only for 2
14:50:44WilhelmVonWeinerNim 2 sounds fresh and clean, Nim 1 sounds like a Soviet ternary computer
14:51:33clyybberI really really want Setun
14:54:21AraqSetun? what does that mean?
14:54:35FromGitter<jrfondren> the big value of 1.0 is that it gives you a second first impression. So that's all I'd focus on. How good of an impression does the language make now? That's not the same thing as "how good is the language now", because people won't invest long enough to find out how good it is if they don't get a good impression of it.
14:55:41narimiran"well, they just switched from v0.20 to v20. i guess i need to wait until it is production ready at v100" :D :P
14:56:07FromGitter<jrfondren> I started using Nim not too long ago and my experience was that pretty much everything I tried to use had one or two issues with it. As in, github issues, PRs.
14:57:24FromGitter<alehander42> 1) 0 sounds better to me
14:57:45FromGitter<jrfondren> and there was that async bug that caused a simple web request to take 500ms longer than a synchronous request, if made outside of an event machine. Well that's exactly how someone would use it in exploratory or test code.
14:58:13disruptekfor this, and other reasons, i'd stick to 0.20.
14:58:26Araqdon't get me wrong, 0.20 will be 0.20
14:58:40Araqbut what comes afterwards
14:58:41disrupteki'd expect nothing less.
14:58:42FromGitter<mratsim> Will it be 1.0RC though?
14:59:14disrupteki think newruntime needs some play. it could be the major defining feature of the language that makes people sit up and take notice, decide to dig in on 1.0.
14:59:23narimiran@mratsim depending on version naming scheme :P
14:59:41FromGitter<mratsim> I mean "spiritually"
14:59:42narimiranmaybe it is 21RC :P :D
14:59:58narimiranyeah yeah, i know :) and yes, it is 1.0RC
14:59:58FromGitter<jrfondren> tires that aren't kicked will be found to be flat. I'd tie 1.0 to a "we went through stdlib and gave everything a good kick" step, so that the language won't seem broken to anyone giving it another look-over.
15:00:43Araqnewruntime aside, that's what we have been doing for years now. fixing bugs, refining stuff, improving docs
15:01:04Araqbut it never is "good enough" for v1
15:01:49narimiran@jrfondren that's good for newcomers, but what about all the existing code that it would break without x% of stdlib?
15:02:06shashlick1.0 means stability which you have already started providing with 0.19.x
15:02:24narimirandon't get me wrong, splitting the manual into 'stable' and 'experimental' part was a nice move IMO
15:06:43*rockcavera quit (Remote host closed the connection)
15:09:04*neceve quit (Remote host closed the connection)
15:09:49FromGitter<alehander42> i also dont think newruntime is very important for 1.0
15:10:10FromGitter<alehander42> a little more cleanup and 1.0 should be released imo
15:10:25Araqok, what this "little more cleanup"
15:10:31Araq*what is this
15:10:46FromGitter<alehander42> well 0.20
15:10:48FromGitter<alehander42> or something
15:10:57FromGitter<alehander42> i mean finishing the stuff that 0.20 is about
15:12:02shashlick1.0 is a commitment to stability and something everyone can agree upon and maintain so that users feel confident
15:12:25shashlicki don't think it is any particular feature or # of open issues or something
15:12:27*solitudesf- joined #nim
15:12:39Araqagreed. it's not about perfection, it's about long term stability
15:12:44*Vladar quit (Remote host closed the connection)
15:13:08shashlickit will never be perfect, but bug fixes will continue to be released
15:13:30Araqv2 will be perfect :P
15:13:42FromGitter<jrfondren> anyway Python and Perl come to mind as languages that were pretty bad until they got up in the major versions. Perl at 5.x and I hear Python 4.x will be good.
15:13:54shashlickso the question is when you are ready to accept v1.0
15:13:58narimiranshashlick: agreed about stability
15:14:34shashlickand folks shouldn't be told to use devel when they run into issues like the discussion from yesterday
15:15:21narimiranyep, 0.20 should be "blessed" so no more "devel is more stable than stable"
15:17:23shashlickin fact, the 0.20.x branch should get backports as and when so users should use it instead of devel if they want the latest and greatest stable
15:17:49*rnrwashere joined #nim
15:18:16AraqI don't know if we will continue with the backporting
15:18:43Araqthe backporting allows us to do breaking changes but we don't want more breaking changes
15:19:19narimiranwell, 0.20 --> 1.0, and then i would like to see 1.0.2, 1.0.4, etc. - bugfixes without breaking changes and without any new features
15:19:58shashlickya but what i mean is that just like folks live on devel nowadays, they should instead check out version-0-20 instead
15:20:16shashlickwe can keep backporting fixes to that branch and make releases when appropriate, just like devel
15:20:36shashlickbut people who are on the branch will get fixes right away instead of having to wait until an official release
15:20:42*floppydh quit (Quit: WeeChat 2.4)
15:20:49narimiran1.1.x, 1.2.x - new features, with as few breakings as possible
15:20:54shashlickof course, this can already be done today but we don't backport realtime
15:21:25narimiranshashlick: there were backports to 0.19 branch that somebody could have checkedout
15:21:47shashlickyes, we need to encourage that behavior
15:21:52narimiranwe had "backport devel" versions 0.19.3 and 0.19.5 for example
15:22:16narimiranwhich then became 0.19.4 and 0.19.4
15:22:21narimiran*0.19.6
15:22:54shashlickand we also have nightlies for that branch so in some sense, we already have this stability that a 1.0 would deserve
15:24:29*rnrwashere quit (Remote host closed the connection)
15:24:50FromGitter<jrfondren> what I had in mind, talking about first impressions, was something like the documentation effort. Here's a list of features, can people annotate it (and create issues) as they run through the features like someone trying out the language might. This is already a lot like a documentation effort in itself since it's what you'd do if you were testing the documentation. On second thought though, this is something that
15:24:50FromGitter... someone could just go and do on their own.
15:25:44*rockcavera joined #nim
15:26:40narimiran@jrondren i think the playground/tour stuff that PMunch is working on will be really nice for first impression and getting the feel of the language
15:28:38FromGitter<mratsim> For more flexibility we can separate versioning of Nim compiler and Nim stdlib
15:29:14FromGitter<mratsim> not sure how that could be materialized but AFAIK Nim stdlib is still in need of a cleanup while Nim compiler only needs destructors
15:29:22FromGitter<jrfondren> oh yeah. so something like a "tour of strutils" would do double duty: on the one hand it's extra tutorial documentation for strutils, on the other hand it's an assurance that people won't run into "has anyone else ever used this?" tier bugs.
15:29:24Araqha ha ha
15:29:52Araqok, the compiler is only bad at destructors, nice :-)
15:31:11*Trustable joined #nim
15:31:38FromGitter<mratsim> yeah sure :p
15:32:23FromGitter<mratsim> the other pending stuff are non-breaking AFAIK (ok maybe incremental compilation will prevent compile-time globals or something)
15:33:12AraqI'll play with alternative IRs for IC, the AST is beginning to show its age
15:33:47Araqbut this doesn't have to affect the macro system
15:34:16Araqeventually it should, what's good for compiler writers is also good for macro writers
15:35:43disruptekare exceptions changing at or before 1.0?
15:37:04disruptekif backporting won't continue, then it seems to me there is no place for a stable release, which means nim isn't ready for 1.0.
15:37:20Araqharsh words.
15:37:30disruptekfair, i think.
15:37:43shashlickwhen did anyone say backporting won't continue
15:37:47Araqwell narimiran agrees with you and he is doing the backporting
15:38:05narimiran...and he would like to continue to do them :)
15:38:05disruptekit's a decision to make; i'm just stating my opinion. no skin in this game.
15:38:42AraqI'm not sure the backporting is required when we test more and more Nimble packages, CPU archs
15:39:25disruptekstable should simply continue to get more stable. if fixes (and only fixes) aren't ported, i don't see how that can happen.
15:39:41FromDiscord_<kodkuce> hmm i am newb , but if my voice counts, is there any reason why rush for 1.0 , i mean better have a good 1.0 then fast but broken
15:39:52Araqabout exceptions, there are no plans to do change them any further.
15:40:02disruptekokay, thanks.
15:40:04Zevvwhat is the idiomatic way to get data from a custom exception in an except block? Do I need to explicitly cast?
15:40:28Araqdisruptek, why? are you pro or anti exceptions?
15:40:49Araqkodkuce: "rush for 1.0"? Nim is older than Rust...
15:41:04shashlickbackporting is the only way to provide stability that lasts
15:41:19Araqok ok ok! you win. We'll backport.
15:41:57shashlickbut i'm curious why you think more testing will give us the same stability
15:42:04shashlicksince devel changes nonstop
15:43:04Araqin my little world Nim is almost always "green" on devel and so it doesn't break any code
15:43:11*Tyresc joined #nim
15:43:19disrupteki'd like to see them fully conceptualized so that your goals (no alloc?) and mine (compile-time raises-like audit) are satisfied. i like quirky and i don't understand why it isn't either 1) the default, or 2) removed.
15:43:42FromGitter<jrfondren> I wouldn't think less of Nim if the version I had installed right now was named 1.0. It's pretty good. My bikeshedding contribution is that the value of major version changes and 1.0 especially is that it encourages people to take a second look at the language.
15:44:13Araqdisruptek, I consider it a superior alternative to -fno-exceptions
15:44:14disruptekthe idea behind backporting is that new code and features (which can introduce bugs) is minimized to the greatest possible extent.
15:44:29FromDiscord_<kodkuce> yep but on rust i think there are like 1000 people in dev team, duno my opinion is if you go 1.0 displaying it as like LTS and it shows to be buged and broken it would bring a lot people fast and drop them permanent event faster, option 2 is go 1.0 but dont say its perfect 😃
15:44:45disruptekAraq: quirky, you mean?
15:44:49Araqyes
15:46:10Araqdisruptek, to make them the default we would need something like {.important.} annotations for object fields that can only be accessed if the current exception is nil
15:46:21FromDiscord_<kodkuce> about backporting i would drop that and risk for bringing devel to perfection xD, plus i want you to work more on new runtime 😃
15:47:33disruptekwhen you consider the entire problem domain and the simplicity of a single (quirky) exception model, i think annotations are a small price to pay.
15:47:47Araqthe point is, quirky exceptions are lovely but much too experimental for v1
15:48:15disrupteknim hasn't reached 0.20 yet, though. seems like 1.0 is a future target.
15:48:18Araqso I cannot make them the default and I don't want to remove them either.
15:49:48*Trustable quit (Remote host closed the connection)
15:49:48disruptekthese innovations are what compel new users of the language to choose nim. i'm always going to support the differentiators.
15:51:10disruptekif they aren't ready for 1.0, so be it. i would wait until they are. showing off nim 1.0 with these powerful new approaches makes more sense to me than making them pillars of nim 2.0. as soon as you cut 1.0, progress will have to slow as large amounts of code become important to support going forward.
15:51:56Araqthat ship has already sailed though. Porting .async to --newruntime is an unknown amount of work
15:52:13disruptekit's fine. async is a library.
15:57:50*seerix quit (Remote host closed the connection)
16:02:22*rnrwashere joined #nim
16:02:52FromDiscord_<kodkuce> kidnap dom put him in basement and force him to rewrite it on new runtime, easy solution
16:03:59shashlickfact is you need to draw the line somewhere and release 1.0, there's no perfect timing so might as well release 1.0 as what nim has been for the last couple years
16:04:26shashlickand let that live as 1.0 for a year or two while 2.0 comes out
16:04:45FromGitter<alehander42> disruptek the problem is that nim continued adding new innovations 10 years
16:05:01FromGitter<alehander42> you're right that newruntime would be best for 1.0
16:05:12FromGitter<alehander42> but if we wait for newruntime for 1.0, other new things will appear
16:05:16FromGitter<alehander42> and so on
16:05:23narimiranspot on
16:05:32FromGitter<alehander42> and i feel that it would be similar to the way 1.0 was delayed until
16:06:08FromGitter<alehander42> otherwise i'd love to see more stuff there
16:06:26FromGitter<alehander42> but i feel we shouldn't fixate on 1.0 and it's better to let it out sooner rather than later
16:06:31*rnrwashere quit (Ping timeout: 250 seconds)
16:06:36FromGitter<alehander42> and start seeing actual pain points
16:06:40FromGitter<alehander42> from more widespread use
16:06:41disrupteknewruntime is actually the least of the problems, because the same code can run on multiple runtimes. it's just that i'd want personally want to advertise newruntime for 1.0, as the new third way killer feature...
16:06:43FromGitter<alehander42> eventually
16:07:02shashlickkiller features are an illusion
16:07:11shashlickyou want to be diligent and consistent to be stable
16:07:22shashlickit isn't exciting and cool to be stable
16:07:28shashlickbut most of the world lives in that space
16:08:06disruptekyou choose a restaurant based upon their killer tacos; you come back for their margaritas and chips, and that amazing mariachi band on tuesday nights.
16:08:28shashlickin fact, one option is to promote 0.19.x into 1.0 so it continues being stable
16:08:46Araqshashlick, that always was our plan B
16:08:48FromGitter<alehander42> but we already have --newruntime: it's just not default, right
16:08:54FromGitter<alehander42> experimental
16:08:59FromGitter<alehander42> this seems good enough to me
16:09:02FromGitter<alehander42> people can play with it
16:09:09shashlickdisruptek: you do that in your youth, going from one restaurant to the next finding the best tacos, once you are my age sitting in a large org, reality hits
16:09:25FromGitter<alehander42> and eventually it can became stable in e.g. 2.0
16:09:34narimiranshashlick: but devel has lots of goodies i don't want to live without. and i don't mean just new features, but better error messages, better docs, etc.
16:10:09disruptekyes, but i'm saying that it's the differentiators that bring you in, while it's the total package that keeps you here.
16:10:10Araqyeah, we'll release 0.20 next week (hahaha), we would have released it this week but this week has 2 holidays
16:10:41shashlickok so let me ask a different question - how long will 1.0 live?
16:11:02shashlickdoesn't matter when it comes out and what it is based on - how long will it be maintained?
16:11:19shashlick0.19.x has been maintained for 8 months now
16:11:23narimiranshashlick: i'll force the others to make it live long :)
16:11:50Araqshashlick, what do you suggest?
16:12:47shashlicki really don't know how to answer that, but will be worth seeing how other languages and frameworks do it
16:13:54FromDiscord_<kodkuce> then put 1.0 , as i remmeber linux went to 4.20 then to 5 so anyway its just a number
16:14:09FromGitter<alehander42> btw
16:14:49FromGitter<alehander42> about the runtimes: how would --newruntime affect javascript backend
16:14:57AraqPython 2 was alive for 10 years after 3 came out
16:14:59FromGitter<alehander42> code written specifically for it, would it run without problems
16:15:23FromGitter<alehander42> python2 is extremely used (and it's still alive!)
16:15:29FromGitter<alehander42> i think its a good problem to have
16:15:31narimiran...unfortunately :P
16:15:33FromDiscord_<kodkuce> in Godot they do like version 3.1 then freez 3months fixing bugs ectera
16:15:34FromGitter<alehander42> if nim has a large enough community
16:15:36disrupteki don't think python2->3 is a good model at all.
16:15:39FromGitter<jrfondren> eh and python 2 has also changed a great deal over of the course of being '2'
16:15:41shashlickubuntu lts releases are 5 years standard support
16:15:42narimirandisruptek: yep, it isn't
16:15:43FromGitter<alehander42> this means longer maintanance period
16:16:06Araqalehander42: we ignore the 'owned' annotations and compile to JS like before
16:16:51shashlicksecond question is what all will be backported - bug fixes only or non-breaking features? i think we had this conversation a while ago
16:16:57FromGitter<alehander42> my point is: in a far future, nim might drop the gc, right: but if it targets JS it would need to continue generating gc-compatible code
16:16:59disrupteki can't count the number of projects that simply died rather than get ported to python3. in fact, my amazon mws api (with like 90-100 calls) is stagnate in boto2 right now and even amazon isn't merging prs to that codebase. no mws support in boto3, either.
16:17:03FromGitter<alehander42> so what is the point in "dropping" it
16:17:37narimiranshashlick: 1.0.x bugfixes, 1.y.0 non-breaking features, 2.0 breaking stuff; no?
16:17:52disruptekhow do you define a "non-breaking feature"? what determines if it's breaking?
16:18:38FromDiscord_<kodkuce> does asynchttp implement GET argments parsing or do i have to do that manauly
16:18:45Araq"my code doesn't compile anymore" / "my code now crashes at runtime" / "my code now does something different"
16:18:48FromGitter<alehander42> changing behavior etc which would break existing code
16:18:55Araq^ definition of "breaking".
16:19:20disruptekmy point is that it's a nice idea, but it's pretty hard to pinpoint, especially when you have things like symbol collisions, etc.
16:19:24narimiranbtw, look at this: https://i.imgur.com/cuxNBrz.png - if we continue with this tempo - we'll run out of the issues!! what then?? :P :D
16:19:28FromGitter<alehander42> kodkuce don't you use jester
16:19:48FromGitter<alehander42> nim can start
16:19:57FromGitter<alehander42> shipping issues from other projects
16:20:01FromGitter<alehander42> and solving them instead
16:20:20disruptekunsustainable.
16:20:22FromGitter<alehander42> like the plastic ship industry
16:21:15Araqanyway, 10 years for Python 2, 5 years for Nim v1, I say.
16:21:42Araqbut hopefully it's not much effort to backport and we can keep v1 around without much effort
16:22:24disruptekfive years sounds like an eternity.
16:22:51shashlicki felt like 5 years too but am looking at other programming languages to see what they did at 1.0
16:24:16disruptekdoes it matter? you are the ones who have to maintain it, not them, and only you know where you are and where you may be going.
16:24:42Araqanyway, devel now has -d:nimv019 for compat with 0.19
16:25:57Araqand if new features are put under 'when defined()' we *could* work on devel, not having to maintain 2 different versions.
16:26:16Araqbut this was discussed before and it's more risky than backporting bugfixes
16:26:30Araqthe disadvantage is that many bugfixes never get backported
16:26:31shashlickyep
16:27:25shashlickwell, looking at rust, they just keep going, some .1 releases but not for long
16:27:51shashlickruby maintains for a long time and multiple in parallel
16:30:14shashlickrust also breaks stuff and it is documented in their release notes
16:30:33shashlick0.19.x is better stability than rust offers looks like
16:32:47shashlickjulia seems to have a 1.0.x and 1.1.x going in parallel, but it's quite young so not much of a metric
16:33:30AraqI think we'll simply do both, best of two worlds
16:33:37narimiranbtw, we should learn from julia's 1.0 mistake
16:33:46Zevvwhich was?
16:33:55Araqnew stuff is versionized via 'when defined' but we also backport to the v1 branch
16:34:31narimiranthey had 0.7 which was kind of 1.0rc, which had all deprecated stuff, and then they released 1.0 without those deprecated stuff
16:34:44narimiranand suddenly half of the libraries were broken!!!
16:34:48Zevvwhoa
16:34:52Araqthat's a feature :-)
16:35:09narimiran"yes, we have 1.0 out, but please use 0.7 for some more time until libraries get fixed"
16:35:36narimiranwe should remove as much deprecations from 0.20, not to repeat the same mistake
16:36:39narimirani already removed some stuff couple of months ago that was still there, which was deprecated in v0.15 or so
16:36:53Zevvfair enough, this would be the right time
16:37:05FromGitter<mratsim> Julia was broken every 0.x versions
16:37:08narimiranand of course that broke some libraries, because everybody just ignores deprecation warnings
16:37:15FromGitter<mratsim> changing too fast
16:37:22narimiransounds familiar :P
16:37:53FromGitter<mratsim> Well, as long as the "nimble directory structure that will become an error" is not enforced I don't think many lib will break :P
16:38:07narimiranhaha, yeah, that should be removed
16:38:18FromDiscord_<kodkuce> alenhander42 nah i just used asyncdisptch cuz i thinked i dont need more, anyway i can do what i want manualy whitout argument parsing cuz i have only 1 argument to take in so i can do /route?myarg=blabla
16:42:11shashlickhere's a reasonable middle ground - 2 actively maintained releases - stable with backports, devel, overlap as long as devel doesn't become stable
16:42:33shashlickso 1.0 lasts as long as devel isn't ready yet
16:42:48narimiransounds reasonable
16:43:02shashlickthat's basically 0.19.x and devel model, but will give enough time for Araq to be satisfied with 2.0
16:43:19shashlickso if it takes 3 years to make newruntime, so be it
16:43:28shashlickgives that much more stability to 1.0
16:44:05shashlickbut caveat that any stable release will be maintained X years regardless where X can be 2-5 years as decided by the community
16:44:34narimiranbtw, is this a case of premature optimization? :)
16:45:19shashlicki don't think so - the user base needs to be confident that if they pick nim, they won't be forced to move and get a known runway
16:45:50ZevvNim 1.0 LTS
16:46:12shashlickand lib writers will also know they need to support stable and not chase devel at the cost of stable
16:46:32FromDiscord_<kodkuce> so evry release 1 devs stop working on devel and start working on back-porting for that version, devs need to start multiplying fast, anyone into genetics we need to start cloning devs
16:47:37narimirankodkuce is not that complicated really. at least it wasn't for 0.19 backports.
16:48:30FromGitter<jrfondren> you'll get Nim LTS when some big company wants it and pays for it due to government contracts or such. That's how LTS happens. No need to cargo-cult it.
16:48:57shashlick2-3 years isn't LTS
16:50:40FromDiscord_<DeltaPHC> "rust also breaks stuff and it is documented in their release notes"
16:50:40FromDiscord_<DeltaPHC> Just to provide some related insight. Rust uses an 'edition system', and a policy to only backport non-breaking changes. Editions are a way to gate (user opt-in) actual breaking changes, and the compiler is able to handle various editions and also mix and match editions between dependencies. The package file specifies which edition it wants
16:50:41FromDiscord_<kodkuce> if its not coplicated then ye sure thats best way to do do 1.0 LTS
16:52:35FromDiscord_<DeltaPHC> Their edition system allows packages using, for example, 2015 edition code to depend on 2018 edition code, as long as the compiler is up to date. Avoids the ecosystem split that happened with Python 2-->3
16:53:28FromGitter<jrfondren> `{.nim2019.}`
16:53:59Zevvso, what languages did these kind of transitions *right* then?
16:54:13shashlicksounds like what Araq wanted to do with defined()
16:54:57elroodconsider that once you release 1.0 with its implicit stability promises and somebody has based a considerably complex piece of software on that, if some feature or breaking change is introduced to the language they don't agree with nim is quite likely to be forked and the community fragmented anyway, elaborate backporting plans and all discussions one could have now nonwithstanding
16:56:32*al_ quit (Quit: al_)
16:56:43*envoyt joined #nim
16:57:00*laaron quit (Remote host closed the connection)
16:57:02*rnrwashere joined #nim
16:57:10shashlickfact though is that most people don't update their compilers unless they absolutely have to
16:57:24*laaron joined #nim
16:57:28shashlickthat's why i think chasing new features does not resonate with most people
16:57:51shashlickeven going from 0.19.4 => 0.19.6 will demand a full test effort for a production level app
16:58:19FromDiscord_<DeltaPHC> In Rust, `async` and `await` are not reserved keywords in the 2015 edition, so that older code can't use it. However, they had the foresight to reserve those keywords in the 2018 edition, only that the feature has been left unimplemented until fairly recently. So, soon, 2018+ edition code will be able to get that functionality because it isn't a breaking change. 2015 doesn't get it, but their code continues to work
16:59:01shashlickwhat the release cadence and stability commitment show the user base is that nim cares for real world use cases and not just a fun testbed to experiment with cool features
17:01:36FromDiscord_<DeltaPHC> People would update their compilers if the process is really easy and their existing code doesn't break
17:02:41*rnrwashere quit (Remote host closed the connection)
17:03:41FromDiscord_<DeltaPHC> Though, I suppose that guarantee can't be made until 1.0 is nailed down
17:04:27FromGitter<jrfondren> it is easy. 0.19.4 => 0.19.6 requiring a full test effort is true by tautology: if you have super high standards, then you'll apply super high standards. In practice it's not a severe upgrade and you can just do it and not worry too much. Nim isn't a scripting language after all, so there's some obvious lag involved in updating your compiler and updating deployed apps.
17:05:15shashlickthat is an illusion - if i have a million line app, or even something smaller that bears my name, i'm not going to simply trust that my code works the same after changing the basic infrastructure
17:05:30FromGitter<jrfondren> in practice with frequent updates the annoyance will be that library authors update their minimum-required version willy-nilly.
17:05:42FromGitter<jrfondren> and that's still minor. You can clone the repo and edit it down and continue to use it.
17:07:42FromGitter<jrfondren> and, with 0.19.4 => 0.19.6, I'd ask: "do we need any of those changes? no?" and so realistically it'd be a 0.19.4 => 1.2 or such change :p
17:08:06shashlickthat i agree
17:11:07FromGitter<jrfondren> sample size of 1, and it's a small app, but this wasn't painful: https://github.com/dom96/ipsumgenera/pull/35
17:11:26FromGitter<jrfondren> nim version "five years ago" -> stable
17:12:01*Vladar joined #nim
17:12:08shashlickworking on my text editor feud - works fine on 0.19.x, doesn't build on devel since libs are broken
17:12:24shashlickand even when it did build on devel a couple months ago, there were behavioral changes
17:12:28shashlickbugs rather
17:13:20narimiranshashlick: which libs are broken on devel?
17:13:28shashlickwinim
17:13:42shashlickhttps://github.com/khchen/winim/issues/39
17:13:58*envoyt quit (Ping timeout: 246 seconds)
17:14:15narimiranok, based on the stuff written there, i think they're working on solving those
17:14:49shashlickno doubt it will get fixed, but I cannot simply assume my app will work 100% after upgrading to 0.20 - i will have to test
17:15:34*ng0 joined #nim
17:15:38Zevvdo the 'important' nimble packages get tested against devel and stable?
17:15:58shashlickonly devel right now, stable doesn't even have megatest
17:16:11narimiranbtw, for you and others on stable - now would be the best time to test devel to see if something will break in 0.20
17:16:20Zevvshashlick: but that'll change as soon as 0.20 is the new stable, right
17:16:29narimiranZevv: just devel, but once 0.20 is out, it can test both 0.20 and devel
17:16:30shashlickagreed
17:17:23ZevvMaybe this list should be advertised to the users somehow, like a "blessed" choice by the Nim community.
17:17:39ZevvI still have this problem that there's too many packages, and I never know which to choose based on nimble output alone
17:17:47narimiranZevv: there are some ideas in that direction
17:17:48Zevvbut then it's the good/bad/ugly discussion again
17:18:09shashlickwhich reminds me - @narmiran - can we add nimterop to important packages?
17:18:26Zevvyes please!
17:19:51narimiranshashlick: if nothing happens about that in the next 16 hours (tomorrow morning), please ping me to remind me
17:20:03shashlicknp
17:20:24Zevv(shashlick sets his alarm clock)
17:20:37narimiranand if there are other packages that should be included - let me know
17:21:32*leorize joined #nim
17:25:56*seerix joined #nim
17:27:01*envoyt joined #nim
17:30:48Zevvnarimiran: is `with` in there?
17:30:58ZevvI don't use it myself, but it seems to make people happy
17:31:26narimiranhere's the list: https://github.com/nim-lang/Nim/blob/devel/testament/important_packages.nim
17:31:53Zevvok, request: "with"
17:32:02*Vladar quit (Remote host closed the connection)
17:32:13narimiranok, i wrote it down. check back tomorrow morning :)
17:32:28Zevvk
17:33:37Araqbtw 0.20 is done, no more breaking changes, except for --newruntime
17:33:55Araqwhich will get =move
17:34:10Araqso you better check now against devel
17:34:37FromGitter<alehander42> you should call the article
17:34:52FromGitter<alehander42> `0.20: let's =move closer to 1.0`
17:36:22FromGitter<jrfondren> subtitle, "not including a kitchen =sink after all"
17:36:44*narimiran laughs at both
17:52:08*couven92 quit (Ping timeout: 272 seconds)
17:57:26FromGitter<rishavs> Paging Vladar!
18:07:09*NimBot joined #nim
18:18:21*sealmove joined #nim
18:28:22narimiranleorize[m]: yaaaaaaaaaay
18:28:31narimirani know what's wrong with your failing test
18:32:35*rnrwashere joined #nim
18:34:25*rnrwashere quit (Remote host closed the connection)
18:45:54*sealmove quit (Quit: WeeChat 2.4)
18:55:35Araqhttp://www.commitstrip.com/en/2018/04/23/they-never-get-anything-right/
19:05:21WilhelmVonWeinersay I have a type containing an array. Can you make a pointer in that type which points to index 0 of that array?
19:05:39WilhelmVonWeineror better yet, to a given index
19:06:43Araqaddr a[i]
19:09:16*nsf joined #nim
19:14:53WilhelmVonWeinerI get an undefined identfier, I mean inside that same type
19:16:24*laaron- joined #nim
19:17:01*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
19:23:14*rnrwashere joined #nim
19:24:01*rnrwashere quit (Remote host closed the connection)
19:24:07*rnrwashere joined #nim
19:30:03*vlad1777d quit (Ping timeout: 245 seconds)
19:33:21*narimiran quit (Remote host closed the connection)
19:35:58*rnrwashere quit (Remote host closed the connection)
19:37:54FromDiscord_<nothing to no one> is there a way to have `nimble build` automatically build the project with the javascript backend?
19:38:54*kapilp joined #nim
19:40:51*rnrwashere joined #nim
19:41:06*elrood quit (Remote host closed the connection)
19:42:57*krux02 quit (Remote host closed the connection)
19:44:40AraqI'm afraid there isn't
19:45:03*rnrwashere quit (Ping timeout: 248 seconds)
19:49:08*rnrwashere joined #nim
19:49:48FromDiscord_<DeltaPHC> WilhelmVonWeiner: This? http://ix.io/1Kq3/nim
19:50:07*lritter quit (Ping timeout: 250 seconds)
19:53:44*rnrwashere quit (Ping timeout: 272 seconds)
19:54:02FromDiscord_<DeltaPHC> Just beware of things that could invalidate that pointer. If you pass around that object by value, the array might change location, or if you decide to have a ptr into a seq, adding/removing from the seq may cause it to reallocate and move around the data
19:55:10*leorize quit (Remote host closed the connection)
19:55:39*leorize joined #nim
19:57:47*andrzejku joined #nim
20:12:27FromDiscord_<nothing to no one> Araq: Would you be willing to add a new key to nimble files that allows constraining `nimble build` to a specific backend? I'd love to try and send a PR if you're cool with a feature like that
20:15:52Araqgo ahead, I would love to have that feature too
20:16:24*abm quit (Quit: Leaving)
20:18:37shashlickif we had "before build" hook, we could use setCommand
20:18:44shashlickcan't you use a nim.cfg in the interim?
20:23:06Araqnim.cfg doesn't support setting the target either
20:25:49FromDiscord_<DeltaPHC> Build hooks/scripts (written in Nim of course) seem like a better long-term solution for making nimble more capable
20:27:29FromDiscord_<DeltaPHC> Maybe said script could have access to a build API (an object of some kind) that can tell Nimble various things
20:39:07FromDiscord_<nothing to no one> I like the idea of a build object being used for settings
20:40:25FromDiscord_<DeltaPHC> Hm. Is the `backend` key not what is desired? https://github.com/nim-lang/nimble#optional
20:40:49dom96indeed
20:40:51Araqoh! so it already exists, I had no idea :-)
20:41:07FromDiscord_<DeltaPHC> lol
20:42:10FromDiscord_<nothing to no one> Oh nice! Ty :)
20:44:11*andrzejku quit (Remote host closed the connection)
20:44:24FromGitter<jrfondren> you might add backend selection to the 'nimble init' prompts.
20:56:09*nsf quit (Quit: WeeChat 2.4)
20:59:59FromGitter<xmonader> is there any examples on async/await with select?
21:00:21FromGitter<jrfondren> the select() syscall?
21:00:26FromGitter<xmonader> yea
21:01:27FromGitter<jrfondren> https://nim-lang.github.io/Nim/selectors.html is the module to look at.
21:03:11FromGitter<xmonader> was looking for more of a shortcut, I don't want to try to glue pieces that eventually might not work from someone's experience.
21:03:17FromGitter<jrfondren> why do you care though? I've never liked select() myself, because the fd sets are undocumented, in contrast to poll(). And then epoll() has a bunch of odd features but you can treat it as a strict upgrade from poll(), as epoll() will reorder the array so that you only have to loop over fds that have events.
21:04:15FromGitter<jrfondren> https://github.com/nim-lang/Nim/blob/devel/lib/pure/selectors.nim#L322 looks like select is only supported for a few systems
21:05:20*rnrwashere joined #nim
21:05:27FromGitter<xmonader> I don't really care about select itself, more caring of the behavior. ⏎ ⏎ I've 2 sockets in my application where any of them can have data at any given time and that would trigger flow in handling the other socket ⏎ ⏎ So i can't assume the sequence ... [https://gitter.im/nim-lang/Nim?at=5ceef41682c2dc79a51adffe]
21:06:20FromGitter<jrfondren> ok, so your real concern is just using async at all I guess :)
21:06:56FromGitter<xmonader> i think that's the advocated way in nim already no?
21:07:45FromGitter<jrfondren> at a low level, what you want to do is import asyncdispatch, set up event handlers, and then start the event machine.
21:08:06FromGitter<jrfondren> https://nim-lang.github.io/Nim/asyncdispatch.html#addRead%2CAsyncFD%2CCallback for example, will call a proc whenever your socket has data to read.
21:08:58FromGitter<xmonader> I think that maybe it :) thank you
21:09:05FromGitter<jrfondren> anything you also need to keep track of that doesn't really suit the event machine (i.e., there's no way to get a selector to return with an event for it), you can manage with addTimer.
21:09:47*rnrwashere quit (Ping timeout: 248 seconds)
21:18:45*sz0 joined #nim
21:25:23*rnrwashere joined #nim
21:26:25*marcazar quit (Quit: Leaving)
21:28:37*rnrwashere quit (Remote host closed the connection)
21:28:52*rnrwashere joined #nim
21:30:37FromDiscord_<kodkuce> hmm, am using nim -jwt am getting wierd issue i think
21:32:13FromDiscord_<kodkuce> eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NTkyNTEzMzQsImFjdGl2YXRlaWQiOiI0In0.OTk4NzU3QTAxQTk4OTk5MUU3NURDMkJDQjI1Q0UzNENENzY4RDU0M0IzMDRBNzVEQ0E1MDk0Q0ZCQzdBQjA0Nw GOT THIS AS TOKEN, but when i check it on https://jwt.io/ its not working, my is longer i think or i am chking it somhow wrong, for alg i used HS256 in code like on example
21:34:37*rnrwashere quit (Remote host closed the connection)
21:35:41*rnrwashere joined #nim
21:37:44FromGitter<kdheepak> It's been a while since I looked at the nim website, and wow it looks SO NICE!
21:37:59FromGitter<kdheepak> The landing page and features page is really good :)
21:38:20Araqthanks
21:38:21FromDiscord_<kodkuce> https://pastebin.com/qgNuiSGX
21:38:41Araqkodkuce: watch out for '$' not doing what you need it to do
21:40:42FromDiscord_<kodkuce> hmm i dont think i used $ , only if it does auto for echo atoken
21:41:23FromDiscord_<kodkuce> i check will tostring
21:45:07FromDiscord_<kodkuce> hmm tryed toString too got same result, is it posible cuz i marked proc gcsafe maybe i scrwed up with gc tought i think that whya would be probbaly some crash type error
21:45:32Araqyeah it's unlikely to be GC issue
21:45:48Araqand yes 'echo' uses the $ operators
21:46:08FromDiscord_<kodkuce> echo atoken.toString()
21:46:59FromDiscord_<kodkuce> dident help
21:47:08FromDiscord_<kodkuce> anyway i go sleep now
21:47:15FromDiscord_<kodkuce> will cry tommorow xD
21:47:23FromDiscord_<kodkuce> good night all cya
21:47:37*kapilp quit (Quit: Connection closed for inactivity)
21:56:30*clyybber quit (Quit: WeeChat 2.4)
22:09:47deechJust wanted to check my understanding about macros: it looks the body of the macro gets expanded using the vm which currently implies that it has implicit access to all compile time variables/procs. Is this correct?
22:10:06deechs/it looks the/it looks like the/
22:11:01deechAlso this doesn't seem to be how templates work.
22:14:35Araqcorrect
22:16:14FromGitter<jrfondren> you might get your power with your convenience by having a macro expand to a template, as in https://gist.github.com/jrfondren/829889fe6519118a71fb1ce76386e972
22:17:22FromGitter<jrfondren> though in that specific example, I think the macro's not worth it.
22:18:48*deech quit (Ping timeout: 245 seconds)
22:26:58Araqyou can use --expandMacro:x to see the expansion of the macros named x
22:27:04Araqnew on devel
22:27:37*deech joined #nim
22:28:13Araqbtw I'll be offline the next two days
22:28:49Araqbut I'll be in a train quite some time and there is no better environment to get some coding done...
22:30:17Zevv--expandMacro:x is basically a 'echo result.repr', right?
22:30:31Araqyes
22:30:36Zevvcool
22:30:56Araqshould have done this earlier
22:31:19Zevvoh and it fully expands! My repr always expanded only 1 level still showing template calls, but this goes deeper. sweet
22:31:33dom96nice :O
22:31:56dom96Now who will write an extension to VS Code to allow me to expand a macro with a button click? :)
22:32:42*solitudesf- quit (Ping timeout: 272 seconds)
22:34:58Araqit was part of our "life improving Nim enhancements" program
22:35:35Araqtables auto-init, tables detect "illegal delete inside iteration", hashing is faster
22:35:40Araqerror messages are better
22:35:57AraqC files can have the same name as the .nim files
22:36:31Araqno more "module must be unique inside nimble package" restriction
22:36:31rayman22201all of this sounds amazing and beautiful lol
22:37:02FromGitter<jrfondren> the error message improvements are great. For example instead of 14 ambiguous $ results you'll get just the two probably-relevant results
22:41:38rayman22201FYI, update on Nim godbolt integration: I got syntax highlighting and function name demangling to work, but for some reason it can't always tie the function name to the asm label for that function. I'm not sure why and I've been trying to tweak the godbolt demangler metadata to fix it, but no luck. I also still need to figure out how to get nim into Godbolts crazy docker / shell script spaghetti code for deployment.
22:42:55*banc quit (Quit: Bye)
22:43:33*apodo quit (Ping timeout: 252 seconds)
22:44:01rayman22201I'm going on a trip for a few days also, but unfortunately I'm probably not going to have any time to work on this until I get back.
22:45:34rayman22201It's taking me too long, but I will get Nim into Godbolt damnit!
22:46:04Araqthat's the spririt!
22:46:13FromGitter<jrfondren> are there certain function names it consistently can't map to asm labels, or does the mapping sometimes succeed and sometimes fail on the same name?
22:46:37FromGitter<jrfondren> godbolt will be super helpful. I'm looking forward to it :)
22:52:49AraqI also think about --showasm:foo as a Nim compiler feature
22:53:22Araqthere is no reason only a freaking website can do it
22:53:22*rnrwashere quit (Remote host closed the connection)
22:54:41FromGitter<jrfondren> I'd like that as well.
22:55:18rayman22201Well, specifically, it has no trouble matching up the return statement (even using the implicit result var) in all cases. Then again that is pretty much some moves followed by a popFrame, so it's pretty easy. But It either can't find the asm function label at all, or it matches the the "initStackBottomWith" function. That is the most confusing case...
22:56:41rayman22201It's consistent, once a function gets matched to a certain asm segment (or not matched), it doesn't change, but I don't yet understand why it's matching the way it is.
22:59:58rayman22201There is also some caching going on that may affect it. idk. too many layers lol
23:01:50*envoyt quit (Ping timeout: 272 seconds)
23:02:11*envoyt joined #nim
23:02:16*stefanos82 quit (Remote host closed the connection)
23:03:27rayman22201If I change the order of the procs in the file, the matches get crossed. It should be using the debug info from "--passC: -g". Another reason that the output is very confusingly broken.
23:04:47xacehttp://ix.io/1HwG # is there a better way to create the corresponding `var openArray[string] matches` for regex?
23:05:38FromGitter<jrfondren> `var matches = @[]`
23:06:33FromGitter<jrfondren> nah, first off that still needs the type obviously, and also regex doesn't expand the seq for you. So better off not using a seq at all.
23:06:38xacejrfondren ?? how will it guess that its a seq[string] ?
23:06:50FromGitter<jrfondren> it doesn't. that should be `var matches: seq[string]`
23:07:10FromGitter<jrfondren> but regex will just get an IndexError with that, so the array[#, string] option is really the best.
23:07:56FromGitter<jrfondren> your segfault was probably from running it with -d:release. No bounds checking with that.
23:08:43FromGitter<jrfondren> oh wait, I assumed you were using the regex module.
23:09:00FromGitter<jrfondren> if you're using re, you can just let it prepare the matches array for you
23:09:28xacehow ?
23:11:32FromGitter<jrfondren> that's weird. why isn't this matching...
23:11:34xacewith` =~ `?
23:11:39FromGitter<jrfondren> yeah
23:13:39FromGitter<jrfondren> I'm getting no output from this though, somehow: https://gist.github.com/jrfondren/c66c29d2333d005342c7b59b8092dde0
23:14:57xacesame here
23:15:34FromGitter<jrfondren> it's finally happened. dementia at my young age. I knew that accepting the Anthrax vaccine was a bad idea.
23:16:41xaceyeah believe me i feel stupid and i recall i read in the manual that its suppose to work
23:16:55FromGitter<jrfondren> `perl -le 'print $1 if "example v22" =~ /v(\d+)$/'` prints 22 though.
23:20:14xaceill leave it with the array[1,string] version and ask the same question tomorrow when all the ducks are in the pond
23:22:15FromGitter<jrfondren> oh say it isn't so...
23:22:25FromGitter<jrfondren> !eval echo "example v22" =~ re"v"
23:22:26NimBotCompile failed: in.nim(1, 20) Error: undeclared identifier: '=~'
23:22:35FromGitter<jrfondren> !eval import re; echo "example v22" =~ re"v"
23:22:37NimBotfalse
23:22:44FromGitter<jrfondren> !eval import re; echo "example v22" =~ re".*v"
23:22:47NimBottrue
23:23:02xacewaht?
23:23:09xacedoes it want a full match?
23:23:15FromGitter<jrfondren> this is implicitly anchored to the start of the string. I never noticed because literally my only uses of `re` all started with ^ anchors.
23:24:19FromGitter<jrfondren> this isn't documented and who even wants this behavior anyway?
23:24:21xacei guess i could ^.* but it feels very unnecessarry
23:24:27rayman22201want to see something weird. This works: http://ix.io/1Hx4/nim
23:24:27xaceyeah exactly
23:25:36xaceyeah, if you ask me the current behaviour isn't desireable...
23:25:44FromGitter<jrfondren> that's not weird. that's `find` rather than `match`.
23:26:04FromGitter<jrfondren> having `match` work the way it does is acceptable I guess, but `=~` certainly shouldn't use it.
23:27:45xaceim guessing there is a point to it that im not getting, but after re-reading the manual i see my misunderstanding
23:28:12rayman22201oh I see what you are saying. `=~` using match does make sense. Match is an *equality* operator. equality works on the whole string
23:28:47FromGitter<jrfondren> anyway, for re.find, the `var matches: array[##, string]` is the best way since seq's flexiblity isn't exploited, and you got a segfault because of -d:release; without that you'd get an IndexError
23:29:25xacejrfondren: I get it now. Thank you for exploring this problem with me :)
23:29:28rayman22201internally, the re module does it as @jrfondren says.
23:29:44rayman22201https://github.com/nim-lang/Nim/blob/devel/lib/impure/re.nim#L25
23:30:01xacerayman22201: yeah I guess it makes sense, i guess i got tunnelvisioned when i used find() and missed that `=~` calls "match"
23:30:51xacejrfondren: earlier you were surprised that i was using the `re` module, what is the other module you expected? why is it recommended?
23:31:05FromGitter<jrfondren> Perl invented =~ and it doesn't have implicit anchoring. PHP AFAIK has implicit anchoring and it also has 200x other match operators like preg_ and crap because it's a horribly designed sack of garbage. Java has implicit anchoring probably out of pure contempt for anyone writing Java.
23:31:56FromGitter<jrfondren> what I would expect is a PCRE flag, like the internal ANCHORED, that I'd pass in the cosmically rare case that I wouldn't just put anchors in my own regexes.
23:33:03rayman22201lol. I do see your point.
23:36:19FromGitter<jrfondren> I can only imagine implicit anchoring as a feature intended for search boxes in UIs, so that you can pass (somewhat trusted) user input to the regex function and not get 'surprising' before like "hell" matching "shell"
23:37:15FromGitter<jrfondren> anyway I'll just add it to my list of Nim caveats. At least the Anthrax vaccine hasn't kicked in yet.
23:44:09*vlad1777d joined #nim
23:53:07FromDiscord_<Really?> Hello!
23:54:20FromDiscord_<Really?> For whatever reason, I'm having a bit of trouble with Nim. I am running tests of Nim without Nimble in the source directory (0.9.2), but after I run "bin/nim c koch" get the following error: lib/system/hti.nim(72, 11) Error: undeclared identifier: 'Cstring'
23:55:36deechI think I finally got this right! https://github.com/nim-lang/Nim/pull/11341
23:56:09deechNext up, adding variants to the VM!
23:57:03FromDiscord_<nothing to no one> That should be `cstring`, with a lowercase, right?
23:57:19FromGitter<jrfondren> @Really?, in stable nim, identifiers aren't case-insensitive on the first letter anymore, so any `Cstring` has to be `cstring`. Maybe you got hit by some transitional code on that old version.
23:57:53FromGitter<jrfondren> eh I wish github linked # issues in subjects like it does in bodies
23:58:01FromDiscord_<nothing to no one> oof, 0.9.2 seems pretty old, that's probably the issue
23:59:12FromGitter<jrfondren> cool.