<< 12-08-2018 >>

00:10:06*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:13:58*vosper joined #nim
00:22:56*ftsf joined #nim
00:45:08*wildlander quit (Quit: Konversation terminated!)
00:56:23*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:59:10*clyybber joined #nim
01:01:57*vosper joined #nim
01:07:39*clyybber quit (Quit: good night)
01:09:20*hooo_ quit (Quit: Page closed)
01:13:31*Guest23877 joined #nim
01:17:05*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:18:24*Guest23877 quit (Ping timeout: 272 seconds)
02:56:29*smt quit (Ping timeout: 260 seconds)
03:06:22*endragor joined #nim
03:14:37FromGitter<Varriount> krux02: For your AST pattern matching library, is there a way to store the pattern matching expression in an ident, so that it can be referenced from multiple places within code?
03:21:19*PrimHelios quit (Quit: Leaving)
03:29:58*dddddd quit (Remote host closed the connection)
03:33:25*e-mail joined #nim
03:33:25*e-mail quit (K-Lined)
03:43:50*leorize quit (Ping timeout: 276 seconds)
03:56:49*leorize joined #nim
03:57:18*endragor quit (Remote host closed the connection)
04:03:20*endragor joined #nim
04:04:15*endragor quit (Remote host closed the connection)
04:13:31*HYP3RBOR3A joined #nim
04:26:15*arecaceae quit (Remote host closed the connection)
04:26:33*arecaceae joined #nim
04:49:27*data-man quit (Ping timeout: 240 seconds)
05:00:36*ftsf quit (Ping timeout: 244 seconds)
05:29:52*nsf joined #nim
05:55:17*miran joined #nim
06:20:47*vosper joined #nim
06:33:48*girvo quit (Quit: Catch you later! - https://jgirvin.com)
06:44:00*ftsf joined #nim
06:48:49FromGitter<ozturkberkay> hi. Is it possible to use tab instead of space for indentation
06:50:10*alehander42_ joined #nim
06:54:00*kungtotte joined #nim
06:59:30*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:02:12Araqno. change your editor's config
07:05:07FromGitter<ozturkberkay> In VS Code, i have editor.insertSpaces enabled. is it enough? @Araq
07:06:28miranalso add `editor.tabSize: 2`
07:07:35miranto do it only for nim files, do: `"[nim]": {"editor.tabSize": 2}`
07:08:05FromGitter<ozturkberkay> this is bad :/ I loved to write with tab indentation with tab size of 44
07:08:10FromGitter<ozturkberkay> 4*
07:08:38miranyou'll get used to it, and then 4 spaces will seem like a lot
07:09:03FromGitter<ozturkberkay> > *<miran>* to do it only for nim files, do: `"[nim]": {"editor.tabSize": 2}` ⏎ Thanks a lot for this!
07:09:27miranyou're welcome :)
07:17:55*ng0 joined #nim
07:41:39*yglukhov[i] joined #nim
07:45:52*vosper joined #nim
07:56:57*Vladar joined #nim
08:03:20*gmpreussner joined #nim
08:03:57*gmpreussner_ quit (Ping timeout: 240 seconds)
08:14:03*kungtotte quit (Quit: leaving)
08:14:59*krux02 joined #nim
08:17:41*krux02 quit (Remote host closed the connection)
08:18:08*krux02 joined #nim
08:22:16*HYP3RBOR3A quit (Quit: Leaving)
08:25:53krux02ping. Is my client working?
08:26:22mirankrux02: pong
08:40:45*data-man joined #nim
08:42:11krux02thanks
09:15:41*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:18:22*^MillerBoss joined #nim
09:24:04*^MillerBoss quit (Ping timeout: 265 seconds)
09:36:57*krux02 quit (Remote host closed the connection)
09:43:14*NimBot joined #nim
09:45:14FromGitter<ozturkberkay> ```foo = "abc" ⏎ bar1 = "defDEF" ⏎ baz = "ghi" ⏎ baz1 = "jklm"``` ⏎ ⏎ Is aligning code with space like the example above a bad practice? Am I'm the only one who does this? :) [https://gitter.im/nim-lang/Nim?at=5b7001aa5b07ae730aa923b5]
09:51:40miranno, there are others who do that, but it is still bad practice :)
09:57:38*alehander42_ quit (Remote host closed the connection)
10:05:38FromGitter<ozturkberkay> It seems like we cannot call a procedure before it is declared. Is it planned to change this in the future updates or is there a reason behind this rule?
10:06:17miranyou can forward-declare if you need that
10:06:47miranand here is the example and short explanation why it won't ve changed: https://nim-lang.org/docs/tut1.html#procedures-forward-declarations
10:12:14FromGitter<dom96> Actually it might still be changed
10:12:20FromGitter<dom96> But probably not for 1.0
10:13:01FromGitter<Clyybber> Will newruntime be default in 1.0?
10:13:43FromGitter<ozturkberkay> ```code paste, see link``` ⏎ ⏎ It feels redundant because you write the decleration part twice [https://gitter.im/nim-lang/Nim?at=5b700857637ee66082dc8c3a]
10:14:35miranwhy don't you just put the last line on the top?
10:15:22FromGitter<ozturkberkay> I don't know how OOP works on Nim but i'm used to call methods inside the constructor function and then define the methods afterwards
10:15:28FromGitter<ozturkberkay> thats probably the main reason
10:16:03miranyou can change the order, but even better it might be to ditch OOP ;)
10:17:29FromGitter<ozturkberkay> Maybe :) Nim pushes me to try out new things, thats why I love it so far.
10:18:32mirani think there was some blog-post where it was explained how to do OOP nim-way, i'll try to find it
10:21:29mirani think this is it (in the first sentence there are three links to the three previous parts): http://goran.krampe.se/2014/11/30/nim-and-oo-part-iv/
10:22:20miranit was a long time ago that i have read it, i don't remember how good it is, and how someting from 2014 is applicable to nim in 2018
10:23:07FromGitter<ozturkberkay> thanks! I'll have a look at it
10:26:52miransee also the official tutorial: https://nim-lang.org/docs/tut2.html#object-oriented-programming
10:26:57*cspar quit (Ping timeout: 240 seconds)
10:29:20*gangstacat quit (Ping timeout: 256 seconds)
10:31:56*miran quit (Ping timeout: 272 seconds)
10:33:40*nsf quit (Quit: WeeChat 2.2)
10:37:43*xet7 joined #nim
10:42:19*gangstacat joined #nim
10:45:18*alehander42_ joined #nim
10:45:52*alehander42_ quit (Remote host closed the connection)
10:46:39*data-man quit (Ping timeout: 268 seconds)
10:47:28*alehander42_ joined #nim
10:59:29FromGitter<Bennyelg> Hello all, anyone here can asist with Javascript ? I am writing to frontend of my nim website and Im struggling with pagination. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b701311937eee2423086dbe]
11:04:33*data-man joined #nim
11:14:20alehander42_what's the problem tho
11:19:26*data-man quit (Ping timeout: 272 seconds)
11:20:02*smt joined #nim
11:21:20zacharycarter[m]looking for help on how to rewrite this macro using `varargs[untyped]` instead of `callsite` as I don't think callsite is working
11:22:09*data-man joined #nim
11:22:41zacharycarter[m]https://github.com/zacharycarter/allegro5/blob/master/src/al.nim#L360-L404
11:24:53zacharycarter[m]I've made a bit of progress but I keep stumbling on how to process pairs of idents / type definitions vs several idents and then a type definition
11:29:49*data-man quit (Ping timeout: 268 seconds)
11:31:49*data-man joined #nim
11:42:02*seni joined #nim
11:42:14senihey, how do I convert a int to string?
11:42:35FromGitter<Clyybber> you shouldn't normally
11:42:40FromGitter<Clyybber> AH
11:42:43FromGitter<Clyybber> use $
11:42:47FromGitter<Clyybber> nvrmind what i said
11:42:50FromGitter<Clyybber> but use $
11:43:11FromGitter<Clyybber> stringything = $someint
11:45:12senithanks
11:45:24*data-man quit (Ping timeout: 256 seconds)
11:48:11seniim confused about declaring functions. if it has a return type then I declare `): bool =` for example. but if it doesn't I write `) =` ?
11:48:16seniwhy the inconsistency?
12:00:02*data-man joined #nim
12:01:58zacharycarter[m]it's not an inconsistency - the void return type is implicit
12:02:13zacharycarter[m]it prevents you from having to type out `: void` after every proc that returns void
12:04:38*data-man quit (Remote host closed the connection)
12:05:20zacharycarter[m]I think anyway
12:06:03*data-man joined #nim
12:07:51FromGitter<ozturkberkay> I think it's a useful feature. You can even skip the parantheses if there are no parameters
12:11:27*alehander42_ quit (Remote host closed the connection)
12:12:21*data-man quit (Ping timeout: 240 seconds)
12:13:10*elrood joined #nim
12:15:02seniit's not about not writing void, it's about the missing colon
12:16:18*data-man joined #nim
12:17:50seniI just wasted a bunch of time because I didn't realize that and was getting some undeclared var error, the docs do not mention this section when introducing procs
12:20:32seni*this syntax when
12:20:45FromGitter<tim-st> I had these problems too, when I started developing in nim, you just have to keep in mind the rule to end with `) =`
12:21:05seniokay
12:21:38FromGitter<tim-st> and it makes sense, since `): =` looks uncool
12:22:07FromGitter<Clyybber> It makes sense because it works the same way for variables
12:23:09FromGitter<tim-st> also I had probems with empty seqs like `var x = @[]` here the type is missing. The compiler could find out the type looking at the later code, but I just used `newSeqOfCapT (cap)` then
12:23:40FromGitter<ozturkberkay> @Clyybber +1. You use `:`to declare the data type. Putting that without writing the data type wouldnt make sense ⏎ ⏎ > It makes sense because it works the same way for variables
12:25:34seniokay, I hadn't thought of it that way
12:25:39*alehander42 joined #nim
12:27:45*ftsf quit (Remote host closed the connection)
12:28:06FromGitter<Clyybber> Whats the use of newSacOfCap ?
12:28:08*ftsf joined #nim
12:28:28FromGitter<Clyybber> Wouldn't it in most cases make more sense to use newSeqUninitialised
12:28:30FromGitter<Clyybber> ?
12:31:50FromGitter<tim-st> In all cases newSeqOfCap should be the same as newSeqUninitialized but afaik this is only done, if you add the `{.noInit.}` pragma...
12:32:09FromGitter<tim-st> newSeqOfCap is just more famous I would say
12:34:53FromGitter<Clyybber> I see, newSeqUninitalized is basically the same as newSeqOfCap, but with the length set, so you don't have to add entries, but can overwrite existing(albeit unitialised) ones
12:37:12FromGitter<tim-st> I think they are the very same, but newSeqOfCap is (for unknown reason) initialzed although it's not indexable
12:37:42FromGitter<Clyybber> It is actually not initialized.
12:38:01FromGitter<Clyybber> It's length is just set to 0
12:38:10FromGitter<tim-st> 2 weeks ago I looked at the source code...
12:38:13FromGitter<Clyybber> Hmm
12:38:33FromGitter<Clyybber> Okay maybe I misunderstood the source
12:38:51FromGitter<tim-st> it's in `sysstr.nim`
12:39:27FromGitter<Clyybber> https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L744
12:39:36FromGitter<Clyybber> There it is, I think
12:39:42FromGitter<tim-st> what I meant was for string, but is the same I think
12:40:16FromGitter<tim-st> yes, it says magic: `NewSeqOfCap`
12:40:23FromGitter<Clyybber> If you look at newSeqUninitialized you see it calls newSeqOfCap
12:40:49FromGitter<Clyybber> So it doesn't make much sense that newSeqOfCap would be initialized
12:49:15FromGitter<tim-st> I cannot find the code definition of the `magic` procs now..., I'm pretty sure I've seen it work different :\
12:58:59FromGitter<Clyybber> It uses compiler *magic*
13:01:39FromGitter<Clyybber> aka intrinsics
13:03:01FromGitter<tim-st> for example `newString` magic is defined here: https://github.com/nim-lang/Nim/blob/c57e320c9486248a82c19d13e03178745d8eb53f/lib/system/sysstr.nim#L92
13:03:19*data-man quit (Ping timeout: 272 seconds)
13:03:56FromGitter<tim-st> there was also a place for newSeqOfCap but I cant find it anymore
13:04:05*elrood quit (Quit: Leaving)
13:04:15FromGitter<Clyybber> I cant find it either
13:04:26FromGitter<tim-st> maybe deleted :(
13:05:38FromGitter<Clyybber> https://github.com/search?utf8=%E2%9C%93&q=repo%3Anim-lang%2FNim+NewSeqOfCap+in%3Afile&type=Code
13:05:46FromGitter<Clyybber> Can't find the implementation there.
13:09:42*alehander42 quit (Ping timeout: 256 seconds)
13:10:41*krux02 joined #nim
13:12:15krux02Araq: what is there a reason, why every NimNode has a comment field?
13:12:27FromGitter<tim-st> I think the implementation of `newSeqUninitialized` was changed recently to what you linked directly inside `system.nim`. But still itwould be interesting to see the difference to `newSeqOfCap`
13:15:07FromGitter<stisa> @tim-st this one ? https://github.com/nim-lang/Nim/blob/89dd1e3592e5f869bd2845c587ddec9c749d4d7b/lib/system/mmdisp.nim#L364
13:18:55FromGitter<tim-st> thanks, looks good, although the name is different, but seems implemented similiar
13:23:21FromGitter<stisa> that's the proc the c backend generates. Search for `mNewSeqOfCap`, most magics are implemented in a `case` using `m`+`procname`for the enum
13:25:43FromGitter<tim-st> yes, you're right, thanks: https://github.com/nim-lang/Nim/search?utf8=%E2%9C%93&q=mNewSeqOfCap&type=Code
13:27:16FromGitter<stisa> Or maybe it's this one, I think the other is specific to gogc
13:27:20FromGitter<stisa> https://github.com/nim-lang/Nim/blob/89dd1e3592e5f869bd2845c587ddec9c749d4d7b/lib/system/mmdisp.nim#L562
13:28:22*data-man joined #nim
13:29:23FromGitter<tim-st> ok, thanks, at least I was wrong about the place of implementation, maybe I switched it with newStringOfCap :\
13:34:11*todevil joined #nim
13:34:31*data-man quit (Remote host closed the connection)
13:35:57*todevil quit (Remote host closed the connection)
13:41:48*jrabe23 joined #nim
13:43:17*jrabe23 quit (Remote host closed the connection)
13:49:35*MyMind quit (Ping timeout: 240 seconds)
13:53:38*yglukhov_ joined #nim
13:54:48*miran joined #nim
13:56:27*yglukhov[i] quit (Ping timeout: 240 seconds)
13:57:03zacharycarter[m]Hrmmmm
13:59:04zacharycarter[m]is this right? - https://gist.github.com/zacharycarter/f61be4127da3ec6efc9f3c2348b6469a
14:11:23*krux02 quit (Ping timeout: 268 seconds)
14:28:27*dddddd joined #nim
14:30:42*BitPuffin joined #nim
14:31:09*yglukhov_ quit (Remote host closed the connection)
14:35:00*Kronuz10 joined #nim
14:35:03*Kronuz10 quit (Remote host closed the connection)
14:35:21*data-man joined #nim
14:41:06*EdSaperia0 joined #nim
14:45:58*EdSaperia0 quit (Ping timeout: 265 seconds)
14:47:41*leorize quit (Quit: WeeChat 2.2)
14:52:40*stefanos82 joined #nim
15:16:57*noonien joined #nim
15:17:04*data-man quit (Read error: Connection reset by peer)
15:20:04*yglukhov[i] joined #nim
15:37:35*C0c0dril015 joined #nim
15:38:36*C0c0dril015 quit (Remote host closed the connection)
15:41:32*edcragg quit (Read error: Connection reset by peer)
15:42:35*edcragg joined #nim
16:07:45FromDiscord_<treeform> Adding an ability, to my typography library to typeset text independent of drawing it:
16:07:48FromDiscord_<treeform>
16:07:48FromDiscord_<treeform> https://cdn.discordapp.com/attachments/371759389889003532/478233144235917335/layoutNoText.png
16:08:05*ng0 quit (Quit: Alexa, when is the end of world?)
16:08:26FromDiscord_<treeform> You can then fill it with glyphs how you want say in openGL or even HTML.
16:08:31FromDiscord_<treeform> Or you can use my method:
16:08:33FromDiscord_<treeform>
16:08:33FromDiscord_<treeform> https://cdn.discordapp.com/attachments/371759389889003532/478233336066736128/layout.png
16:09:15FromGitter<kayabaNerve> Or just do tab size 4 @ozturkberkay Miran
16:10:02miranthe official stuff is written with 2 spaces, so i guess this would be the official way
16:11:28FromGitter<kayabaNerve> The compiler has a style guide saying that; Nim projects are, at a guess, 60-70% 2 spaces; the language itself doesn't.
16:11:53*PMunch joined #nim
16:12:49FromGitter<kayabaNerve> Point is, if he wanted to use 4 spaces, just let him use 4
16:13:01FromGitter<kayabaNerve> Maybe make a comment most Nim code is 2
16:13:39FromGitter<ozturkberkay> To be honest, I really don't like 2 space tab size. But I can continue like this if the majority of the community using 2 spaces, not a big deal
16:14:07FromGitter<kayabaNerve> Idea. Get a copy of every nimble package and write a tool to see how many spaces it uses.
16:15:01FromGitter<kayabaNerve> I personally use 4 :p I'm not saying you just continue using 2 and can't adapt. I'm trying to say it's up to you to either continue what you like(d) or adapt.
16:15:50FromGitter<ozturkberkay> Yeah, I get it :)
16:20:47miranwhen i started i didn't like 2 spaces (also didn't like the imports, (partial) case/style insensitivity, etc.), but it has grown on me over time
16:24:26*xet7 quit (Quit: Leaving)
16:24:37stefanos82I didn't like 2 spaces either, but it lasted about 15 to 20 minutes; then for some inexplicable reason it felt right and natural to use 2 spaces instead of 4
16:30:45*ftsf quit (Ping timeout: 268 seconds)
16:40:34*enthus1ast joined #nim
16:41:13FromGitter<tim-st> are there any server capacities left to create nightly builds for nim?
16:41:33FromGitter<kayabaNerve> imports are freaking amazing IMO. I do wish Nim was case sensitive though...
16:41:50FromGitter<kayabaNerve> My main issue is that some aspects are case sensitive and it isn't defined which aspects those are.
16:42:53*enthus1ast quit (Client Quit)
16:44:17*drazan quit (Read error: Connection reset by peer)
16:45:51*lutki_ joined #nim
16:46:58*drazan joined #nim
16:47:17*lutki_ quit (Remote host closed the connection)
16:48:13*e-mail joined #nim
16:50:53FromGitter<tim-st> is it correct that `koch tools` doesnt get `-d:release`?
16:54:07*e-mail quit (Ping timeout: 244 seconds)
16:59:54FromGitter<kayabaNerve> If I have to store an... array of bytes, that could have a length of 0 or a MAX of 128, should I use OpenArray or seq?
17:00:03FromGitter<kayabaNerve> Once the length is set it never changes
17:00:23miranopenArray is only used in proc declarations, no?
17:00:59miranand you cannot even return openArray from a proc, IIRC
17:01:16FromGitter<kayabaNerve> Yep.
17:01:30FromGitter<kayabaNerve> Sorry. So I guess I'm forced to use a ptr array[0] or a seq.
17:06:23FromDiscord_<exelotl> hey, I followed the macros section of the nim book and now I'm messing around with the code some more
17:07:02FromDiscord_<exelotl> I ran into this while trying to swap out a template with a `quote do` https://gist.github.com/geckojsc/5f5d70fa4126ce51669a351043c1dffc
17:07:39FromDiscord_<exelotl> is the backtick notation not the same here?
17:13:21FromGitter<Varriount> @kayabaNerve Sequences are your friend.
17:14:18FromGitter<Varriount> exelotl: backticks are used for variable substitution in quote
17:15:43FromGitter<kayabaNerve> @Varriount Yeah... C++ Vectors have scarred me pretty badly though.
17:15:49FromGitter<kayabaNerve> I'm using them but still...
17:24:06*fluter joined #nim
17:24:35FromGitter<tim-st> @kayabaNerve are they known at compile time?
17:26:33FromGitter<tim-st> if so, you can use one array/seq and store the elements as sequences -> the next element belongs to the previous unless a flag marks the last element. then you can store one array of start indices that links to the sequences array/list
17:28:08FromGitter<kayabaNerve> @tim-st I'm storing data. You can have 0 bytes to 128 bytes.
17:28:33FromGitter<tim-st> yes. the question is, if your data is known at compile time
17:28:37FromGitter<kayabaNerve> No.
17:28:43*alehander42 joined #nim
17:28:44FromGitter<kayabaNerve> You is the user.
17:28:47FromGitter<kayabaNerve> As they use it.
17:28:51FromGitter<tim-st> ok, then it doesnt work
17:28:53FromGitter<kayabaNerve> And 0ing it out would not work at all.
17:29:15*fluter quit (Ping timeout: 244 seconds)
17:29:15FromGitter<tim-st> what do you mean by 0ing out?
17:31:24FromGitter<kayabaNerve> I can't create 128 bytes of 0.
17:33:08FromGitter<tim-st> the idea was (only compile time): seq[tuple[data: byte, isLast: bool]]; then you yould create sequences of len 0..128
17:36:11*epictek[m] joined #nim
17:40:04*enthus1ast joined #nim
17:40:18*enthus1ast quit (Client Quit)
17:40:53*enthus1ast joined #nim
17:41:12*enthus1ast quit (Client Quit)
17:41:59*enthus1ast joined #nim
17:46:05*PMunch quit (Quit: leaving)
17:47:16*PMunch joined #nim
17:55:35*nsf joined #nim
18:01:41*enthus1ast quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
18:01:57*enthus1ast joined #nim
18:01:58*alehander42 quit (Remote host closed the connection)
18:03:06*enthus1ast quit (Client Quit)
18:03:20*enthus1ast joined #nim
18:05:03*enthus1ast quit (Client Quit)
18:05:18*enthus1ast joined #nim
18:06:06*enthus1ast quit (Client Quit)
18:08:47FromGitter<kayabaNerve> krux02 had something humorous for you
18:10:03FromGitter<kayabaNerve> I actually just used sequtils.mapLiterals to converted a OrderedSet[int] to OrderedSet[char] (I need every single character except 0. Not 0-9, A-Z, a-z; 1-255 but in char form).
18:10:33FromGitter<kayabaNerve> Annoying thing About Gitter -> IRC is I have no idea if he's online. I don't think he's here right now 0_o I do think he may have a bouncer...
18:12:19*phao joined #nim
18:16:47*ng0 joined #nim
18:17:35*thomasross__ quit (Remote host closed the connection)
18:17:57subsetparkCould I use `pegs` to implement a simple parser, in its current form?
18:18:04*thomasross__ joined #nim
18:19:01Araqsubsetpark: I can't rmember if I merged the PR that allows you to do that
18:19:56subsetpark:) I see
18:20:17subsetparkIs there an alternative? A native yacc-alike?
18:21:50Araqyou can try to revive my 'lexim' project but that's only lexer generation
18:22:20Araq'scanp' is the beginning of a parser generator but its DSL became too cryptic too fast
18:22:41Araqthis stuff is hard to design :-)
18:25:00stefanos82language / compiler design might be a tough job, but darn it, is so amazing to keep your head spinning all the time!
18:25:41subsetparkunderstood :)
18:25:52subsetparkhave people just been hand-rolling parsers for now?
18:26:05subsetparkor hand-rolling them with a strscans core?
18:27:33*phao left #nim ("Leaving")
18:29:42stefanos82more and more interpreted languages that get released nowadays they use custom-made parsers
18:35:01*Trustable joined #nim
18:39:10*phao joined #nim
18:44:29FromGitter<ozturkberkay> can someone give a me practical use example for repr?
18:44:41FromGitter<ozturkberkay> give me a*
18:53:08AlexMaxman, getting compiler stuff set up on windows is so inconvenient
18:54:49AlexMax"please use our magic batch file to set up your environment"
18:55:00AlexMax"Oh...you wanted to use an editor? Oh....."
18:57:00*Trustable quit (Remote host closed the connection)
19:00:25seniany particular reason why nim went with the syntax of types coming after the variable? just out of curiosity
19:02:35*stefanos82 quit (Quit: Quitting for now...)
19:05:46*phao quit (Quit: Leaving)
19:06:27FromGitter<zetashift> @seni probably because of Pascal, Nim hass a lot of influences of pascal
19:06:30FromDiscord_<awr> in a variant is there a way to properly change the discriminator after it's been assigned?
19:06:55FromDiscord_<awr> also if i had to guess @seni probably wirth influence
19:10:44FromGitter<drslump> @seni a technical reason is that with type inference the type becomes optional in many cases, and as a rule of thumb optional tokens are easier to parse if the come after since it reduces the required amount of look ahead for a grammar
19:13:25*thomasross__ is now known as thomasross
19:13:32FromDiscord_<awr> if you make function header syntax consistent with variable type syntax (as nim does) it looks substantially cleaner than C
19:14:32FromDiscord_<awr> `ReturnType functionName()` vs. `proc functionName(): ReturnType`
19:47:24*vosper joined #nim
19:48:48FromDiscord_<awr> https://forum.nim-lang.org/t/3515#22005
19:48:52FromDiscord_<awr> :/
19:49:47*ng0 quit (Quit: Alexa, when is the end of world?)
19:50:04*Vladar quit (Remote host closed the connection)
19:50:34FromDiscord_<awr> see I want something like reset() but my problem I have fields outside of my object variant that I don't want to reset
19:50:40*data-man joined #nim
19:51:25FromDiscord_<awr> what I wish I could do is call reset() against the discriminator which would reset() *just* the case section
19:55:27*data-man quit (Ping timeout: 240 seconds)
19:56:12*data-man joined #nim
19:59:03*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:02:15*vosper joined #nim
20:05:26Araqawr: oooh, tough nut
20:06:02Araqcreate an RFC for that, it's possible but some work
20:11:28Araqbut it would solve the problem I'm having in making this 100% memory-safe ...
20:12:42zacharycarter[m]wondering if anyone can provide any insight on whether this is expected behavior or not - https://gist.github.com/zacharycarter/f61be4127da3ec6efc9f3c2348b6469a
20:14:13FromGitter<kayabaNerve> zacharycarter[m]: What it does when you compile it = expected behavior
20:14:24FromGitter<kayabaNerve> 🤔
20:14:27Araqtemp8.nim(16, 41) Error: invalid indentation
20:14:53Araqzacharycarter[m]: the parser changed I guess
20:15:43zacharycarter[m]Araq: issue then?
20:17:00zacharycarter[m]kayabaNerve: heh, most of the time I'd say you're right
20:18:00FromGitter<kayabaNerve> It's really annoying to ask that. I wanted to ask if converters should work in nested types. ⏎ A) Bug ⏎ B) Unimplemented Feature ⏎ C) I'm using the feature wrong ⏎ D) Not a feature, screw off [https://gitter.im/nim-lang/Nim?at=5b7095f7196bc60b6bbde55f]
20:18:37FromGitter<kayabaNerve> Ara_q said the stdlib supported it via sequtils.mapLiterals so I said: Not supposed to be in the lang, is in the stdlib, and closed the issue.
20:19:15FromGitter<kayabaNerve> zacharycarter[m] What's the expected behavior when I call `echo 2`?
20:19:42*data-man quit (Read error: Connection reset by peer)
20:19:43FromGitter<kayabaNerve> https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/ac/ac9cf656c310fc500ebb845c8f6bb1f4cdfbe00d_full.jpg
20:20:04zacharycarter[m]so are you taking a jab at how I asked my question or how the question is answered?
20:20:15FromGitter<kayabaNerve> I just wanted to send Hyperthink :( Anyways. I have to go for a bit... See y'all later.
20:20:33FromGitter<kayabaNerve> A jab at the question itself because of how hard it is to ask/answer but it's a valid question.
20:20:56zacharycarter[m]ah okay - gotcha
20:21:08FromGitter<kayabaNerve> Then I made a joke about how asking about expected behavior can be 'abused' when you ask the expected behavior of really really simple things.
20:21:20zacharycarter[m]I gotcha
20:21:26FromGitter<kayabaNerve> Then I tried to send Hyperthink to symbolize it
20:22:00zacharycarter[m]yeah - I see what you mean, it is a thin line
20:22:07zacharycarter[m]either way - hope you enjoy the rest of your day / evening/ whatever it is where you are 😄
20:22:14*seni quit (Quit: Leaving)
20:22:59FromGitter<kayabaNerve> Movie + Dinner with my mother who went out of town for a week. That said, she took my sister with her and I got peace and quiet for a week. I think it balanced out pretty well...
20:23:07zacharycarter[m]Araq: I figure you should be able to send in multiple pairs of idents|types
20:24:03zacharycarter[m]:)
20:37:55FromGitter<drslump> I'm a newbie trying to hack on compiler/semgnrc.nim to fix https://github.com/nim-lang/Nim/issues/8603, what's an agile flow to work on the compiler internals? `./koch boot -d:debug` speed is not bad but I hope there is some trick that can be used when doing minor changes to a module :)
20:38:49FromDiscord_<exelotl> say I want to use this from inside a macro (e.g. call getAst on the result)
20:39:11FromDiscord_<exelotl> template callMethod(name:untyped):untyped = obj.`name`()
20:39:46FromDiscord_<exelotl> template callMethod(name:untyped):untyped = obj.\`name\`()
20:40:10FromDiscord_<exelotl> how would I pass a name of my choosing?
20:40:32FromGitter<GULPF> @drslump `koch temp <args>` compiles the compiler in debug mode and sends <args> to it, don't think there's a faster way
20:41:20FromDiscord_<exelotl> I've tried getAst callMethod(ident("doThing"))
20:41:44FromGitter<tim-st> @drslump I had a quick look at this, from what zah said, I would assume https://github.com/nim-lang/Nim/blob/a45faf2dd60f6474aa01b7cddd35d09ce329d6ce/compiler/semgnrc.nim#L325 should be replaced by `n.sons[i] = semGenericStmtScope(c, n.sons[i], flags+{withinMixin}, ctx)` but that's only a guess
20:42:08FromGitter<tim-st> otherwise I wouldnt consider it as beeing `easy`
20:42:46FromGitter<drslump> thanks @GULPF, I'll try with it
20:44:14FromDiscord_<awr> https://github.com/nim-lang/Nim/issues/8623
20:46:59*cspar joined #nim
20:48:14FromGitter<drslump> @tim-st thanks, I tried the `semGenericStmtScope` but it breaks the stdlib, it seems that bindings in`when` blocks are not scoped (makes sense). I'm going down the rabbit hole and I think I see some light but it's indeed not an easy task for a beginner in Nim :)
20:48:30zacharycarter[m]drslump: https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler
20:48:56zacharycarter[m]not sure if you've already read that or not
20:49:26FromGitter<tim-st> @drslump Thanks, it was also my impression that's not easy. Especially when I realized, that `when` is maybe not the problem, because `openArray[int]` works as parameter
20:50:28FromGitter<drslump> @zacharycarter thanks mate, I totally missed that wiki somehow 😳
20:51:40zacharycarter[m]np
20:57:19*wildlander joined #nim
21:02:48*nsf quit (Quit: WeeChat 2.2)
21:10:44*yglukhov[i] quit (Remote host closed the connection)
21:13:15FromGitter<timotheecour> @ Araq or @dom96 any chance we can merge https://github.com/nim-lang/Nim/pull/8584 ? it was already approved
21:14:27FromGitter<tim-st> what is the default way to parse an int32 from string at start index?
21:14:56FromGitter<tim-st> (with good/best peformance)
21:16:07FromDiscord_<awr> parseInt()?
21:17:39FromGitter<tim-st> I think parseInt looks at the string and try to parse at much as possible which fits in int64; I think I would need to wrap the string into StringStream and use `readInt32`
21:17:56FromGitter<tim-st> but dont know how much overhead StringStream has...
21:21:08*data-man joined #nim
21:28:11*ng0 joined #nim
21:28:15*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:31:05*miran quit (Ping timeout: 240 seconds)
21:31:24*yglukhov[i] joined #nim
21:33:11*vosper joined #nim
21:36:18*yglukhov[i] quit (Ping timeout: 272 seconds)
21:39:44*rockcavera joined #nim
21:44:03*data-man quit (Ping timeout: 260 seconds)
21:59:01*PMunch quit (Quit: leaving)
22:04:44*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:04:56AraqTimothee: It's not that clean, why is it urgent?
22:14:12*data-man joined #nim
22:29:17*data-man quit (Read error: Connection reset by peer)
22:30:16FromGitter<timotheecour> which part is not clean? there is no more feedback on that review; it’s urgent because I have other upcoming PR’s that depend on it, and because it fixes pre-existing bugs.
22:36:36*ng0 quit (Quit: Alexa, when is the end of world?)
22:45:18*vosper joined #nim
22:48:16*ftsf joined #nim
22:49:00*data-man joined #nim
22:52:54*PrimHelios joined #nim
22:56:11FromGitter<Clyybber> How would I convert an "ptr cstring" (an array of strings) to a seq?
22:57:15FromGitter<Clyybber> Provided I know the length of course
23:06:15*krux02 joined #nim
23:16:06*cloe12 joined #nim
23:17:58*cloe12 quit (Remote host closed the connection)
23:28:25FromGitter<Clyybber> Nevermind
23:28:29FromGitter<Clyybber> figured it out
23:32:28*data-man quit (Ping timeout: 244 seconds)
23:39:50*noonien quit (Quit: Connection closed for inactivity)
23:42:46*krux02 quit (Remote host closed the connection)
23:48:23FromDiscord_<exelotl> so, it's not possible to turn a passed identifier into a string in a template?
23:49:42vosperHas anyone tried to use libsodium for encrypting a message with a key (crypto_secretbox_easy)? I feel like I'm missing something, because the password hashing functions from libsodium docs don't seem to be available, so I can't go from password string -> key of the correct length. I see that nimcrypto has pbkdf2 implemented, but I don't know how to use that with libsodium.
23:49:52vosperI am weak on crypto stuff...