00:01:56 | shashlick | Here's what I had so far |
00:02:00 | shashlick | https://pastebin.com/jdbRx18T |
00:02:27 | shashlick | You'll need to change the GitHub url and folders up a bit |
00:06:51 | FromGitter | <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:36 | shashlick | It's funny, the GitHub repo is the mirror, and it is different from the official repo on googlesource.com |
00:08:58 | shashlick | And both are different from the webkit GitHub |
00:09:23 | FromGitter | <gogolxdong> it says `Unofficial mirror of the WebKit SVN repository` |
00:10:33 | FromGitter | <gogolxdong> google takes webkit and makes its own browser core named blink. |
00:11:23 | FromGitter | <gogolxdong> I think WebKit repo is the original. |
00:50:22 | FromGitter | <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:06 | FromGitter | <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:27 | FromGitter | <gogolxdong> It pulled with --depth=1 and with `error: Sparse checkout leaves no entry on working directory` |
01:40:05 | shashlick | That's cause that repo doesn't have those folders anymore |
01:40:21 | shashlick | See how it is trying a sparse checkout |
01:40:31 | FromGitter | <gogolxdong> Can I change n.prepare to local directory? |
01:40:54 | shashlick | If 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:08 | shashlick | I use it to automate wrapping |
01:41:58 | FromGitter | <gogolxdong> yes, I put nimkit.cfg under WebKit/Source/core/dom/ where Node.h lies in. |
01:45:11 | FromGitter | <AjBreidenbach> are you guys making a browser? |
01:45:37 | FromGitter | <gogolxdong> yes, I am trying to make a nim native browser. |
01:45:41 | FromGitter | <gogolxdong> error: Sparse checkout leaves no entry on working directory |
01:45:50 | FromGitter | <gogolxdong> Cannot use recurse and inline simultaneously |
01:46:28 | FromGitter | <gogolxdong> @shashlick I commented out inline=true, it hints File doesn't exist: base/macros.h |
01:46:45 | FromGitter | <gogolxdong> `````` |
01:46:48 | FromGitter | <gogolxdong> `````` |
01:46:59 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac97492080a3850530aefb7] |
01:48:11 | shashlick | See the included in node.h |
01:48:31 | FromGitter | <gogolxdong> it's the first line. |
01:48:36 | shashlick | Those files need to exist |
01:48:49 | FromGitter | <gogolxdong> #ifndef Node_h ⏎ ⏎ #define Node_h ⏎ ⏎ #include "base/macros.h" ... [https://gitter.im/nim-lang/Nim?at=5ac97501270d7d3708a3adf8] |
01:50:07 | FromGitter | <gogolxdong> It must lies in other path. |
01:55:57 | FromGitter | <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:30 | shashlick | If 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:32 | FromGitter | <gogolxdong> `mnt/d/WebKit/Source/core/dom/temp-macros.nim.c` |
03:08:42 | FromGitter | <gogolxdong> `mnt/d/WebKit/Source/core/dom/temp-macros.nim.c(1, 40) Error: identifier expected, but found '&'` |
03:16:39 | shashlick | C2nim 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:30 | FromGitter | <gogolxdong> generally means need coding manually. |
04:51:08 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:51:32 | shashlick | I'd just use c2nim to get a wrapper done. Reimplementing in pure Nim will require a lot of manual coding. |
04:55:52 | FromGitter | <data-man> @shashlick: Just an idea for nimgen: to use gcc -E -P. It's reduced gcc's output. |
04:57:54 | shashlick | It already uses -E. What's -P? |
04:58:22 | shashlick | preprocess = true |
04:58:37 | FromGitter | <data-man> Strip lines numbers |
05:10:41 | * | acidx quit (Ping timeout: 256 seconds) |
05:11:02 | * | acidx joined #nim |
05:25:13 | shashlick | Ok, 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:10 | FromGitter | <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:17 | FromGitter | <gogolxdong> @shashlick https://github.com/gogolxdong/WebKit |
05:37:48 | shashlick | Ya, see how the other nimgen libs are organized |
05:38:23 | shashlick | cfg is at the root, specifies include directories based on output directory |
05:42:09 | FromGitter | <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:56 | FromGitter | <alehander42> Ah I just realized my nim forum posts are not visible |
06:32:21 | FromGitter | <alehander42> Do I need to somehow further activate my account |
06:32:32 | FromGitter | <alehander42> I thought I did with an email |
06:34:22 | miran | you need to ping dom96 ;) |
06:36:24 | FromGitter | <gogolxdong> @shashlick can I write the header files independency hierarchy like this ``` |
06:36:34 | FromGitter | <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:55 | FromGitter | <gogolxdong> I see , we can put cloned modules under the path specified in [n.include] section manually . |
07:18:21 | FromGitter | <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:44 | FromGitter | <gogolxdong> manual coding is overwhelmed. |
07:29:48 | FromGitter | <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:46 | FromGitter | <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:23 | FromGitter | <Varriount> @zacharycarter An initial test against the V4 signing code looks correct. |
10:09:39 | FromGitter | <Varriount> The next step will be writing up a tool that validates the procedure against the test cases supplied by AWS. |
10:10:11 | FromGitter | <gogolxdong> Are you testing s3 client ,it's correct . |
10:10:34 | FromGitter | <Varriount> No, I'm writing my own |
10:10:48 | FromGitter | <gogolxdong> ec2 client has some problems. |
10:11:11 | FromGitter | <Varriount> Currently my code only generates the signing information. |
10:12:10 | FromGitter | <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:21 | FromGitter | <Varriount> This is an implementation that is currently only on my laptop. |
10:15:41 | FromGitter | <Varriount> It doesn't make requests. |
10:16:14 | FromGitter | <Varriount> It doesn't even do all the data preprocessing required. |
10:16:43 | FromGitter | <Varriount> This new code only generates the authorization data |
10:17:45 | FromGitter | <Varriount> @zacharycarter @gogolxdong https://gist.github.com/Varriount/b4c817b46ea5c1b141af7791ff2dbcf7 |
10:18:31 | FromGitter | <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:14 | FromGitter | <Varriount> As I have just said, I am not working on that old code. It wasn't even *my* code really. |
10:19:32 | FromGitter | <gogolxdong> ok , I see. |
10:20:04 | FromGitter | <Varriount> The gist I just posted contains new code. |
10:21:07 | * | aguspiza joined #nim |
10:24:03 | FromGitter | <exts> does nim have union types? |
10:24:11 | FromGitter | <exts> google's sucking right now |
10:24:38 | FromGitter | <gogolxdong> you can use object variant. |
10:24:40 | FromGitter | <alehander42> it depends on what you mean by "union" types |
10:25:04 | FromGitter | <alehander42> it has variants and also "A | B" types |
10:25:23 | FromGitter | <exts> alright let me try |
10:34:39 | FromGitter | <zetashift> Are "A|B" types simply enums? |
10:39:09 | * | xet7 joined #nim |
10:39:26 | * | miran joined #nim |
10:44:18 | FromGitter | <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:47 | FromGitter | <gogolxdong> @Varriount https://gist.github.com/gogolxdong/db4a5f187e109ac9a89af6e24927b411 |
10:56:02 | FromGitter | <gogolxdong> 401 Unauthorized |
11:20:32 | * | nsf quit (Quit: WeeChat 2.0.1) |
12:07:41 | FromGitter | <exts> is "result" deprecated? |
12:07:51 | FromGitter | <exts> inside procs |
12:08:19 | FromGitter | <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:54 | FromGitter | <exts> and damn this isn't a feature :( https://github.com/nim-lang/Nim/issues/1070 |
12:25:05 | miran | result is not deprecated |
12:35:25 | FromGitter | <mratsim> Iwasn’t aware of this but this sure is awesome: https://forum.nim-lang.org/t/3732 |
12:35:52 | FromGitter | <mratsim> @exts: use type Foo {.union.} = object |
12:37:18 | FromGitter | <mratsim> @diegogub for cross compilation you have a —os: compile-time flag — https://nim-lang.org/docs/nimc.html |
13:01:29 | dom96 | you 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:39 | NoOp | :D |
13:38:42 | NoOp | Hello guys |
13:39:37 | * | NoOp is now known as MrNoOp |
13:40:09 | * | MrNoOp is now known as NoOP |
13:44:28 | dom96 | hey! |
13:48:15 | FromGitter | <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:44 | NoOP | How 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:18 | NoOP | I 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:47 | NoOP | I 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:03 | NoOP | how can I delete the duplicate message? |
14:06:21 | FromGitter | <Varriount> @gogolxdong You need to pass in an appropriate datetime object. It's currently using the one from the test suite. |
14:07:33 | FromGitter | <Varriount> The URI also needs to match, as well as a couple of other parameters. |
14:09:59 | FromGitter | <gogolxdong> I used "ec2.us-east-2.amazonaws.com" as URI |
14:10:10 | FromGitter | <mratsim> @NoOP, I remember a —app:lib flag |
14:10:52 | FromGitter | <mratsim> but iirc there were some extra flags to remove NimMain and maybe initialize the runtime properly |
14:12:46 | FromGitter | <gogolxdong> @Varriount What is the uri in createAwsAuthorization? Shouldn't it be "/"? |
14:14:09 | FromGitter | <gogolxdong> "ec2.us-east-2.amazonaws.com" as host. |
14:14:14 | NoOP | I se |
14:15:31 | Yardanico | NoOP, you can't remove duplicated messages from IRC :) |
14:15:36 | Yardanico | or any messages in general |
14:15:55 | NoOP | alright :S |
14:20:45 | FromGitter | <Varriount> @gogolxdong Yes |
14:25:18 | dom96 | NoOP: You might be able to use this as an example: https://github.com/xomachine/SteamForwarder |
14:25:28 | dom96 | https://github.com/xomachine/SteamForwarder/blob/master/steam_api.nim#L27 |
14:47:13 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:04:02 | FromGitter | <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:35 | FromGitter | <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:46 | FromGitter | <genotrance> n.exclude it |
15:07:10 | * | arecaceae quit (Remote host closed the connection) |
15:07:26 | FromGitter | <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:56 | FromGitter | <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:17 | miran | discard ? |
15:39:49 | FromGitter | <k0pernicus> Oh yeah, I am dumb :-| |
15:39:54 | FromGitter | <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:46 | FromGitter | <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:08 | FromGitter | <k0pernicus> Unfortunately, `test.nim` canno’t open `my_lib` |
16:46:30 | FromGitter | <k0pernicus> Do I need to give a relative path to my nim library? |
16:48:57 | miran | what is the error? |
16:50:02 | FromGitter | <k0pernicus> `canno’t open my_lib` |
16:52:27 | FromGitter | <k0pernicus> I updated my `nim.cfg` file in tests with `—path:"../src »` |
16:52:35 | FromGitter | <k0pernicus> But it does not works either... |
16:53:24 | miran | hmmm, do your procs have * (to make make them "seen")? |
16:53:33 | FromGitter | <k0pernicus> yes |
16:54:51 | miran | is maybe `_` in the name a problem? try renaming it |
16:56:34 | dom96 | k0pernicus: what directory are you trying to compile the 'test' in? |
16:57:04 | dom96 | If you're doing it in the 'tests' dir then that's your problem |
16:57:12 | FromGitter | <k0pernicus> I launch `nimble test` in my root directory |
16:57:36 | dom96 | and you have a nim.cfg file in the tests dir? |
16:57:43 | FromGitter | <k0pernicus> Yes |
16:57:49 | FromGitter | <k0pernicus> My `nim.cfg` contains |
16:57:58 | FromGitter | <k0pernicus> `--path:"../src/« ` |
16:58:16 | dom96 | well, if `nimble test` runs in the root directory |
16:58:19 | dom96 | then that's wrong |
16:58:27 | FromGitter | <k0pernicus> :-/ |
16:58:47 | dom96 | so just remove the `../` |
16:58:52 | FromGitter | <k0pernicus> Oh... |
16:58:55 | FromGitter | <k0pernicus> I found |
16:58:58 | FromGitter | <k0pernicus> -_- |
16:59:05 | FromGitter | <k0pernicus> Call me « Mr Stupid » |
16:59:17 | FromGitter | <k0pernicus> Forgot to save my nim file after adding `*`... |
16:59:28 | FromGitter | <k0pernicus> (for all the procedures) |
16:59:30 | dom96 | D: |
16:59:32 | FromGitter | <k0pernicus> Sorry for that |
16:59:40 | miran | 1:0 for me :D |
16:59:50 | FromGitter | <k0pernicus> Ah ah, you were right miran ^^ |
16:59:56 | FromGitter | <k0pernicus> Sorry guys |
17:00:20 | * | dom96 still wonders if the default `test` task for Nimble runs it in the root |
17:00:31 | miran | don't worry. usually i'm the one with that kind of questions and 5min later realizations :D |
17:00:54 | FromGitter | <k0pernicus> dom96 don’t think so with my `—path=« ../src »` :-/ |
17:01:03 | dom96 | yeah, doesn't look like it |
17:01:17 | dom96 | I guess it should? |
17:01:40 | miran | dom96: `nimble test` run from the root works |
17:01:51 | dom96 | yeah, but it runs the tests from the root too |
17:02:05 | dom96 | I don't know if that's correct or not |
17:02:27 | FromGitter | <k0pernicus> That’s a good question |
17:02:48 | dom96 | oh well, I'll add an issue |
17:03:11 | FromGitter | <k0pernicus> Running the `nimble test` task in the root may introduced some flexibility in order to find automatically nim libs, no? |
17:03:35 | miran | i 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:38 | FromGitter | <k0pernicus> (Like adding automatically in the PATH all the directories that contains nim files, or something like that) |
17:03:44 | dom96 | miran: Do you have a custom 'test' task? |
17:04:02 | dom96 | k0pernicus: yeah, it should do that too |
17:04:21 | miran | dom96: i have a fork of this: https://github.com/treeform/chroma |
17:04:37 | dom96 | https://github.com/treeform/chroma/blob/master/chroma.nimble#L13 |
17:04:44 | dom96 | custom task which runs them in the root :) |
17:04:58 | miran | oooh! |
17:19:34 | * | yglukhov quit (Ping timeout: 264 seconds) |
17:33:57 | * | miran quit (Ping timeout: 264 seconds) |
17:45:20 | federico3 | is the "create gist" button working on Nim playground? |
17:45:31 | dom96 | nope |
17:45:34 | federico3 | if not, any playground/REPL that allows saving/sharing? |
17:46:49 | federico3 | anyhow, this looks like a bug http://paste.debian.net/1019308/ |
17:47:15 | * | aguspiza joined #nim |
17:55:22 | FromGitter | <Varriount> @zacharycarter Are you around? |
17:57:23 | FromGitter | <mratsim> @federico3 isn’t that related to the anonymous gist deprecation? |
17:57:40 | federico3 | I don't know |
17:58:57 | dom96 | it is |
17:59:02 | dom96 | zacharycarter is working on fixing it |
18:04:43 | * | Cthalupa quit (Ping timeout: 260 seconds) |
18:08:22 | FromGitter | <stisa> Btw federico3 , glot should still work for sharing https://glot.io/new/nim |
18:08:54 | * | Cthalupa joined #nim |
18:10:44 | federico3 | thanks |
18:11:18 | FromGitter | <AjBreidenbach> that's cool |
18:11:48 | federico3 | nice indeed |
18:12:01 | federico3 | https://glot.io/snippets/ezxlivqimy |
18:15:08 | FromGitter | <Varriount> dom96: Does httpclient.getContent require special treatment to send query strings? |
18:15:26 | dom96 | no |
18:15:49 | FromGitter | <Varriount> I ask because the query string I'm sending doesn't appear to make it to the data sent |
18:17:00 | dom96 | Try curl and if it works, see what httpclient does differently |
18:17:03 | dom96 | Could very well be a bug |
18:18:04 | FromGitter | <Varriount> dom96: Ah, nevermind, my fault. |
18:18:18 | FromGitter | <Varriount> I was appending the wrong variable to the URL |
18:19:00 | FromGitter | <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:39 | FromGitter | <Varriount> @gogolxdong I've updated https://gist.github.com/Varriount/b4c817b46ea5c1b141af7791ff2dbcf7 |
19:21:06 | dom96 | Varriount: awesome |
19:21:44 | dom96 | Why is it in a gist and not a repo? :) |
19:22:18 | FromGitter | <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:13 | NoOP | @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:23 | FromGitter | <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:20 | Yardanico | k0pernicus: there's probably no that procedure in the stdlib, but it's not hard to make one |
19:47:44 | FromGitter | <k0pernicus> I agree: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aca71e0109bb043329f426f] |
19:47:50 | Yardanico | Just use toString procedure from stackoverflow :) |
19:48:07 | FromGitter | <k0pernicus> @Yardanico Already copy/pasted :-p |
19:48:26 | FromGitter | <k0pernicus> But it seems there are issues with decimal characters... |
19:48:44 | Yardanico | what problems? |
19:49:12 | FromGitter | <k0pernicus> @[‘\x01’, ‘e’, ‘l’, ‘o’]` gives the `elo` string |
19:49:30 | FromGitter | <k0pernicus> (instead of `1elo`) |
19:50:59 | FromGitter | <data-man> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aca72a3080a3850530e4cf4] |
19:52:18 | FromGitter | <k0pernicus> @data-man Thanks, but there is the problem with hexadecimal characters |
19:52:33 | FromGitter | <k0pernicus> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aca73015f188ccc154340fc] |
19:52:42 | FromGitter | <k0pernicus> Returns `ab` |
19:53:56 | FromGitter | <Yardanico> @data-man why would you use unsafe features for this simple problem ? :) |
19:54:09 | FromGitter | <Yardanico> I know it's more performant, but still |
19:54:17 | FromGitter | <data-man> @Yardanico: It's faster :) |
19:54:24 | FromGitter | <k0pernicus> It’s hacky :-p |
19:54:34 | FromGitter | <data-man> @k0pernicus: ```ab``` for me |
19:55:16 | FromGitter | <k0pernicus> Yep, but, for me, the good behavior is, for `@['\x01', 'a', 'b’]`, to return `1ab1 |
19:55:25 | FromGitter | <k0pernicus> And not `ab` |
19:57:08 | dom96 | k0pernicus: why do you have a seq[char] in the first place? |
19:58:50 | FromGitter | <data-man> `````` |
19:59:50 | FromGitter | <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:26 | dom96 | k0pernicus: so use a string, it's mutable :) |
20:00:29 | dom96 | You can 'add' to a string |
20:00:49 | FromGitter | <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:54 | FromGitter | <k0pernicus> Performance are the same ? |
20:01:08 | dom96 | yes |
20:01:17 | FromGitter | <k0pernicus> Oh ok, cool :-) |
20:01:48 | FromGitter | <k0pernicus> Just an habit using Python so... |
20:02:21 | dom96 | Keep a note of these things and write a "Nim for Python programmers" :) |
20:02:47 | FromGitter | <k0pernicus> Definitly |
20:03:00 | FromGitter | <k0pernicus> :-) |
20:03:07 | * | aguspiza quit (Ping timeout: 245 seconds) |
20:09:44 | * | aguspiza joined #nim |
20:23:21 | FromGitter | <mratsim> @k0pernicus I’m pretty sure $yourseqofchars works |
20:31:08 | FromGitter | <mratsim> I feel like I have a static curse |
20:34:01 | FromGitter | <data-man> Avada Kedavra Static Curse? |
20:34:28 | dom96 | Wingardium Leviosa! |
20:36:17 | FromGitter | <data-man> Nimwarts School of Witchcraft and Wizardry |
20:36:31 | dom96 | :D |
20:38:40 | * | NimBot joined #nim |
20:42:45 | FromGitter | <mratsim> or use the nuclear solution cast :P |
20:43:14 | FromGitter | <mratsim> works for me™ |
20:43:29 | FromGitter | <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:01 | FromGitter | <mratsim> ```proc ex(): seq[int] = ⏎ result = @[] ⏎ for i in 0..10: ⏎ result.add(i)``` [https://gitter.im/nim-lang/Nim?at=5aca7f112dfcfffd2b2c3aef] |
20:44:50 | FromGitter | <k0pernicus> Makes sense… As `result` has been initialized and can be modified, it correspond to an implicit `var result: expected_type` |
20:44:53 | FromGitter | <k0pernicus> Thanks @mratsim |
20:50:58 | FromGitter | <mratsim> you’re welcome |
20:52:21 | FromGitter | <mratsim> @data-man @dom96: no comment lol |
20:54:44 | FromGitter | <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:18 | FromGitter | <mratsim> Defence against the Tensor Arts |
21:01:12 | FromGitter | <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:59 | dom96 | hah, you couldn't even resist a HP pun :D |
21:20:20 | dom96 | Which static issues? |
21:20:34 | * | Snircle joined #nim |
21:22:42 | FromGitter | <mratsim> THis one or this one: https://github.com/nim-lang/Nim/issues/7546, https://github.com/nim-lang/Nim/issues/7547 |
21:23:30 | FromGitter | <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:24 | FromGitter | <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:41 | FromGitter | <k0pernicus> If you have any comment/request for performance/etc… Do not hesitate to create an issue please :-) |
22:38:46 | FromGitter | <k0pernicus> The code is here https://github.com/k0pernicus/dictionary_compression_challenge |
22:39:01 | FromGitter | <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:35 | FromGitter | <mratsim> I’ve added my comment in an issue @k0pernicus |
23:30:47 | FromGitter | <Varriount> @mratsim I think I've already said this, but I'm finding the new toOpenArray functions very handy for reducing copies. |
23:31:03 | FromGitter | <Varriount> Perhaps it might be helpful for arraymancer? |
23:42:16 | FromGitter | <gogolxdong> @Varriount your DescribeRegions works while my DescribeInstances doesn't. https://gist.github.com/gogolxdong/cef0a48f7f6ad98545db077c9672dee9 |