<< 08-04-2018 >>

00:01:56shashlickHere's what I had so far
00:02:00shashlickhttps://pastebin.com/jdbRx18T
00:02:27shashlickYou'll need to change the GitHub url and folders up a bit
00:06:51FromGitter<gogolxdong> very well , I kind of understand how the .cfg works, thanks. I found there are some difference between the mirror and my repository, will share my repository later.
00:08:36shashlickIt's funny, the GitHub repo is the mirror, and it is different from the official repo on googlesource.com
00:08:58shashlickAnd both are different from the webkit GitHub
00:09:23FromGitter<gogolxdong> it says `Unofficial mirror of the WebKit SVN repository`
00:10:33FromGitter<gogolxdong> google takes webkit and makes its own browser core named blink.
00:11:23FromGitter<gogolxdong> I think WebKit repo is the original.
00:50:22FromGitter<AjBreidenbach> does this look like it's in a state where it's ready to be published? https://github.com/AjBreidenbach/napibindings
00:50:22*Trustable quit (Read error: Connection reset by peer)
00:50:31*Trustable joined #nim
01:04:27*max3 quit (Quit: Connection closed for inactivity)
01:21:57*xkapastel quit (Quit: Connection closed for inactivity)
01:25:44*arnetheduck_ joined #nim
01:25:44*arnetheduck quit (Read error: Connection reset by peer)
01:27:51*Trustable_2 joined #nim
01:31:25*Trustable quit (Ping timeout: 265 seconds)
01:36:06FromGitter<gogolxdong> @shashlick does the n.prepare section has to be gitremote ? chromioum is a huge project, will nimgen git clone all the codes?
01:39:27FromGitter<gogolxdong> It pulled with --depth=1 and with `error: Sparse checkout leaves no entry on working directory`
01:40:05shashlickThat's cause that repo doesn't have those folders anymore
01:40:21shashlickSee how it is trying a sparse checkout
01:40:31FromGitter<gogolxdong> Can I change n.prepare to local directory?
01:40:54shashlickIf files are already present, you don't need that section at all
01:41:07*Trustable_2 quit (Remote host closed the connection)
01:41:08shashlickI use it to automate wrapping
01:41:58FromGitter<gogolxdong> yes, I put nimkit.cfg under WebKit/Source/core/dom/ where Node.h lies in.
01:45:11FromGitter<AjBreidenbach> are you guys making a browser?
01:45:37FromGitter<gogolxdong> yes, I am trying to make a nim native browser.
01:45:41FromGitter<gogolxdong> error: Sparse checkout leaves no entry on working directory
01:45:50FromGitter<gogolxdong> Cannot use recurse and inline simultaneously
01:46:28FromGitter<gogolxdong> @shashlick I commented out inline=true, it hints File doesn't exist: base/macros.h
01:46:45FromGitter<gogolxdong> ``````
01:46:48FromGitter<gogolxdong> ``````
01:46:59FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac97492080a3850530aefb7]
01:48:11shashlickSee the included in node.h
01:48:31FromGitter<gogolxdong> it's the first line.
01:48:36shashlickThose files need to exist
01:48:49FromGitter<gogolxdong> #ifndef Node_h ⏎ ⏎ #define Node_h ⏎ ⏎ #include "base/macros.h" ... [https://gitter.im/nim-lang/Nim?at=5ac97501270d7d3708a3adf8]
01:50:07FromGitter<gogolxdong> It must lies in other path.
01:55:57FromGitter<gogolxdong> need to convert DOM manupulation from C++ to Nim , and give it a suit using nimx, plus native nim socket connection, this is what we need for now.
02:16:30shashlickIf you don't want it to process include files, remove the recurse
02:19:47*SenasOzys quit (Quit: Leaving)
02:20:11*SenasOzys joined #nim
03:08:32FromGitter<gogolxdong> `mnt/d/WebKit/Source/core/dom/temp-macros.nim.c`
03:08:42FromGitter<gogolxdong> `mnt/d/WebKit/Source/core/dom/temp-macros.nim.c(1, 40) Error: identifier expected, but found '&'`
03:16:39shashlickC2nim doesn't understand that syntax of c++
03:34:25*tefter joined #nim
03:41:05*leorize quit (Quit: WeeChat 2.1)
03:52:12*rockcavera joined #nim
04:11:38*athenot joined #nim
04:13:09*hal quit (Quit: WeeChat 1.4)
04:21:46*Snircle joined #nim
04:37:30FromGitter<gogolxdong> generally means need coding manually.
04:51:08*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:51:32shashlickI'd just use c2nim to get a wrapper done. Reimplementing in pure Nim will require a lot of manual coding.
04:55:52FromGitter<data-man> @shashlick: Just an idea for nimgen: to use gcc -E -P. It's reduced gcc's output.
04:57:54shashlickIt already uses -E. What's -P?
04:58:22shashlickpreprocess = true
04:58:37FromGitter<data-man> Strip lines numbers
05:10:41*acidx quit (Ping timeout: 256 seconds)
05:11:02*acidx joined #nim
05:25:13shashlickOk, ya -E is one of the main advantages of using nimgen, plus recursion into include files and pulling out a limited subset of #defines
05:28:10FromGitter<gogolxdong> core/dom/Node.h:30:29: fatal error: core/CoreExport.h should I put .cfg file at the same level of core?
05:36:17FromGitter<gogolxdong> @shashlick https://github.com/gogolxdong/WebKit
05:37:48shashlickYa, see how the other nimgen libs are organized
05:38:23shashlickcfg is at the root, specifies include directories based on output directory
05:42:09FromGitter<gogolxdong> This is the output when I put nimkit.cfg at the core level.
05:53:04*miran joined #nim
05:56:45*Cthalupa quit (Ping timeout: 264 seconds)
06:19:58*SenasOzys quit (Remote host closed the connection)
06:20:25*SenasOzys joined #nim
06:31:56FromGitter<alehander42> Ah I just realized my nim forum posts are not visible
06:32:21FromGitter<alehander42> Do I need to somehow further activate my account
06:32:32FromGitter<alehander42> I thought I did with an email
06:34:22miranyou need to ping dom96 ;)
06:36:24FromGitter<gogolxdong> @shashlick can I write the header files independency hierarchy like this ```
06:36:34FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac9b87292f5d62057a5eb05]
06:37:06*Cthalupa joined #nim
06:42:48*Vladar joined #nim
06:59:02*nsf joined #nim
07:16:55FromGitter<gogolxdong> I see , we can put cloned modules under the path specified in [n.include] section manually .
07:18:21FromGitter<gogolxdong> the same problem, error in the temporary generated .nim.c file ,`d:\lxd\nimtest\nimgen\temp-macros.nim.c(1, 32) Error: '> [end of template]' expected ⏎ `
07:21:35*miran quit (Ping timeout: 240 seconds)
07:22:44FromGitter<gogolxdong> manual coding is overwhelmed.
07:29:48FromGitter<gogolxdong> using ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac9c4ec109bb043329ccd71]
08:04:27*gmpreussner quit (Ping timeout: 240 seconds)
08:05:19*gmpreussner joined #nim
08:37:46FromGitter<alehander42> ok :D @dom96 *pokes you about the forum*
08:49:45*SenasOzys quit (Remote host closed the connection)
08:50:12*SenasOzys joined #nim
09:01:53*rauss quit (Read error: Connection reset by peer)
09:03:12*rauss joined #nim
09:05:55*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
09:06:26*Lord_Nightmare joined #nim
09:27:24*tefter quit (Remote host closed the connection)
09:27:28*jaco60 joined #nim
09:40:58*Lord_Nightmare2 joined #nim
09:42:27*Lord_Nightmare quit (Ping timeout: 240 seconds)
09:42:32*Lord_Nig- joined #nim
09:46:33*Lord_Nightmare2 quit (Ping timeout: 260 seconds)
09:47:15*Lord_Nightmare joined #nim
09:47:45*Lord_Nig- quit (Ping timeout: 264 seconds)
09:56:57*acidx quit (Ping timeout: 240 seconds)
10:03:18*acidx joined #nim
10:06:37*aguspiza joined #nim
10:08:23FromGitter<Varriount> @zacharycarter An initial test against the V4 signing code looks correct.
10:09:39FromGitter<Varriount> The next step will be writing up a tool that validates the procedure against the test cases supplied by AWS.
10:10:11FromGitter<gogolxdong> Are you testing s3 client ,it's correct .
10:10:34FromGitter<Varriount> No, I'm writing my own
10:10:48FromGitter<gogolxdong> ec2 client has some problems.
10:11:11FromGitter<Varriount> Currently my code only generates the signing information.
10:12:10FromGitter<gogolxdong> failed to see any difference between your implementation and AWS documentation, we are stuck at ec2 client.
10:12:44*dddddd joined #nim
10:12:57*aguspiza quit (Ping timeout: 264 seconds)
10:15:21FromGitter<Varriount> This is an implementation that is currently only on my laptop.
10:15:41FromGitter<Varriount> It doesn't make requests.
10:16:14FromGitter<Varriount> It doesn't even do all the data preprocessing required.
10:16:43FromGitter<Varriount> This new code only generates the authorization data
10:17:45FromGitter<Varriount> @zacharycarter @gogolxdong https://gist.github.com/Varriount/b4c817b46ea5c1b141af7791ff2dbcf7
10:18:31FromGitter<gogolxdong> I checked your sigv4 with AWS documentation, as for ec2 client , the payloads need sorting, and either use X-Amz-Credential in payload or use Authorization in header to issue a canonical aws sigv4 request.
10:19:14FromGitter<Varriount> As I have just said, I am not working on that old code. It wasn't even *my* code really.
10:19:32FromGitter<gogolxdong> ok , I see.
10:20:04FromGitter<Varriount> The gist I just posted contains new code.
10:21:07*aguspiza joined #nim
10:24:03FromGitter<exts> does nim have union types?
10:24:11FromGitter<exts> google's sucking right now
10:24:38FromGitter<gogolxdong> you can use object variant.
10:24:40FromGitter<alehander42> it depends on what you mean by "union" types
10:25:04FromGitter<alehander42> it has variants and also "A | B" types
10:25:23FromGitter<exts> alright let me try
10:34:39FromGitter<zetashift> Are "A|B" types simply enums?
10:39:09*xet7 joined #nim
10:39:26*miran joined #nim
10:44:18FromGitter<exts> eh object variant works, but it's not the ideal approach I wanted. i like how unions work in other languages and I tried using `Type|Type` and it didn't work for a table value.
10:48:07*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:55:47FromGitter<gogolxdong> @Varriount https://gist.github.com/gogolxdong/db4a5f187e109ac9a89af6e24927b411
10:56:02FromGitter<gogolxdong> 401 Unauthorized
11:20:32*nsf quit (Quit: WeeChat 2.0.1)
12:07:41FromGitter<exts> is "result" deprecated?
12:07:51FromGitter<exts> inside procs
12:08:19FromGitter<exts> haven't written nim in 3 years and it seems i have to explicitly return now
12:10:40*yglukhov joined #nim
12:17:54FromGitter<exts> and damn this isn't a feature :( https://github.com/nim-lang/Nim/issues/1070
12:25:05miranresult is not deprecated
12:35:25FromGitter<mratsim> Iwasn’t aware of this but this sure is awesome: https://forum.nim-lang.org/t/3732
12:35:52FromGitter<mratsim> @exts: use type Foo {.union.} = object
12:37:18FromGitter<mratsim> @diegogub for cross compilation you have a —os: compile-time flag — https://nim-lang.org/docs/nimc.html
13:01:29dom96you need to also set up a C cross-compiler
13:02:50*SenasOzys quit (Read error: Connection reset by peer)
13:03:08*SenasOzys joined #nim
13:07:05*nsf joined #nim
13:38:32*NoOp joined #nim
13:38:39NoOp:D
13:38:42NoOpHello guys
13:39:37*NoOp is now known as MrNoOp
13:40:09*MrNoOp is now known as NoOP
13:44:28dom96hey!
13:48:15FromGitter<mratsim> hey
13:49:57*NoOP quit (Ping timeout: 265 seconds)
13:56:49*yglukhov quit (Remote host closed the connection)
14:00:00*NoOP joined #nim
14:02:44NoOPHow I would go about making a dll in Nim, and I mean not a Dll like the cheap way, to export it and use it to call the functions inside (like a COM), I mean a legit DLL, with DllMain, with HMODULe, hInst, with DLL_ATTACH, etc., etc.
14:04:18NoOPI have gotten feedback that, anything is possible in Nim but, I would have to study further the language also because everything seems so fresh for me :D
14:04:47NoOPI have gotten feedback that, anything is possible in Nim but, I would have to study further the language also because everything seems so fresh for me :D
14:05:03NoOPhow can I delete the duplicate message?
14:06:21FromGitter<Varriount> @gogolxdong You need to pass in an appropriate datetime object. It's currently using the one from the test suite.
14:07:33FromGitter<Varriount> The URI also needs to match, as well as a couple of other parameters.
14:09:59FromGitter<gogolxdong> I used "ec2.us-east-2.amazonaws.com" as URI
14:10:10FromGitter<mratsim> @NoOP, I remember a —app:lib flag
14:10:52FromGitter<mratsim> but iirc there were some extra flags to remove NimMain and maybe initialize the runtime properly
14:12:46FromGitter<gogolxdong> @Varriount What is the uri in createAwsAuthorization? Shouldn't it be "/"?
14:14:09FromGitter<gogolxdong> "ec2.us-east-2.amazonaws.com" as host.
14:14:14NoOPI se
14:15:31YardanicoNoOP, you can't remove duplicated messages from IRC :)
14:15:36Yardanicoor any messages in general
14:15:55NoOPalright :S
14:20:45FromGitter<Varriount> @gogolxdong Yes
14:25:18dom96NoOP: You might be able to use this as an example: https://github.com/xomachine/SteamForwarder
14:25:28dom96https://github.com/xomachine/SteamForwarder/blob/master/steam_api.nim#L27
14:47:13*nsf quit (Quit: WeeChat 2.0.1)
15:04:02FromGitter<matrixbot> `xomachine` NoOP: you just can try to make a dll via --app:lib option to the Nim compiler and then inspect C code from nimcache to learn how Nim handling all DllMain related stuff. ⏎ ⏎ In SteamForwarder I've used custom DllMain injected directly to C code and added --noMain option to compilation flags. https://github.com/xomachine/SteamForwarder/blob/master/steam_api.nims#L9
15:04:35FromGitter<genotrance> gogolxdon: doesn't matter how you set it up, macros.h isn't something c2nim can process as is. Either you fix it or n
15:04:46FromGitter<genotrance> n.exclude it
15:07:10*arecaceae quit (Remote host closed the connection)
15:07:26FromGitter<gogolxdong> yes @genotrance ,thanks.
15:07:34*arecaceae joined #nim
15:28:47*yglukhov joined #nim
15:29:40*xkapastel joined #nim
15:30:26*xkapastel quit (Max SendQ exceeded)
15:31:06*xkapastel joined #nim
15:33:05*yglukhov quit (Read error: Connection reset by peer)
15:33:13*yglukhov joined #nim
15:38:56FromGitter<k0pernicus> Is a keyword exists to say « It’s not implemented yet, do not look at that » ? ⏎ Like `unimplemented!()` in Rust, or `pass` in Python ?
15:39:17mirandiscard ?
15:39:49FromGitter<k0pernicus> Oh yeah, I am dumb :-|
15:39:54FromGitter<k0pernicus> Thanks miran!
15:40:01*edcragg quit (Quit: ZNC - http://znc.in)
15:41:04*edcragg joined #nim
15:52:57*xet7 quit (Remote host closed the connection)
15:57:04*xet7 joined #nim
16:02:21*aguspiza quit (Ping timeout: 256 seconds)
16:11:24*Snircle joined #nim
16:14:23*nsf joined #nim
16:32:26*leorize joined #nim
16:41:09*Vladar quit (Ping timeout: 264 seconds)
16:43:52*Vladar joined #nim
16:45:46FromGitter<k0pernicus> What is the structure of a nimble project to test a library? ⏎ Currently, I have: ⏎ ⏎ ```src/ ⏎ my_lib.nim ⏎ tests/ ⏎ test.nim``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5aca473a1130fe3d36b575fb]
16:46:08FromGitter<k0pernicus> Unfortunately, `test.nim` canno’t open `my_lib`
16:46:30FromGitter<k0pernicus> Do I need to give a relative path to my nim library?
16:48:57miranwhat is the error?
16:50:02FromGitter<k0pernicus> `canno’t open my_lib`
16:52:27FromGitter<k0pernicus> I updated my `nim.cfg` file in tests with `—path:"../src »`
16:52:35FromGitter<k0pernicus> But it does not works either...
16:53:24miranhmmm, do your procs have * (to make make them "seen")?
16:53:33FromGitter<k0pernicus> yes
16:54:51miranis maybe `_` in the name a problem? try renaming it
16:56:34dom96k0pernicus: what directory are you trying to compile the 'test' in?
16:57:04dom96If you're doing it in the 'tests' dir then that's your problem
16:57:12FromGitter<k0pernicus> I launch `nimble test` in my root directory
16:57:36dom96and you have a nim.cfg file in the tests dir?
16:57:43FromGitter<k0pernicus> Yes
16:57:49FromGitter<k0pernicus> My `nim.cfg` contains
16:57:58FromGitter<k0pernicus> `--path:"../src/« `
16:58:16dom96well, if `nimble test` runs in the root directory
16:58:19dom96then that's wrong
16:58:27FromGitter<k0pernicus> :-/
16:58:47dom96so just remove the `../`
16:58:52FromGitter<k0pernicus> Oh...
16:58:55FromGitter<k0pernicus> I found
16:58:58FromGitter<k0pernicus> -_-
16:59:05FromGitter<k0pernicus> Call me « Mr Stupid »
16:59:17FromGitter<k0pernicus> Forgot to save my nim file after adding `*`...
16:59:28FromGitter<k0pernicus> (for all the procedures)
16:59:30dom96D:
16:59:32FromGitter<k0pernicus> Sorry for that
16:59:40miran1:0 for me :D
16:59:50FromGitter<k0pernicus> Ah ah, you were right miran ^^
16:59:56FromGitter<k0pernicus> Sorry guys
17:00:20*dom96 still wonders if the default `test` task for Nimble runs it in the root
17:00:31mirandon't worry. usually i'm the one with that kind of questions and 5min later realizations :D
17:00:54FromGitter<k0pernicus> dom96 don’t think so with my `—path=« ../src »` :-/
17:01:03dom96yeah, doesn't look like it
17:01:17dom96I guess it should?
17:01:40mirandom96: `nimble test` run from the root works
17:01:51dom96yeah, but it runs the tests from the root too
17:02:05dom96I don't know if that's correct or not
17:02:27FromGitter<k0pernicus> That’s a good question
17:02:48dom96oh well, I'll add an issue
17:03:11FromGitter<k0pernicus> Running the `nimble test` task in the root may introduced some flexibility in order to find automatically nim libs, no?
17:03:35mirani have tests in ./tests/, source in ./src/, and `--path:"../src/"` in nim.cfg inside of tests. it runs the tests inside of tests
17:03:38FromGitter<k0pernicus> (Like adding automatically in the PATH all the directories that contains nim files, or something like that)
17:03:44dom96miran: Do you have a custom 'test' task?
17:04:02dom96k0pernicus: yeah, it should do that too
17:04:21mirandom96: i have a fork of this: https://github.com/treeform/chroma
17:04:37dom96https://github.com/treeform/chroma/blob/master/chroma.nimble#L13
17:04:44dom96custom task which runs them in the root :)
17:04:58miranoooh!
17:19:34*yglukhov quit (Ping timeout: 264 seconds)
17:33:57*miran quit (Ping timeout: 264 seconds)
17:45:20federico3is the "create gist" button working on Nim playground?
17:45:31dom96nope
17:45:34federico3if not, any playground/REPL that allows saving/sharing?
17:46:49federico3anyhow, this looks like a bug http://paste.debian.net/1019308/
17:47:15*aguspiza joined #nim
17:55:22FromGitter<Varriount> @zacharycarter Are you around?
17:57:23FromGitter<mratsim> @federico3 isn’t that related to the anonymous gist deprecation?
17:57:40federico3I don't know
17:58:57dom96it is
17:59:02dom96zacharycarter is working on fixing it
18:04:43*Cthalupa quit (Ping timeout: 260 seconds)
18:08:22FromGitter<stisa> Btw federico3 , glot should still work for sharing https://glot.io/new/nim
18:08:54*Cthalupa joined #nim
18:10:44federico3thanks
18:11:18FromGitter<AjBreidenbach> that's cool
18:11:48federico3nice indeed
18:12:01federico3https://glot.io/snippets/ezxlivqimy
18:15:08FromGitter<Varriount> dom96: Does httpclient.getContent require special treatment to send query strings?
18:15:26dom96no
18:15:49FromGitter<Varriount> I ask because the query string I'm sending doesn't appear to make it to the data sent
18:17:00dom96Try curl and if it works, see what httpclient does differently
18:17:03dom96Could very well be a bug
18:18:04FromGitter<Varriount> dom96: Ah, nevermind, my fault.
18:18:18FromGitter<Varriount> I was appending the wrong variable to the URL
18:19:00FromGitter<Varriount> dom96: I now have a (fairly) clean and efficient AWS signing procedure. :D
18:27:35*Vladar quit (Quit: Leaving)
19:01:49*athenot joined #nim
19:05:11*Snircle quit (Ping timeout: 245 seconds)
19:07:39FromGitter<Varriount> @gogolxdong I've updated https://gist.github.com/Varriount/b4c817b46ea5c1b141af7791ff2dbcf7
19:21:06dom96Varriount: awesome
19:21:44dom96Why is it in a gist and not a repo? :)
19:22:18FromGitter<Varriount> Because the file is currently residing in the `~/Temporary`on my hard drive
19:31:02*shashlick quit (Read error: Connection reset by peer)
19:31:31*shashlick joined #nim
19:36:13NoOP@Matrixbot, thanks mate for that help, I will inspect it and check it out it works out :D
19:42:07*djellemah quit (Quit: Leaving)
19:43:23FromGitter<k0pernicus> I checked on `strutils` and `sequtils` but I did not found a procedure to tranform a sequence of chars into a string… ⏎ Also, on the internet, people are using a custom function `toString` to do that. ⏎ Is there a procedure, in the std, to do that please?
19:45:51*NoOP quit (Read error: Connection reset by peer)
19:47:20Yardanicok0pernicus: there's probably no that procedure in the stdlib, but it's not hard to make one
19:47:44FromGitter<k0pernicus> I agree: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aca71e0109bb043329f426f]
19:47:50YardanicoJust use toString procedure from stackoverflow :)
19:48:07FromGitter<k0pernicus> @Yardanico Already copy/pasted :-p
19:48:26FromGitter<k0pernicus> But it seems there are issues with decimal characters...
19:48:44Yardanicowhat problems?
19:49:12FromGitter<k0pernicus> @[‘\x01’, ‘e’, ‘l’, ‘o’]` gives the `elo` string
19:49:30FromGitter<k0pernicus> (instead of `1elo`)
19:50:59FromGitter<data-man> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aca72a3080a3850530e4cf4]
19:52:18FromGitter<k0pernicus> @data-man Thanks, but there is the problem with hexadecimal characters
19:52:33FromGitter<k0pernicus> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aca73015f188ccc154340fc]
19:52:42FromGitter<k0pernicus> Returns `ab`
19:53:56FromGitter<Yardanico> @data-man why would you use unsafe features for this simple problem ? :)
19:54:09FromGitter<Yardanico> I know it's more performant, but still
19:54:17FromGitter<data-man> @Yardanico: It's faster :)
19:54:24FromGitter<k0pernicus> It’s hacky :-p
19:54:34FromGitter<data-man> @k0pernicus: ```ab``` for me
19:55:16FromGitter<k0pernicus> Yep, but, for me, the good behavior is, for `@['\x01', 'a', 'b’]`, to return `1ab1
19:55:25FromGitter<k0pernicus> And not `ab`
19:57:08dom96k0pernicus: why do you have a seq[char] in the first place?
19:58:50FromGitter<data-man> ``````
19:59:50FromGitter<k0pernicus> @dom96 I am comparing two strings and add informations in a sequence of characters (a number between `0` and `9` or a character between `a` and `z`) - just for fun (dictionary compression challenge)
20:00:26dom96k0pernicus: so use a string, it's mutable :)
20:00:29dom96You can 'add' to a string
20:00:49FromGitter<k0pernicus> So, for example, if you compare `content` and `contents`, it returns `7s` (because the 7 first characters are the same, but `s` is just an added information)
20:00:54FromGitter<k0pernicus> Performance are the same ?
20:01:08dom96yes
20:01:17FromGitter<k0pernicus> Oh ok, cool :-)
20:01:48FromGitter<k0pernicus> Just an habit using Python so...
20:02:21dom96Keep a note of these things and write a "Nim for Python programmers" :)
20:02:47FromGitter<k0pernicus> Definitly
20:03:00FromGitter<k0pernicus> :-)
20:03:07*aguspiza quit (Ping timeout: 245 seconds)
20:09:44*aguspiza joined #nim
20:23:21FromGitter<mratsim> @k0pernicus I’m pretty sure $yourseqofchars works
20:31:08FromGitter<mratsim> I feel like I have a static curse
20:34:01FromGitter<data-man> Avada Kedavra Static Curse?
20:34:28dom96Wingardium Leviosa!
20:36:17FromGitter<data-man> Nimwarts School of Witchcraft and Wizardry
20:36:31dom96:D
20:38:40*NimBot joined #nim
20:42:45FromGitter<mratsim> or use the nuclear solution cast :P
20:43:14FromGitter<mratsim> works for me™
20:43:29FromGitter<k0pernicus> Also, I don’t understand the behaviour of `result` for the case of `sequence`… ⏎ For example, this code throws an exception (because `result` is a pointer to a non-initialized sequence) ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5aca7ef15f188ccc15436d13]
20:44:01FromGitter<mratsim> ```proc ex(): seq[int] = ⏎ result = @[] ⏎ for i in 0..10: ⏎ result.add(i)``` [https://gitter.im/nim-lang/Nim?at=5aca7f112dfcfffd2b2c3aef]
20:44:50FromGitter<k0pernicus> Makes sense… As `result` has been initialized and can be modified, it correspond to an implicit `var result: expected_type`
20:44:53FromGitter<k0pernicus> Thanks @mratsim
20:50:58FromGitter<mratsim> you’re welcome
20:52:21FromGitter<mratsim> @data-man @dom96: no comment lol
20:54:44FromGitter<data-man> @mratsim: Will you be a Maths Classroom Professor? :)
21:00:07*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:00:18FromGitter<mratsim> Defence against the Tensor Arts
21:01:12FromGitter<mratsim> I can’t stuck on my go playing bot because of static issues :/
21:06:06*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:19:59dom96hah, you couldn't even resist a HP pun :D
21:20:20dom96Which static issues?
21:20:34*Snircle joined #nim
21:22:42FromGitter<mratsim> THis one or this one: https://github.com/nim-lang/Nim/issues/7546, https://github.com/nim-lang/Nim/issues/7547
21:23:30FromGitter<mratsim> well it’s fine, I hardcoded max go board size, it will be less efficient on small board but oh well.
22:15:06*nsf quit (Quit: WeeChat 2.0.1)
22:28:17*aguspiza quit (Ping timeout: 260 seconds)
22:37:24FromGitter<k0pernicus> Finished a first « draft » vof a toy dictionary compression (the challenge about the compression is here: https://jmarcher.io/programming-challenge-dictionary-compression/)
22:38:41FromGitter<k0pernicus> If you have any comment/request for performance/etc… Do not hesitate to create an issue please :-)
22:38:46FromGitter<k0pernicus> The code is here https://github.com/k0pernicus/dictionary_compression_challenge
22:39:01FromGitter<k0pernicus> I will improve the code later - need to sleep now :-p
22:44:34*xet7 quit (Ping timeout: 256 seconds)
22:47:36*smt joined #nim
23:22:38*onionhammer1 quit (Quit: WeeChat 1.9.1)
23:23:16*onionhammer joined #nim
23:27:35FromGitter<mratsim> I’ve added my comment in an issue @k0pernicus
23:30:47FromGitter<Varriount> @mratsim I think I've already said this, but I'm finding the new toOpenArray functions very handy for reducing copies.
23:31:03FromGitter<Varriount> Perhaps it might be helpful for arraymancer?
23:42:16FromGitter<gogolxdong> @Varriount your DescribeRegions works while my DescribeInstances doesn't. https://gist.github.com/gogolxdong/cef0a48f7f6ad98545db077c9672dee9