00:31:28 | * | sz0 joined #nim |
00:37:29 | * | shashlick1 quit (Quit: WeeChat 1.9.1) |
00:37:49 | * | shashlick1 joined #nim |
00:43:48 | FromGitter | <matrixbot> `petersjt014` Hi: ⏎ So I've just written my 1st thing in Nim (it almost works maybe) and I wanted to ask: Is there any way I can manage mutithreading by just saying 'call this recursive function to completion, and only use a max of X ram or Y threads' or something? ⏎ It can work out of order (just adding stuff), so I don't give a shite about locks for this situation (should make things easier I imagine). |
00:51:23 | FromGitter | <zacharycarter> look into threadpool? |
00:51:29 | FromGitter | <zacharycarter> short answer is no |
00:51:41 | FromGitter | <zacharycarter> nothing exists at that high of a level |
00:55:17 | FromGitter | <matrixbot> `petersjt014` yeah, thought so maybe. I have something recursive in bash that I tried to make mutitheaded |
00:55:43 | FromGitter | <matrixbot> `petersjt014` it's for parsing filesystems modeled as trees |
00:56:02 | FromGitter | <matrixbot> `petersjt014` I added something to it |
00:56:18 | FromGitter | <matrixbot> `petersjt014` a single `&` |
00:56:37 | FromGitter | <matrixbot> `petersjt014` the tree was 13 GB |
00:59:42 | * | Ven`` joined #nim |
01:03:41 | FromGitter | <matrixbot> `petersjt014` life became much harder for the next two hours |
01:08:04 | FromGitter | <matrixbot> `petersjt014` Now that I think about it, I could just daemonize conditionally |
01:08:07 | FromGitter | <matrixbot> `petersjt014` hmm |
01:09:05 | FromDiscord | <treeform> Is there a way to replace int with any numeric type in this func: `func pretty*(number: int): string = $number` |
01:09:51 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:11:52 | FromDiscord | <treeform> like `pretty*(number: (int, float, int8, int16, int32... )): string = $number` ? |
01:13:14 | * | S1tiSchu joined #nim |
01:17:10 | * | SitiSchu quit (Ping timeout: 264 seconds) |
01:47:21 | * | yunfan quit (Ping timeout: 240 seconds) |
02:10:51 | FromGitter | <Varriount> treeform: Use SomeInteger |
02:12:36 | FromGitter | <Varriount> petersjt: You can look into parallel and spawn: https://nim-lang.org/docs/manual.html#parallel-spawn |
02:15:10 | FromGitter | <matrixbot> `petersjt014` thanks, I will once I get the single-thread version working |
02:18:48 | * | gmpreussner quit (Ping timeout: 260 seconds) |
02:21:09 | * | gmpreussner joined #nim |
02:28:05 | * | gmpreussner quit (Ping timeout: 256 seconds) |
02:29:09 | * | gmpreussner joined #nim |
02:36:09 | FromGitter | <matrixbot> `petersjt014` erg, I'm getting an error with a source listed in `strfmt.nim` instead of my own code >_< |
02:36:46 | FromGitter | <matrixbot> `petersjt014` I'll see if I can post it without mangling the formatting |
02:38:00 | FromGitter | <matrixbot> `petersjt014` well the error itself is: ⏎ `~\.nimble\pkgs\strfmt-0.9.0\strfmt.nim(812, 10) Error: type mismatch: got (uint8, int literal(10))` |
02:38:42 | FromGitter | <matrixbot> `petersjt014` ```nim ⏎ import os, osproc, strfmt, strutils, typetraits ⏎ proc recur(hash: string, depth: int, peersnum: int): int = ⏎ ⏎ var (rl, _) = execCmdEx interp"ipfs refs $hash" ... [https://gitter.im/nim-lang/Nim?at=5ac197b2e3d0b1ff2c90284e] |
02:39:23 | FromGitter | <matrixbot> `petersjt014` I'm like 90% sure It's something I'm doing with string interp. |
02:42:07 | FromGitter | <matrixbot> `petersjt014` I can plop the rest of the error here if needed |
02:43:51 | FromGitter | <Varriount> Indentation got screwed up. :/ |
02:45:37 | FromGitter | <matrixbot> `petersjt014` Hmm. one sec plox |
02:45:58 | * | michaeljordan joined #nim |
02:50:25 | FromGitter | <matrixbot> `petersjt014` https://pastebin.com/LWpJ4XBp |
02:50:41 | * | gmpreussner quit (Ping timeout: 248 seconds) |
02:52:10 | * | gmpreussner joined #nim |
02:54:00 | FromGitter | <Varriount> That compiles for me. |
02:54:07 | * | endragor joined #nim |
02:54:24 | FromGitter | <Varriount> When did you download/update your compiler? |
02:55:00 | * | endragor quit (Remote host closed the connection) |
02:55:11 | FromGitter | <matrixbot> `petersjt014` a few days ago |
02:55:43 | FromGitter | <matrixbot> `petersjt014` `version 0.11.2` |
02:55:53 | FromGitter | <Varriount> Hm, I have an older version, let me update. |
02:56:10 | * | endragor joined #nim |
02:56:22 | FromGitter | <matrixbot> `petersjt014` oh |
02:56:48 | FromGitter | <matrixbot> `petersjt014` `Copyright (c) 2006-2015` |
02:56:48 | FromGitter | <matrixbot> `petersjt014` hm |
02:57:02 | FromGitter | <Varriount> O_o |
02:57:38 | FromGitter | <matrixbot> `petersjt014` does nimble update nim itself? |
02:59:39 | FromGitter | <matrixbot> `petersjt014` or can I just swap out the files? |
03:03:18 | FromGitter | <matrixbot> `petersjt014` cuz it turns out I have 0.11.2 when at least 0.18.0 is available |
03:03:23 | FromGitter | <Varriount> Nimble doesn't update Nim, just non-stdlib packages. |
03:03:35 | FromGitter | <Varriount> Goodness that's old. |
03:03:50 | FromGitter | <matrixbot> `petersjt014` It's the version in my package manager |
03:04:35 | FromGitter | <matrixbot> `petersjt014` although it *is* a package manager running on Windows, so that's kinda notable I gouess |
03:04:52 | FromGitter | <Varriount> I just build Nim from source. |
03:11:14 | FromGitter | <matrixbot> `petersjt014` I'm gonna switch to choosenim--chocolatey's version hasn't been updated since 2015 :| |
03:15:27 | * | yunfan joined #nim |
03:17:43 | FromGitter | <matrixbot> `petersjt014` doesnt work :/ |
03:21:47 | FromGitter | <matrixbot> `petersjt014` manual worked fine. whew |
03:21:58 | FromGitter | <matrixbot> `petersjt014` `Nim Compiler Version 0.18.0` |
03:22:03 | FromGitter | <matrixbot> `petersjt014` that feels realllly nice to see |
03:22:57 | FromGitter | <matrixbot> `petersjt014` and now it compiles :)) |
03:47:10 | * | michaeljordan quit (Quit: Page closed) |
03:47:54 | shashlick1 | petersjt014: what issue did you see with choosenim |
03:57:21 | FromGitter | <matrixbot> `petersjt014` there was something about c and nim not seeing the same architechture |
03:58:03 | FromGitter | <matrixbot> `petersjt014` I've closed the window w/ the error, soz :\ |
03:59:11 | FromGitter | <matrixbot> `petersjt014` also I noticed that chosenim seems to only have i386 |
04:10:11 | shashlick1 | okay that's a known defect |
04:12:14 | FromGitter | <matrixbot> `petersjt014` good to know |
04:12:33 | shashlick1 | https://github.com/dom96/choosenim/issues/16 |
04:18:21 | * | sz0 quit (Quit: Connection closed for inactivity) |
04:52:56 | * | r3d9u11 joined #nim |
05:02:04 | FromGitter | <matrixbot> `petersjt014` well my thing works I think |
05:02:41 | FromGitter | <matrixbot> `petersjt014` problem is that I'm still not sure If it worked in bash cause the only way to verify would be manually |
05:02:50 | FromGitter | <matrixbot> `petersjt014` and my test file is 13GB |
05:03:05 | FromGitter | <matrixbot> `petersjt014` wait |
05:03:12 | FromGitter | <matrixbot> `petersjt014` nvm I'm dumb |
05:03:26 | FromGitter | <matrixbot> `petersjt014` gonna go find a smaller one |
05:03:48 | * | miran joined #nim |
05:35:02 | FromGitter | <matrixbot> `petersjt014` well, more progress. now it's a foreach loop that it won't compile due to. |
05:35:08 | FromGitter | <matrixbot> `petersjt014` https://pastebin.com/QahfdcYp |
05:35:34 | FromGitter | <matrixbot> `petersjt014` any notable oops? |
05:46:46 | * | SenasOzys quit (Read error: Connection reset by peer) |
05:47:01 | * | SenasOzys joined #nim |
05:59:13 | * | nsf joined #nim |
05:59:57 | * | SenasOzys quit (Ping timeout: 240 seconds) |
06:01:00 | * | r3d9u11 quit (Remote host closed the connection) |
07:20:58 | * | Arrrr joined #nim |
07:20:59 | * | Arrrr quit (Changing host) |
07:20:59 | * | Arrrr joined #nim |
07:23:03 | * | yglukhov quit (Read error: Connection reset by peer) |
07:23:40 | * | yglukhov joined #nim |
07:33:35 | FromGitter | <alehander42> ugh sometimes I just have to use methods/inheritance instead of adt-s |
07:33:53 | FromGitter | <alehander42> I had to convince myself for 5 mins :D |
07:47:18 | FromGitter | <matrixbot> `petersjt014` I was trying to do multithreaded recursion in bash before rewriting something in nim |
07:47:25 | FromGitter | <matrixbot> `petersjt014` if that's comprable-ish |
07:47:46 | miran | !eval echo -1 mod 4 |
07:47:48 | FromGitter | <matrixbot> `petersjt014` though it was (is) the first thing in nim i've made, so maybe not |
07:47:49 | NimBot | -1 |
07:48:01 | miran | why is this not 3?! |
07:49:57 | miran | btw, petersjt014: if you connect matrix with irc (and not with gitter), your messages will pass directly, not via bot |
07:53:03 | * | Vladar joined #nim |
07:53:18 | * | petersjt014[m] joined #nim |
07:54:01 | petersjt014[m] | this the right one? |
07:55:58 | * | Trustable joined #nim |
07:56:48 | miran | it is |
07:57:00 | petersjt014[m] | cool |
07:57:01 | miran | petersjt014[m]: now we can mention you much easier ;) |
07:59:28 | petersjt014[m] | since you seem to know a bit more, does anything about my pastebin'd prog above stick out as wrong? my compiler barfs on the for loop for some reason |
08:03:58 | * | gmpreussner quit (Ping timeout: 264 seconds) |
08:04:53 | * | gmpreussner joined #nim |
08:05:16 | miran | petersjt014[m]: strfmt is some nimble package? why not use the built-in https://nim-lang.org/docs/strformat.html ? |
08:08:23 | miran | what do i need to pass as arguments to run this? |
08:08:30 | petersjt014[m] | I saw it at a glance somewhere and just used it, so I guess yes. |
08:08:44 | miran | oh, hash and int |
08:09:07 | petersjt014[m] | yeah, it's for parsing IPFS hashes |
08:09:17 | petersjt014[m] | or it's supposed to be |
08:09:37 | miran | if i comment out `leafcount` (at the end), it seems to work |
08:10:42 | miran | i have imported `strformat` and changed every `interp` with `fmt`- everything else works, but line 36 is a problem.... |
08:11:32 | petersjt014[m] | hmm. then there's some minor thing that I changed that broke it since the paste.. |
08:12:00 | miran | deleting `len` there works |
08:12:28 | miran | ...and i just realized that my stformat change doesn't print what it should :D :D |
08:13:56 | miran | every `$var` needs to be changed to `{var}` to work as expected.... |
08:16:55 | miran | petersjt014[m]: changed everything and now i get "/bin/sh: ipfs: command not found" - i guess you will get more meaningful help from somebody else who uses ipfs.... |
08:17:47 | petersjt014[m] | yeah maybe. but I do have an error that reads `lib\core\macros.nim(377, 1) Error: undeclared identifier: 'hashref'` |
08:18:25 | petersjt014[m] | does that need to be some predefined name like `result`? |
08:22:59 | miran | oh, i think i see what's going on |
08:23:18 | miran | see line 22 |
08:23:52 | miran | you have `$hashref`, and `hashref` is not defined |
08:24:46 | miran | the only `hashref` is inside of a for loop - and that name is only available inside that loop |
08:25:31 | petersjt014[m] | oh |
08:25:32 | petersjt014[m] | whups |
08:27:45 | petersjt014[m] | scoping is a fun little snag. I'm gonna have to rearrange the thing's guts to fix that. not too bad at least |
08:30:11 | petersjt014[m] | if you're curious and want to see what it's supposed to do, this is the bash version I cooked up: |
08:30:20 | petersjt014[m] | https://pastebin.com/z023xQbx |
08:31:31 | petersjt014[m] | I'm like 80% sure it does what I want, but I wouldn't hesitate to try running a bash2nim prog over if If I find one |
08:35:36 | * | nvn joined #nim |
08:42:55 | * | arnetheduck_ joined #nim |
08:42:55 | * | arnetheduck quit (Read error: Connection reset by peer) |
09:02:16 | * | SenasOzys joined #nim |
09:04:38 | Zevv | http://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ |
09:06:59 | * | nvn quit (Ping timeout: 260 seconds) |
09:12:44 | * | xkapastel quit (Quit: Connection closed for inactivity) |
09:22:45 | * | dddddd joined #nim |
09:27:33 | Arrrr | What's the best hack to compare two case objects? |
09:28:34 | FromGitter | <mratsim> @petersjt014 nice to see other people in crypto using Nim :) |
09:28:57 | FromGitter | <mratsim> @Arrrr, memcmp? :P |
09:29:27 | Arrrr | Thanks again my friend. |
09:39:48 | Araq | system.equalMem |
09:43:39 | FromGitter | <mratsim> oh nice, I was looking for something like that. |
09:46:09 | FromGitter | <mratsim> Is there a memcmp that checks if a region is all 0. |
09:53:23 | FromGitter | <mratsim> doesn’t seem like it. Have to roll your own. |
10:08:32 | * | NimBot joined #nim |
10:33:31 | * | athenot joined #nim |
10:36:22 | FromGitter | <alehander42> is there a way to force a `ref` object arg fields to be not assigned to? |
10:38:11 | FromGitter | <alehander42> I was a bit suprised that if I do ⏎ ⏎ ```let z = A() ⏎ z.f()``` ⏎ ⏎ and `f is proc f*(a: A)` I can still modify its fields inside ( it makes sense but I somehow assumed I have to pass a var for that) [https://gitter.im/nim-lang/Nim?at=5ac2081392f5d62057856195] |
10:43:05 | * | miran quit (Ping timeout: 240 seconds) |
10:44:16 | FromGitter | <mratsim> Immutability in Nim is shallow |
10:44:35 | FromGitter | <mratsim> there are 2 threads in the forum and 2 requests on the tracker related I think |
10:45:20 | FromGitter | <mratsim> for ref* |
10:49:57 | * | yglukhov quit (Read error: Connection reset by peer) |
10:50:31 | * | yglukhov joined #nim |
10:51:13 | FromGitter | <mratsim> Some resources: 2013: https://forum.nim-lang.org/t/120#568 November: https://forum.nim-lang.org/t/3374, and closely related copy/memory safety: https://forum.nim-lang.org/t/3635#22673 https://forum.nim-lang.org/t/3663/2 |
11:00:44 | FromGitter | <tim-st> Is there a builtin way to pack seq[enum] to string and back? I'm especially wondering if it's good to use runes if enum.high+1 >= 256 or if there's a better way that generates shorter strings |
11:13:01 | * | vlad1777d joined #nim |
11:14:19 | FromGitter | <tim-st> Here is my current code: https://pastebin.com/mpw6F9ks |
11:25:34 | * | vlad1777d quit (Ping timeout: 264 seconds) |
11:26:48 | FromGitter | <mratsim> I’m not to sure what you want to do but the proper way to use packed enum, as flags typical is set[YourEnum] |
11:27:05 | FromGitter | <tim-st> set doesnt keep order |
11:28:15 | FromGitter | <mratsim> Otherwise you can always roll your own bit vector like i do here to pack bool: https://github.com/numforge/number-theory/blob/e11ea81ae8aad7833468f1ffad953277f40c329b/src/primes.nim#L6-L15 |
11:29:53 | FromGitter | <mratsim> be aware that usually it’s a time vs space tradeoff. unpacking less than word size costs CPU. In my case this is heavily outweighted by the benefits of keeping that in the L1 cache. |
11:30:34 | FromGitter | <tim-st> Thanks for your help. I want to use the seq[enum] as string key in rocksdb/leveldb |
11:31:49 | FromGitter | <tim-st> I think I cant have <= 256 different enum entries so I thought I needed something like a prefix code that shows how many bits follow like Rune does it. But when I use Rune for my enum the string size would be much longer :( |
11:31:56 | FromGitter | <mratsim> Note that I’ve wrapped rocksdb here if you didn’t see it: https://github.com/status-im/nim-rocksdb |
11:32:34 | FromGitter | <tim-st> Yes, I saw thank you. But I wasnt sure how to pack seq[enum] to key |
11:32:40 | FromGitter | <tim-st> (string key) |
11:33:02 | FromGitter | <mratsim> otherwise you can always use a hash function |
11:33:28 | FromGitter | <Vindaar> @tim-st if using a HashSet was fine, the sets module includes an OrderedSet though |
11:33:38 | FromGitter | <Vindaar> https://nim-lang.org/docs/sets.html#OrderedSet |
11:34:15 | FromGitter | <tim-st> @mratsim hm that could solve it, thanks :) |
11:34:45 | FromGitter | <tim-st> @Vindaar No, I need to know if I have multiple enums in it |
11:35:18 | FromGitter | <mratsim> there is a len: https://nim-lang.org/docs/sets.html#len,OrderedSet[A] |
11:36:38 | FromGitter | <tim-st> No, I meant @[T.t1, T.t2, T.t1, T.t2] should be packed/hashed without losing order and size so I can recreate it from database |
11:37:35 | FromGitter | <tim-st> I think your hashing idea could work, but than I still think of the algorithm to generate short strings (because enum with max(256) -> char is already minimal perfect hashing function) |
11:38:00 | FromGitter | <tim-st> that means a hashing function will always be worse if I have enum.high.ord > 256 |
11:38:13 | FromGitter | <tim-st> because of this I asked if using rune is good |
11:39:14 | FromGitter | <mratsim> so basically your issue is that enum are limited to 256 entries? You could create your own custom enum type too |
11:40:36 | FromGitter | <tim-st> I didnt check if it's limited to 256, if so I would just use int, the problem remains if I have for example 300 different entries in a custom type |
11:41:08 | FromGitter | <tim-st> hm, it seems the Rune way for enum.ord > 256 is already the best |
11:41:14 | FromGitter | <tim-st> thanks, though :) |
11:41:19 | FromGitter | <mratsim> no problem |
11:42:39 | * | DarkArctic joined #nim |
11:42:56 | Trustable | Hi, I need some advice: Which Nim type should I choose as equivalent to "unsigned char *"? I want to assign the bytes like an array: "myVar[0] = 255". My current solution is to use "cstring" and assign the bytes with "myVar[0] = 255.chr". |
11:45:04 | * | gokr joined #nim |
11:48:14 | * | user0 joined #nim |
11:48:27 | * | user0 is now known as user1101 |
11:52:08 | * | leorize joined #nim |
11:54:24 | FromGitter | <zetashift> Isn't char already an alias for an unsigned 8bit int? |
11:54:26 | Zevv | var a: array[0..100, uint8]? |
11:55:50 | FromGitter | <mratsim> there is cuchar for unsigned char compatibility with c |
11:55:59 | FromGitter | <mratsim> For pure Nim use “byte" |
11:56:18 | user1101 | Would it be nice to have the whole C stdlib tucked into a module (for example, "stdc") in the standard? Just asking, I know Nim is not C. |
11:56:28 | FromGitter | <mratsim> import ansi_c |
11:56:38 | Trustable | I don't know the number of bytes so I can't specify an array size |
11:56:55 | FromGitter | <mratsim> use seq[byte] or ptrUncheckArray[byte] |
11:57:07 | FromGitter | <mratsim> ptr UncheckedArray[byte] sorry |
11:58:21 | FromGitter | <mratsim> UncheckedArray gives you the nice array syntax foo[10] but doesn’t restrit you concerning length, it works like any pointer |
11:58:58 | FromGitter | <mratsim> otherwise the simple ptr byte |
11:58:59 | Zevv | oh that's nice, new to me |
11:59:53 | user1101 | >import ansi_c \nmratsim, was that for me by any chance? |
12:00:08 | Trustable | ptr UncheckedArray[byte] works great for me, thank you mratsim |
12:01:45 | Trustable | btw, maybe "UncheckedArray" should be added to the Nim manual |
12:03:37 | FromGitter | <mratsim> @user1101 yes ;) |
12:04:02 | FromGitter | <mratsim> @Trustable, i’m on the fence, it’s super useful, but since we don’t want to promote pointer usage … welll .. |
12:05:22 | FromGitter | <mratsim> @trustable also if you need some hex<-> byte conversion you can use this: https://github.com/status-im/byteutils |
12:06:48 | * | leorize quit (Ping timeout: 260 seconds) |
12:07:43 | user1101 | mratsim, I cannot find any ansi_c module in the standard library?🤔 |
12:08:00 | FromGitter | <Vindaar> @mratsim @Trustable especially because for almost all cases a `var seq[byte]` on the Nim side, which is handed to C using `addr(<the seq>[0])` works just as well, no? Only encountered a single case where I read data back from C which was given as a raw pointer where I used a cast to a `ptr UncheckedArray` so far |
12:27:52 | * | leorize joined #nim |
12:30:19 | * | Arrrr quit (Read error: Connection reset by peer) |
12:33:05 | FromGitter | <diegogub> @mratsim nim is really amazing, finally found a solution with a macro..https://gist.github.com/diegogub/dbaa265235d8f672c3644f09b2a1c679 |
12:35:07 | FromGitter | <tim-st> @mratsim I checked it by interest and nim allows enums bigger than 256 (maybe max uint16 ?) |
12:38:10 | * | Snircle joined #nim |
12:46:56 | Yardanico | diegogub: btw, your macro can be simplified a bit - https://gist.github.com/Yardanico/600572a7078a34291468877306eedf92 |
12:47:09 | Yardanico | I mean you can use quote do instead of constructing all AST nodes by yourself :) |
12:47:38 | Yardanico | and also if you pass some compile-time parameters to a macro it's really better to use `static[type]` instead of `type` |
12:50:04 | FromGitter | <tim-st> @ Yardanico I already asked this some time ago here and got no answer: Cant the compiler detect this automatically? |
12:50:21 | Yardanico | tim-st what exactly? |
12:50:24 | FromGitter | <tim-st> static[T] vs T and make it static if possible? |
12:50:40 | FromGitter | <tim-st> at least it is possible in theory |
12:50:45 | Yardanico | well you may also just want to have these parameters as AST passed to a macro |
12:50:56 | Yardanico | so this is the default |
12:51:06 | FromGitter | <diegogub> @Yardanico thank you for the review, I will check the new code. |
12:51:20 | Yardanico | diegogub: it's not really a review, just a quick change to quote do :) |
12:51:49 | Yardanico | diegogub: and yeah, don't forget you can just use "for event in events" in Nim |
12:52:43 | Yardanico | and actually you can merge these two "for event in events" loops |
12:53:06 | Yardanico | yeah, that's much better |
12:53:16 | Yardanico | (code looks shorter :P ) |
12:53:48 | Yardanico | I updated the gist |
12:54:18 | FromGitter | <diegogub> @Yardanico it looks cleaner now the code, thanks |
12:54:43 | Yardanico | you can also use templates instead of quote do |
12:54:58 | Yardanico | (you can call template from a macro and get AST generated by a template) |
12:56:44 | FromGitter | <diegogub> cool, much easier..Its the first macro I write..avoid all the boiler plate to read a stream of json events and parse into the correct obj |
12:56:51 | FromGitter | <diegogub> amazing |
12:57:14 | FromGitter | <diegogub> @Yardanico will try it |
12:57:22 | FromGitter | <diegogub> @Yardanico thanks |
12:57:38 | Yardanico | @diegogub: for getting AST from a template - https://nim-lang.org/docs/macros.html#getAst,untyped |
12:59:40 | * | SenasOzys quit (Ping timeout: 256 seconds) |
13:06:59 | * | SenasOzys joined #nim |
13:07:24 | * | SenasOzys quit (Remote host closed the connection) |
13:08:22 | * | SenasOzys joined #nim |
13:09:23 | * | Trustable quit (Remote host closed the connection) |
13:28:38 | yglukhov | Araq, dom96: pls have a look https://github.com/nim-lang/Nim/pull/7336. Comments addressed. |
13:29:55 | FromGitter | <Doaxan> Hello, i write monte carlo simulation and i want make it fast as possible (i tried before many languages as c, c++, kotlin, nodejs, julia, cython_pypy_numba, dlang, rust and i get best peromance in crystal (12 sec) and nim (8,6 sec)) ⏎ I guess, if i preallocate values, program will be runs faster, but this code(11,002s): ⏎ ⏎ ```const range_count = 999999999 ⏎ for _ in 0..range_count: ⏎ let val = |
13:29:55 | FromGitter | ... rand(100.0)``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5ac230531130fe3d3692d61b] |
13:31:12 | dom96 | yglukhov: looks good. Merged. |
13:31:53 | yglukhov | dom96: Thanks! |
13:34:13 | dom96 | Doaxan: if nobody answers you here be sure to try posting it on the Nim forum (I don't have any tips right now) |
13:35:07 | FromGitter | <Doaxan> @dom96 ok, ill try, thanks |
13:36:31 | Yardanico | Doaxan: do you know number of values beforehand? |
13:36:35 | Yardanico | I mean at compilation time |
13:41:20 | FromGitter | <zetashift> @mratsim is like the mastermind of Nim with these kind of stuff Doaxan |
13:44:09 | * | gokr quit (Ping timeout: 264 seconds) |
13:45:12 | * | shashlick left #nim ("User left") |
13:45:24 | FromGitter | <Doaxan> @Yardanico maybe its range_count? I think, It would be great if you could do it like this ``` const preall = f() ``` ⏎ ⏎ but in compilation i get this (maybe 16gb is not enough for compilation this): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac233f4bb1018b37a4e9496] |
13:45:56 | Yardanico | @Doaxan - I mean, is range_count known at compile-time? You don't need to change it at program start? |
13:46:07 | Yardanico | I mean you can just use an array if you know the count of numbers beforehand |
13:47:02 | FromGitter | <Doaxan> Yes, range_count is const and dont change |
13:47:25 | Yardanico | @Doaxan: why wouldn't you just use an array instead? |
13:48:24 | FromGitter | <Vindaar> @mratsim's Chip8 emulator now has keyboard input with custom keybindings :) https://github.com/mratsim/chirp8 |
13:49:04 | * | miran joined #nim |
13:49:13 | FromGitter | <zetashift> @Vindaar does it compile succesfully to JS too, that would make it a really neat demo? |
13:49:30 | Yardanico | @zetashift: let me try real quick |
13:49:39 | Yardanico | well, not quick |
13:50:06 | Yardanico | If it only uses SDL2 and doesn't use any unsafe nim features (like raw pointers, cast, etc), it can be compiled to js with emscripten |
13:50:18 | Yardanico | https://github.com/Jipok/Nim-SDL2-and-Emscripten |
13:52:05 | FromGitter | <zetashift> I looked at the source when mratsim posted it, I think it uses SDL2 only to draw |
13:53:18 | Yardanico | yeah, it'll be not hard to compile it with emscripten then |
13:53:41 | FromGitter | <narimiran> @Doaxan can you show us the rest of the code? (i'm interested in stuff like that :)) |
13:55:12 | * | d10n-work joined #nim |
13:55:53 | FromGitter | <mratsim> wow, I got ping left and right xD |
13:56:25 | FromGitter | <narimiran> btw, in your faster example - you don't "save" your `rand(100.0)` in some seq? |
13:57:49 | * | leorize quit (Quit: WeeChat 2.1) |
13:57:55 | FromGitter | <mratsim> @user1101, I think this should work: `import system/ansi_c`see there: https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L2933 |
13:58:35 | FromGitter | <mratsim> @tim-st Yes sets are capped at uint16 so I think enum are also capped at uint16 |
14:02:04 | FromGitter | <mratsim> @diegogub glad it works, @Yardanico makes a good suggestion, often using result.add quote do or templates makes it easier to use macros: I’ve noted all the tricks there: https://forum.nim-lang.org/t/3672/1#22936 |
14:03:47 | FromGitter | <mratsim> @Doaxan Will look into it. I need to have the fastest Monte Carlo Tree Search for my go playing bot in Nim anyway ;) |
14:04:29 | Yardanico | mratsim: you're preparing to beat AlphaGo ? :P |
14:04:32 | FromGitter | <Vindaar> @zetashift good idea actually, I haven't tried. If I find the time, I'll look into @Yardanico's link |
14:10:29 | * | endragor quit (Remote host closed the connection) |
14:10:40 | dom96 | if there are people out there that can beat AlphaGo, I bet mratsim is one of them :) |
14:10:56 | * | endragor joined #nim |
14:11:25 | federico3 | dom96: would jester be smaller? ;) https://news.ycombinator.com/item?id=16727584 |
14:12:16 | FromGitter | <mratsim> I think this project is the most advanced to beat AlphaGo @Yardanico @dom96 it’s a go bot with training distributed on thousands of computers: https://github.com/gcp/leela-zero |
14:13:09 | dom96 | federico3: hrm, good question |
14:13:20 | Yardanico | federico3, probably by a lot |
14:14:06 | dom96 | This Rust hype annoys me |
14:14:08 | FromGitter | <mratsim> but I have a more modest aim: getting a go bot at least at the European champion level so about 6D. (At this level it can let me play 4 moves in a row to balance our chances) |
14:14:39 | FromGitter | <mratsim> And I started a go bot in Rust in the past and never finished it because I spent too much time fighting with the language: https://github.com/mratsim/rustygo |
14:15:11 | * | shashlick1 is now known as shashlick |
14:15:27 | * | endragor quit (Ping timeout: 240 seconds) |
14:15:36 | federico3 | dom96: 500k |
14:15:50 | dom96 | 349K on my Mac with -d:release and --opt:size |
14:16:10 | dom96 | That's far smaller than Rust's release |
14:16:12 | Yardanico | dom96, that uses C libraries from your system though |
14:16:14 | federico3 | same here |
14:16:32 | federico3 | 264k after strip |
14:16:34 | Yardanico | well, it depends on the environment too |
14:16:36 | dom96 | Yardanico: so? |
14:16:49 | dom96 | All systems already have it. So why bundle it in the binary? |
14:16:58 | Araq | link statically with musl |
14:17:09 | Yardanico | Araq, yeah, I know about musl, it's cool |
14:17:32 | Yardanico | upx'd binary - 112kb for me |
14:17:47 | Araq | and see its size. but we'll get rid of libc eventually too |
14:17:56 | Araq | oh and upx is bad :P |
14:18:19 | * | dom96 reports findings on HN |
14:18:22 | Yardanico | Araq, why? I don't really know anything bad about it |
14:18:27 | dom96 | Unless somebody else wants to? :) |
14:19:32 | Araq | Yardanico: it disables on-demand paging of binaries |
14:21:11 | dom96 | Well: https://news.ycombinator.com/item?id=16734669 |
14:22:51 | * | dom96 recalls that his malware analysis lecturer suggested that a binary packer indicates malware *shudder* |
14:24:07 | dom96 | upx'd is 137K for me FWIW |
14:24:48 | dom96 | Still pretty high, considering that I watched awesome 4K and 8K demos yesterday |
14:24:51 | Yardanico | dom96, well, maybe it's lower on linux for some reason (i did strip-s before too) |
14:25:23 | shashlick | on ubuntu, that comes to 391k and 262k stripped |
14:26:14 | shashlick | and 102k upx'd |
14:26:25 | dom96 | Now I want to work on Jester but I got this dissertation to write :( |
14:32:01 | FromGitter | <Doaxan> > **<Yardanico>** @Doaxan: why wouldn't you just use an array instead? ⏎ Sorry, im noob, this is not work: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5ac23ee15f188ccc15210889] |
14:33:40 | shashlick | remove var result = ... |
14:33:50 | miran | Doaxan: `countup` is inclusive - your array has one element less than i's in the for loop |
14:33:52 | Yardanico | shashlick, this doesn't help |
14:34:12 | miran | or just use `for i in 0 ..< rangeCount` |
14:34:19 | Yardanico | shashlick, the issue here is probably that array is too big |
14:35:12 | miran | Yardanico: yup |
14:35:57 | Yardanico | https://github.com/nim-lang/Nim/issues/7349 |
14:36:14 | Yardanico | however we can define our array as a global |
14:37:00 | FromGitter | <zacharycarter> JS is out of control - https://github.com/jonschlinkert/is-odd https://github.com/jonschlinkert/is-even https://github.com/jonschlinkert/is-number |
14:37:28 | Yardanico | zacharycarter: these repos don't look like a joke |
14:38:06 | FromGitter | <zacharycarter> yeah the author is super serious apparently |
14:38:14 | FromGitter | <zacharycarter> https://twitter.com/jonschlinkert/status/980110077607710722 |
14:38:15 | FromGitter | <zacharycarter> lolol |
14:38:31 | FromGitter | <zacharycarter> writing those libraries was an absurdly stupid waste of time |
14:38:39 | Yardanico | let just split all nim stdlib into separate repos |
14:38:49 | Yardanico | all functions from math module will be in separate modules |
14:39:00 | Yardanico | sin.nim, cos.nim, and add each package to nimble xD |
14:39:45 | miran | Yardanico, Doaxan: the array in the example is cca 2 orders of a magnitude too large :) |
14:40:12 | FromGitter | <zacharycarter> lolol |
14:40:25 | FromGitter | <zacharycarter> this is by far the best thing I've seen in weeks |
14:41:13 | dom96 | I'm surprised you haven't seen this before. |
14:41:29 | FromGitter | <zacharycarter> me too |
14:41:31 | dom96 | Major packages depend on these small things |
14:41:42 | FromGitter | <zacharycarter> oh well I've seen that pattern before |
14:41:51 | shashlick | https://npm-stat.com/charts.html?package=is-odd |
14:41:59 | Yardanico | shashlick, jesus |
14:42:04 | FromGitter | <Doaxan> @miran what should I do? |
14:42:18 | dom96 | The usage is only growing! |
14:42:29 | dom96 | I don't want to live on this planet anymore... :) |
14:42:35 | shashlick | I read about this a couple days ago, wish I could find the link |
14:42:39 | FromGitter | <zacharycarter> well I think webpack depends on it |
14:42:42 | FromGitter | <zacharycarter> which is ridiculous |
14:42:49 | Yardanico | it's probably because https://www.npmjs.com/package/nanomatch depends on is-odd |
14:42:51 | dom96 | yep, babel too |
14:43:13 | dom96 | It must take forever for all these packages to download |
14:43:14 | FromGitter | <zacharycarter> the fact that so many things depend on such an asinine library isn't the funny part |
14:43:18 | miran | Doaxan: do you really need to save each random value in the seq/array? this will slow you down, so if you don't have to - don't :) |
14:43:23 | FromGitter | <zacharycarter> the author's response to all the PR's removing it from projects - is |
14:43:52 | FromGitter | <zacharycarter> and the fact that he thinks his package provides a bunch of value |
14:44:02 | FromGitter | <zetashift> Is this serious or just next-level trolling? |
14:44:14 | FromGitter | <zacharycarter> well the author seems totally serious |
14:44:26 | FromGitter | <zacharycarter> all the people issuing PR's to remove his package from various projects - are probably trolling him |
14:44:40 | FromGitter | <zetashift> I know NPM had some weird shit on it but this is insane |
14:44:45 | FromGitter | <zetashift> also sorry for off-topic I guess? |
14:44:51 | FromGitter | <zacharycarter> he did write this - https://github.com/micromatch/nanomatch/pull/11 and https://twitter.com/jonschlinkert/status/980110077607710722 |
14:44:59 | miran | Doaxan: can you show us the rest of your code? (the one which runs in 8.6 seconds) |
14:45:08 | shashlick | the guy does have 821 repos on github |
14:45:13 | FromGitter | <zacharycarter> this is good too - https://github.com/jonschlinkert/is-even/blob/master/index.js#L13 |
14:45:14 | FromGitter | <zacharycarter> lol |
14:45:26 | FromGitter | <zacharycarter> I.... I can't even... |
14:45:48 | FromGitter | <zacharycarter> well since Nim compiles to JS this is technically on-topic :P |
14:46:17 | dom96 | Obviously to attract these JS developers we need a similar ecosyste, |
14:46:21 | dom96 | *ecosystem |
14:46:26 | FromGitter | <alehander42> I have to admit I do like having small util libs but this is crazy hahah |
14:46:29 | FromGitter | <Doaxan> > **<miran>** @Doaxan: do you really need to save each random value in the seq/array? this will slow you down, so if you don't have to - don't :) ⏎ Okay, it seems the fastest implementation of all possible is the generation of random numbers on the fly, as below? ⏎ ⏎ ```const range_count = 999999999 ⏎ for _ in 0..range_count: ⏎ let val = rand(100.0)``` [https://git |
14:46:29 | FromGitter | ... ter.im/nim-lang/Nim?at=5ac242457c3a01610d9d0f46] |
14:47:38 | FromGitter | <alehander42> btw joe armstrong had some weird ideas of a "global version-based function key-value store", something like a package manager for functions and people just combining them in their programs |
14:47:50 | FromGitter | <alehander42> I remember it sounded cute on theory |
14:49:19 | dom96 | btw guys, thoughts on using IPFS for Nimble? :D |
14:49:29 | dom96 | libman suggested it on the forum and it's actually an intriguing idea |
14:49:39 | FromGitter | <narimiran> @Doaxan here's a more idiomatic nim (just some small changes to make it more readable, IMO): ⏎ ⏎ ```const rangeCount = int(1e10) ⏎ for _ in 0 ..< rangeCount: ⏎ let val = rand(100.0)``` [https://gitter.im/nim-lang/Nim?at=5ac243035f188ccc15211d3e] |
14:49:44 | FromGitter | <zacharycarter> I think it's a bad idea |
14:50:10 | FromGitter | <zacharycarter> at least - I don't think it's a good idea to replace the way nimble currently functions, with an IPFS solution |
14:50:20 | FromGitter | <zacharycarter> maybe if you can somehow provide both options? |
14:50:27 | dom96 | Yes, I wouldn't replace it |
14:50:35 | dom96 | It would be a secondary option |
14:50:40 | dom96 | Just wondering if it's worthwhile |
14:50:51 | FromGitter | <zacharycarter> hrm |
14:50:57 | FromGitter | <zacharycarter> well it's certainly a buzzword technology |
14:51:03 | FromGitter | <zacharycarter> but I'm not sure how much value you'd be adding |
14:51:10 | FromGitter | <zacharycarter> it'd be a good way to generate some buzz / hype though |
14:51:37 | miran | dom96: work on your dissertation!! ;) |
14:51:53 | dom96 | miran: :D |
14:52:01 | dom96 | miran: I can multi-task :P |
14:52:23 | miran | then give us tuple unpacking in for loops :P (no, seriously, we need this) |
14:54:29 | dom96 | That's not critical :) |
14:55:12 | miran | when you try to use results of `zip` and see the ugliness, you see that is very critical :D |
14:55:30 | shashlick | does nimble already allow installing to a project local directory instead of global? |
14:55:45 | miran | but i'll write more detailed RFC when i catch some free time.... |
14:56:13 | dom96 | shashlick: sorta |
14:56:41 | dom96 | see the related 'vendor' issues on GitHub |
14:58:25 | FromGitter | <Doaxan> > @Doaxan here's a more idiomatic nim (just some small changes to make it more readable, IMO): ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5ac24511c4d0ae8007292c64] |
14:59:39 | FromGitter | <Doaxan> > @Doaxan here's a more idiomatic nim (just some small changes to make it more readable, IMO): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac2455b7c3a01610d9d1f32] |
15:00:58 | shashlick | https://github.com/nim-lang/nimble/issues/131 in case anyone else is interested |
15:01:06 | FromGitter | <Doaxan> 8,186s vs 8,480s |
15:02:41 | FromGitter | <narimiran> that's quite close. run each version 3 or 5 times and find the average ;) |
15:03:37 | FromGitter | <mratsim> @dom96 @zacharycarter @shashlick: Didn’t you hear about the package “left pad” which padded strings in Javascript? It was unpublished and broke half of NPM: https://arstechnica.com/information-technology/2016/03/rage-quit-coder-unpublished-17-lines-of-javascript-and-broke-the-internet/ |
15:03:38 | FromGitter | <Doaxan> @narimiran yes, I ran several times, nevertheless in my case the performance is critical |
15:04:32 | FromGitter | <krux02> I finally decided to write my own AST pattern matching library |
15:04:55 | FromGitter | <narimiran> @Doaxan and the only difference is how you declare `rangeCount`? because i have run it as `int(1e9)` and as `1_000_000_000` and i get the same times |
15:05:13 | FromGitter | <mratsim> I’m pondering on a domain specific language for neural networks, what do you think of this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac246a9012ff2bf681e1186] |
15:05:15 | FromGitter | <krux02> anyone interested in that? |
15:05:28 | * | PMunch joined #nim |
15:05:42 | FromGitter | <alehander42> @krux02 sounds cool, I've thought about that while working on macros |
15:05:54 | FromGitter | <narimiran> @Doaxan btw, you can use underscores as shown, to improve readability (as you can see, i miscounted before) |
15:06:06 | FromGitter | <Doaxan> @narimiran i use O3 march=native, possible therefore there is a difference |
15:06:10 | FromGitter | <alehander42> however wouldn't a more general pupose variant object matching library be even better? |
15:06:25 | FromGitter | <alehander42> (if you're talking about NimNode-s) |
15:06:29 | dom96 | Hope you guys can help me out: https://forum.nim-lang.org/t/3716 |
15:06:30 | dom96 | :) |
15:06:41 | FromGitter | <krux02> @mratsim I wish I could help, but I have zero knowledge in implementing one. |
15:06:55 | shashlick | @mratsim: ya that's something that was brought up related go Go as well recently - relying on git repos which could go away anytime |
15:07:51 | FromGitter | <krux02> dom96: I am sorry I think by the time I got the book, I didn't need it anymore |
15:08:12 | FromGitter | <krux02> maybe I should read it. |
15:08:18 | FromGitter | <krux02> until when is the deadline for you? |
15:08:23 | FromGitter | <narimiran> @mratsim will you have something similar for simpler ML models? (random forests, SVM, etc.) |
15:08:30 | dom96 | krux02: don't have a deadline |
15:09:50 | FromGitter | <alehander42> @krux02 e.g. you can have something like (similar to patty TODO https://github.com/andreaferretti/patty/blob/master/README.md) ⏎ ⏎ ```match c: ⏎ nnkPrefix(nnkIdent("*"), nnkIdent(name)): ⏎ echo name``` [https://gitter.im/nim-lang/Nim?at=5ac247bebb1018b37a4ef35f] |
15:09:53 | FromGitter | <krux02> that's bad because it makes me lazy |
15:10:03 | * | Jesin joined #nim |
15:10:06 | dom96 | krux02: 7 days |
15:10:27 | FromGitter | <krux02> haha, well ok, let's see what I can find until then |
15:10:29 | FromGitter | <alehander42> would maybe contributing to patty solve both problems? (having an ast pattern matching lib and better pattern matching for variants) |
15:10:41 | FromGitter | <krux02> @alehander42: I have a very similar pattern right now |
15:11:15 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac2481392f5d62057868cee] |
15:11:36 | FromGitter | <alehander42> ok, but can you capture matches in variables ? |
15:12:01 | FromGitter | <krux02> this works already, but all "expect" statements |
15:12:13 | FromGitter | <krux02> and the ast is generated by (listRepr) |
15:12:18 | FromGitter | <krux02> lispRepr |
15:13:29 | FromGitter | <alehander42> what I mean is can you write ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac24899bb1018b37a4ef771] |
15:13:34 | FromGitter | <krux02> I am not sure about the else branch though |
15:13:49 | FromGitter | <krux02> because when I implement it, I basically discard where the ast is not according to the pattern |
15:15:27 | FromGitter | <krux02> @alehander42 I thought about backticks, but yours is pretty good, too |
15:16:06 | FromGitter | <alehander42> because if you can do the capturing, you should be able to make the lib support all kinds of variant objects (not only NimNode) which would be very useful for many types (I don't see anything in particular unique to the ast types) |
15:16:29 | * | miran quit (Ping timeout: 256 seconds) |
15:16:34 | FromGitter | <alehander42> yea, backticks might be better if you want to be able to write Ident(existingconstant) |
15:16:49 | FromGitter | <krux02> well there is already a pattern maching library (not by me) that bascally supports union types |
15:16:52 | FromGitter | <alehander42> I took the idea from patty as I said |
15:16:57 | FromGitter | <krux02> but it also needs to generate such union types |
15:17:14 | FromGitter | <alehander42> so it can't work with already created types? |
15:17:35 | FromGitter | <krux02> I think in the beginning I should just start with an ast matcher that can match any AST including fuzzy AST |
15:17:45 | FromGitter | <mratsim> @dom96 Regarding file size: This game with awesome graphics is 8MB: https://www.youtube.com/watch?v=fp0t2jCMGZE |
15:18:02 | Yardanico | mratsim: you mean 8kb? :) |
15:18:13 | FromGitter | <mratsim> yes KB* |
15:18:22 | FromGitter | <krux02> and then in the end I should merge this library with other pattern matching solution to provide a common pattern matching API for all libraries |
15:18:33 | FromGitter | <krux02> like it is done right now with hashing libraries |
15:18:37 | dom96 | mratsim: yes, I saw it yesterday during the Revision livestream ;) |
15:18:50 | FromGitter | <mratsim> @narimiran I will do a blackbox like sci-kit learn with fit and predict. |
15:19:36 | FromGitter | <mratsim> I’ll add the same to the neural nets, so you combined with my first DSL proposal you could do most visual recognition tasks in 15 lines of Nim code |
15:25:33 | * | DarkArctic quit (Ping timeout: 264 seconds) |
15:25:33 | FromGitter | <alehander42> @krux02 sounds good |
15:27:20 | dom96 | mratsim: ooh, speaking of neural nets, is it possible to achieve something like this using Nim yet? https://www.youtube.com/watch?v=qv6UVOQ0F44 |
15:27:32 | * | dom96 has a project in mind that depends on it :) |
15:27:46 | shashlick | do any of you use weechat + relay? |
15:31:32 | subsetpark | So - returning to some code written on 0.17.x, now on `stable` - previously working code produces a ***stack smashing detected*** SIGABRT |
15:31:49 | subsetpark | What should I be looking for when updating it? |
15:31:51 | * | Jesin quit (Quit: Leaving) |
15:31:58 | dom96 | subsetpark: unsafe features: addr, ptr, etc |
15:32:27 | subsetpark | @dom96 - no pointer/mem manipulation here. It's pretty much all `&`ing together seqs of characters |
15:32:56 | dom96 | Then I'd love to see the code |
15:33:13 | FromGitter | <mratsim> @dom96: yes it’s possible once I have recurrent neural net |
15:33:28 | subsetpark | dom96: As a matter of fact, you can: https://github.com/makingspace/rmq/ |
15:33:32 | FromGitter | <mratsim> You can do it in Python here: https://gym.openai.com/ |
15:33:35 | dom96 | mratsim: cool, that on your roadmap? |
15:33:37 | subsetpark | `nimble tests` produces the failure |
15:33:38 | * | smt joined #nim |
15:33:49 | subsetpark | In the `values.nim` module |
15:33:55 | FromGitter | <mratsim> @dom96 I have a starcraft bot in my roadmap ;) :P |
15:34:12 | FromGitter | <mratsim> But I’ll start by training a RNN on the emulator I did on Friday |
15:34:31 | dom96 | Cool. I'd really rather just use Nim instead of Python :) |
15:34:46 | Araq | starcraft one or two? |
15:34:47 | dom96 | So if you created some RNN examples that would be useful too :) |
15:34:54 | FromGitter | <mratsim> here arre some repo: https://github.com/wenkesj/mario |
15:34:58 | FromGitter | <mratsim> https://github.com/ppaquette/gym-super-mario |
15:35:02 | subsetpark | dom96: you know what, I'm wrong |
15:35:12 | FromGitter | <mratsim> the keywords are “openAI gym” + <insert your favorite game> |
15:35:14 | subsetpark | We are doing addr - it's how we interpret things as bigEndian |
15:35:41 | subsetpark | That was c&ped from a different Nim library... code like this: |
15:35:55 | dom96 | subsetpark: hrm, so double check that it's not over-reading/over-writing |
15:36:17 | subsetpark | proc encode*(v: int32 | uint32): array[0..3, char] = |
15:36:19 | subsetpark | var v = v |
15:36:21 | subsetpark | bigEndian32(addr result, addr v) |
15:37:02 | FromGitter | <Thor77> hey, is there a reason for the non-existence of a Date-type (like DateTIme just without the Time-part) in the times-library? |
15:37:50 | FromGitter | <mratsim> time or laziness? :P |
15:37:57 | dom96 | Thor77: I think this PR aims to fix that: https://github.com/nim-lang/Nim/pull/7096 |
15:38:28 | dom96 | subsetpark: hrm, that looks fine |
15:38:50 | Araq | do we need a 0.18.2 ? |
15:39:28 | dom96 | We should start releasing more often and regularly |
15:39:31 | subsetpark | dom96: I'm pretty sure it would have to be here: https://github.com/makingspace/rmq/blob/master/rmqsrc/utils/encode.nim |
15:39:58 | FromGitter | <Thor77> dom96: oh, should've searched for a pr before asking... thanks :) |
15:40:35 | dom96 | subsetpark: Maybe Araq can assist better, but I would try and replace that code with some dummy safe code and see what happens |
15:53:28 | subsetpark | dom96/Araq: I'm a bit out of my element here, but I'm trying to figure out which invocation causes the issue. The weird thing is the calls to `encode()` seem to be successful. I am able to debug at the end of a function call but I never get back up the stack where it was called from. Ordinarily that would seem nonsensical to me but given that the issue is 'stack smashing' - is that possible? that the call could |
15:53:30 | subsetpark | seem fine from within one function but cause mayhem as it moves up the stack? |
15:56:55 | * | xkapastel joined #nim |
16:00:02 | shashlick | araq, dom96, curious about the PR process - there's 81 open PRs, what can we do to help move them along? the older they get, the more out of sync |
16:00:25 | dom96 | shashlick: review them :) |
16:03:09 | * | DarkArctic joined #nim |
16:05:44 | shashlick | What's the criteria to accept? #reviews > x |
16:09:53 | dom96 | There is no criteria |
16:10:12 | dom96 | Other people's review help me and Araq make a decision whether it's ready though |
16:10:29 | dom96 | And catches out the common things that should be fixed so we don't have to let people know and wait |
16:10:39 | * | jrbrt joined #nim |
16:12:01 | shashlick | Do you already have some review guidelines? |
16:12:20 | shashlick | Or PR guidelines |
16:13:32 | FromGitter | <mratsim> @dom96 does nimble publish work for you? I always get this kind of stuff: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac256ac01a2b40f382e6292] |
16:14:08 | dom96 | mratsim: I never use it. But I think that was fixed in Nim 0.18.0, are you running an old Nimble? |
16:14:20 | dom96 | shashlick: not really |
16:15:24 | FromGitter | <mratsim> before 0.18 it couldn’t even fork iirc |
16:15:42 | subsetpark | dom96: got one more second for this stack smashing stuff? I think the error is actually in one of these procs: https://ghostbin.com/paste/2kcrb when I comment out the bigEndian calls, I don't get the same exception |
16:15:43 | FromGitter | <mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac2572f01a2b40f382e629b] |
16:17:37 | dom96 | subsetpark: I'm not sure, sorry :( |
16:17:49 | dom96 | mratsim: compiled with latest Nim? |
16:18:55 | FromGitter | <mratsim> I suppose with devel yes. I can’t work on 0.18 :P |
16:20:02 | dom96 | mratsim: then I dunno |
16:20:10 | shashlick | @mratsim I've seen it a few times |
16:20:17 | dom96 | report it as an issue if it hasn't been reported |
16:20:27 | shashlick | It sometimes creates the pr, sometimes doesn't |
16:20:40 | shashlick | Not sure if httpclient issue |
16:20:47 | dom96 | Araq: Can you help subsetpark out? |
16:21:02 | shashlick | Nothing funky in nimble code though |
16:22:57 | dom96 | subsetpark: You should be able to rewrite these bigEndian32 calls without using 'addr', maybe that's worth a shot |
16:23:10 | dom96 | looking at the endians module they are pretty simple |
16:24:26 | subsetpark | Yeah, how should I do that? TBH the addr calls were cribbed from some utility library, so I'm happy to hear of an alternative approach |
16:25:25 | dom96 | subsetpark: https://github.com/nim-lang/Nim/blob/devel/lib/pure/endians.nim#L63 |
16:26:01 | * | jrbrt quit (Quit: Oíche mhaith) |
16:26:54 | subsetpark | dom96: I'm afraid I don't follow - the signature for that proc still expects pointers |
16:27:12 | dom96 | subsetpark: yeah, but you've got an array[] right? |
16:27:24 | dom96 | you can do the same on an array |
16:27:38 | dom96 | in fact, you can do the same on any type that has `[]` |
16:28:05 | dom96 | as long as the type inside the container type is the right size |
16:29:56 | * | icebattle joined #nim |
16:30:49 | subsetpark | Hm ok |
16:31:31 | subsetpark | I'm not sure that's where the issue is - the pastebin i linked to above seems to be what gets rid of the error, and that is swapping endianness on an int, not a char array |
16:31:53 | * | gokr joined #nim |
16:35:52 | subsetpark | Basically this is code to do this: https://github.com/nim-lang/Nim/issues/7105 |
16:39:32 | FromGitter | <mratsim> @Doaxan I’ve changed your benchmark a bit so that it’s more stable (regarding cpu governor) and uses the max perf available on your cpu (march native especially). ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Some general tips: ... [https://gitter.im/nim-lang/Nim?at=5ac25cc401a2b40f382e62fc] |
16:40:27 | * | smt` joined #nim |
16:40:56 | * | smt_ joined #nim |
16:44:09 | * | smt quit (Ping timeout: 264 seconds) |
16:44:40 | * | smt joined #nim |
16:44:49 | * | smt` quit (Ping timeout: 248 seconds) |
16:44:56 | subsetpark | Well dom96 ... Final judgment is that something changed between stable and devel... I was pretty sure the error was still present in devel, but it actually appears that the code, as it is written, no longer triggers the stack smashing exception in devel |
16:45:53 | * | smt_ quit (Ping timeout: 248 seconds) |
16:49:11 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
17:01:02 | dom96 | subsetpark: so you can't reproduce anymore? |
17:01:30 | dom96 | if the data input didn't change then it should produce the same results |
17:04:24 | subsetpark | @dom96: I can still reproduce on nim stable |
17:04:31 | subsetpark | on nim head, all tests now pass |
17:05:41 | * | jrbrt joined #nim |
17:06:42 | dom96 | oh, I see what you mean |
17:06:58 | dom96 | I thought you were testing on devel from the outset. |
17:07:44 | dom96 | That's interesting. I wonder what changed between 0.18.0 and devel |
17:09:05 | subsetpark | feel free to use my repo to run a git bisect :) |
17:15:39 | * | endragor joined #nim |
17:19:38 | * | PMunch quit (Quit: Leaving) |
17:19:57 | * | endragor quit (Ping timeout: 240 seconds) |
17:28:58 | * | NimBot joined #nim |
17:30:07 | Demos[m] | Oooooo new bot? |
17:30:28 | * | mwbrown quit (Ping timeout: 268 seconds) |
17:31:44 | narimiran[m] | @mratsim is there a noticeable difference between let inside of a loop, and using an int variable declared outside of it? i haven't noticed it in couple of my tests!? |
17:32:47 | * | mwbrown joined #nim |
17:33:49 | FromGitter | <mratsim> It depends. Normally the compiler detects that with a let inside a loop, there is no lifetime conflicts so it reuses the same register |
17:40:06 | shashlick | dom96: do you see any value in a PR report that gives a spreadsheet view with relevant info included |
17:45:35 | dom96 | Depends what it contains I guess |
17:45:39 | dom96 | But not really |
17:48:33 | FromGitter | <zacharycarter> I have a game dev web dev job interview tomorrow :D |
17:48:46 | FromGitter | <zacharycarter> hopefully I'll finally land a job in the industry I want to be in |
17:49:06 | FromGitter | <zacharycarter> even if it's not the specific role |
17:49:52 | shashlick | dom96: okay, i'll do some reviews of existing PRs - in the meantime, will you be able to approve https://github.com/nim-lang/Nim/pull/7442 and https://github.com/nim-lang/Nim/pull/7440 |
17:51:14 | * | smt` joined #nim |
17:51:24 | dom96 | I want Araq to take a look at those |
17:51:43 | shashlick | cool |
17:51:44 | dom96 | zacharycarter: awesome! All the best for the interview :) |
17:52:21 | FromGitter | <mratsim> oh cpDir: :) |
17:52:34 | FromGitter | <genotrance> :) |
17:53:59 | FromGitter | <zacharycarter> thanks dom96! |
17:54:33 | dom96 | https://news.ycombinator.com/item?id=16736917 :/ |
17:54:43 | dom96 | How am I taking it to the next level? :( |
17:55:08 | * | smt quit (Ping timeout: 268 seconds) |
17:55:47 | FromGitter | <zacharycarter> I'd just ignore them - unless we have folks running around posting Issues saying "RIIN" we're nowhere near as bad |
17:56:07 | FromGitter | <mratsim> Yes good luck zachary :) |
17:56:26 | FromGitter | <zacharycarter> thanks @mratsim ! |
17:57:37 | FromGitter | <mratsim> @dom96 I’m sure he is confusing Nim with Zig ;) |
17:58:46 | shashlick | well, it is arguable that nim is offtopic on a rust article |
18:00:04 | FromGitter | <mratsim> I think most of the people who discovered Nim through HN or Reddit discovered it through an offtopic comment ;) |
18:01:20 | FromGitter | <mratsim> I certainly did |
18:01:43 | shashlick | no doubt |
18:01:58 | dom96 | That ^ |
18:03:31 | FromGitter | <zacharycarter> I mean - we as Nim fanatics would probably be annoyed if the roles were reversed, and every time we posted on HN, the rustaceans were chiming in with "we can do that too" |
18:03:43 | FromGitter | <zacharycarter> in a sense it makes Nim look a little desperate |
18:04:19 | * | nsf quit (Quit: WeeChat 2.0.1) |
18:05:14 | FromGitter | <zacharycarter> but I don't know how else to make people aware that Nim exists either |
18:06:43 | shashlick | I know, it's hard to decide |
18:06:49 | FromGitter | <cabhishek> @zacharycarter +1 |
18:09:05 | FromGitter | <mratsim> The pony guy did a neat trick to promote Pony on HN: https://kaizenboard.xyz/#/ |
18:09:10 | dom96 | And yet I bet if you search for Rust in any Nim-related post on HN/Reddit you will find at least one mention |
18:09:36 | FromGitter | <mratsim> I think it’s fine to mention other language for meta discussions like Araq destructors blog post |
18:12:06 | shashlick | I had to do a similar thing for my NTLM proxy server px, but I tried to restrict it to places where it was a solution to a question and not unrelated |
18:12:50 | FromGitter | <mratsim> Nim is a solution to all issues that plague devs in other language but they don’t know it :D |
18:12:57 | shashlick | e.g. question on a feature or usage of cntlm doesn't warrant a mention unless px actually has that feature and cntlm doesn't |
18:13:00 | FromGitter | <mratsim> except COBOL |
18:13:20 | shashlick | @mratsim - I think that's the main challenge with a programming language - it applies in most situations |
18:13:29 | shashlick | want a smaller binary? use nim :) |
18:13:43 | shashlick | that's kind of the main reason why I moved from Python |
18:14:30 | FromGitter | <mratsim> nimsuggest log file are becoming huge really fast, I have to delete them every 4 days. |
18:14:41 | FromGitter | <zetashift> Most popular things about Nim I've seen were https://www.euantorano.co.uk/posts/faster-command-line-tools-in-nim/ and 'pointer free programming' we need more of those! |
18:15:08 | FromGitter | <zetashift> Also I found it weird that this wasn't posted on the interwebs: https://nim-lang.org/blog/2018/01/22/yes-command-in-nim.html |
18:15:46 | FromGitter | <zetashift> I do know Nim is sometimes mentioned in the Godot discussions |
18:22:31 | shashlick | dom96: you have some supporters now |
18:24:25 | dom96 | yay |
18:24:54 | dom96 | zetashift: it was: https://news.ycombinator.com/item?id=16263429 |
18:31:30 | shashlick | how do you keep track of nim mentions in reddit and hackernews |
18:32:04 | euantor | I did some work on the "faster command line tools in Nim" repository the other day actually: https://github.com/euantorano/faster-command-line-tools-in-nim |
18:32:14 | euantor | Unforutnately the D (LDC) version now beats the Nim version |
18:32:17 | euantor | :( |
18:32:19 | dom96 | shashlick: for HN I use HNWatcher |
18:32:24 | dom96 | For reddit I just hope I see the comment |
18:33:09 | shashlick | https://hn.algolia.com/?query=nim&sort=byDate&prefix=false&page=0&dateRange=pastWeek&type=all |
18:33:14 | FromGitter | <zacharycarter> https://twitter.com/ncweaver/status/980485587827224577 |
18:35:27 | euantor | It is pretty sad seeing how much slower Python 3 is than Python 2 for the same code. It's around ~3 seconds slower, which is quite a lot |
18:35:46 | dom96 | euantor: really? I thought Python 3 was supposed to be faster :O |
18:35:55 | euantor | yeah |
18:36:01 | euantor | Python 2: https://euantorano.github.io/faster-command-line-tools-in-nim/python2.txt |
18:36:07 | euantor | Python 3: https://euantorano.github.io/faster-command-line-tools-in-nim/python3.txt |
18:36:21 | euantor | The only difference is using brackets with `print` for 3 |
18:36:27 | * | smt joined #nim |
18:36:50 | Yardanico | euantor, probably that's because unicode is the default in py3 |
18:37:08 | Yardanico | and why wouldn't you use the same file for py2/py3? |
18:37:16 | Yardanico | python 2 understands brackets too |
18:37:21 | dom96 | hrm, is your blog down? https://www.euantorano.co.uk/posts/faster-command-line-tools-in-nim/ |
18:37:39 | Yardanico | dom96, works for me |
18:37:55 | euantor | Feel free to make a PR @Yardanico :) I rarely write Python |
18:37:56 | dom96 | hrm, must be my shitty ISP |
18:38:09 | * | smt_ joined #nim |
18:38:15 | euantor | And yeah, it works for me too. I've never seen it die before |
18:38:20 | * | smt_ quit (Remote host closed the connection) |
18:38:47 | * | smt_ joined #nim |
18:39:55 | * | smt` quit (Ping timeout: 256 seconds) |
18:41:15 | * | smt quit (Ping timeout: 256 seconds) |
18:44:32 | * | SenasOzys quit (Ping timeout: 260 seconds) |
18:50:11 | FromGitter | <zetashift> Yeah LDC is pretty impressive in benchmarks I wonder how nlvm would fare |
18:51:46 | euantor | The code isn't really a fair benchmark at the minute to be fair, as the D code reads the full file into memory. Nim might well beat it by doing the same :) |
18:57:25 | FromGitter | <data-man> @euantor: Try to use newFileStream(filename, fmRead, 1000000) :) |
18:57:47 | * | SenasOzys joined #nim |
18:59:34 | * | SenasOzys quit (Read error: Connection reset by peer) |
19:00:25 | * | SenasOzys joined #nim |
19:02:10 | * | smt joined #nim |
19:06:11 | * | smt_ quit (Ping timeout: 256 seconds) |
19:07:27 | euantor | Yep |
19:16:17 | * | aguspiza joined #nim |
19:18:06 | * | miran joined #nim |
19:21:57 | * | arecaceae quit (Remote host closed the connection) |
19:22:21 | * | arecaceae joined #nim |
19:28:39 | * | beatmox quit (Remote host closed the connection) |
19:28:54 | * | jrbrt quit (Quit: Oíche mhaith) |
19:29:10 | * | beatmox joined #nim |
19:32:31 | * | smt` joined #nim |
19:36:28 | * | smt quit (Ping timeout: 256 seconds) |
19:38:49 | * | yglukhov quit (Read error: Connection reset by peer) |
19:39:21 | * | yglukhov joined #nim |
19:47:22 | subsetpark | Here's something I've never really understood when defining proc types: if I define a type like `MyProc = proc(c: Foo, r: Bar)`, and then perhaps make an object field with type seq[MyProc], I always get an error trying to construct an object with a field value like @[defaultProc] - where `defaultProc` is defined with the exact same signature. |
19:47:54 | subsetpark | Do I have to do something specific with closure pragmas or what-not? |
19:49:30 | * | r3d9u11 joined #nim |
19:49:30 | * | r3d9u11 quit (Client Quit) |
19:49:39 | * | nsf joined #nim |
19:52:02 | * | vivus joined #nim |
20:01:13 | FromGitter | <krux02> subsetpark: can you create an example code? To me it looks like a bug. |
20:01:28 | FromGitter | <krux02> but to be honest seq initialization could be the problem |
20:02:04 | FromGitter | <krux02> when you do [x, .. .. ], the first element defines the type of the seq/array, and the type cannot be deduced from anywhere else at all. |
20:03:12 | FromGitter | <krux02> so the first element really has to be very precice in it's type, not just convertible os something like that |
20:04:27 | subsetpark | krux02 - in this case, the type is declared in the object type declaration |
20:06:44 | subsetpark | but i'll give an example next time it crops up |
20:18:25 | * | jrbrt joined #nim |
20:20:09 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:20:30 | * | Jesin joined #nim |
20:25:22 | * | miran quit (Quit: Konversation terminated!) |
20:36:45 | euantor | If I remember correctly you might need the procVar pragma or something |
20:42:29 | * | Jesin quit (Quit: Leaving) |
20:44:21 | * | Trustable joined #nim |
20:54:38 | * | jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:56:02 | * | Vladar quit (Quit: Leaving) |
20:58:04 | Araq | .procVar is not a thing anymore but proc types default to .closure and top level procs are not closure |
21:07:37 | * | Trustable quit (Remote host closed the connection) |
21:10:22 | * | ketralni` is now known as ketralnis |
21:23:08 | subsetpark | Here's one along the same lines that's even stranger |
21:23:28 | subsetpark | first type mismatch at position: 4 |
21:23:30 | subsetpark | required type: PubSubCallback |
21:23:32 | subsetpark | but expression 'callback' is of type: PubSubCallback |
21:23:45 | subsetpark | In this case there isn't even a top level proc |
21:29:52 | Araq | maybe you have multiple definitions of PubSubCallback |
21:30:02 | subsetpark | yes, I think that must be it... |
21:31:52 | dom96 | the compiler should prefix those types with the module names in this case |
21:41:02 | dom96 | Tables module needs a proc that returns an Option[V] |
21:42:21 | * | smt` quit (Ping timeout: 264 seconds) |
21:43:19 | FromGitter | <krux02> I think strutils.escape should be deprecated |
21:43:49 | FromGitter | <krux02> people assume it is useful, but it is not. I concider it as harmful. |
21:44:00 | FromGitter | <krux02> what do you think? |
21:44:40 | dom96 | example of people being wrong? |
21:45:31 | FromGitter | <krux02> well when you see `escape` you should know about wherer this escaping is useful |
21:45:50 | FromGitter | <krux02> for example in C embedding, or in javascript embedding, or in sql embedding etc. |
21:45:55 | FromGitter | <krux02> but this function does not tell |
21:46:05 | FromGitter | <krux02> people use it for everything |
21:46:17 | FromGitter | <krux02> and it works in example cases |
21:46:37 | FromGitter | <krux02> but it breaks horribly later. |
21:47:27 | dom96 | well, perhaps we should define what it escapes in the docs |
21:47:30 | FromGitter | <krux02> when there is escaping, there should be `shellEscape` `ansicEscape`, `jscriptEscape` etc |
21:48:05 | FromGitter | <krux02> and as long as they are not there, no escaping at all is better that a wrong one in my opinion. |
21:48:33 | FromGitter | <krux02> well it describes the escaping mechanism. |
21:48:59 | FromGitter | <krux02> but that requires that the user knows the exact escaping rules for the target and does no mistake in comparing them |
21:50:37 | FromGitter | <krux02> I just fixed a bug by not using strutils.escape in the Nim compiler |
21:50:51 | FromGitter | <krux02> https://github.com/nim-lang/Nim/pull/7475 |
21:50:59 | FromGitter | <krux02> tests are still running though |
21:51:51 | dom96 | ooh, first time I had to use 'import std/options' and this feature saved me |
21:52:15 | dom96 | krux02: well, I dunno, i'd like to know what others think |
21:53:55 | * | d10n-work quit (Quit: Connection closed for inactivity) |
21:54:39 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:55:45 | Araq | krux02: I agree but I am against more tiny changes in the stdlib everywhere |
21:56:31 | FromGitter | <mratsim> do you mean you want big changes? :P |
22:00:41 | FromGitter | <data-man> Using strformat in the stdlib everywhere, is this a big changes? |
22:05:39 | FromGitter | <krux02> Araq: What do you mean? Do you want to stick to the stdlib like it is, even when it is kind of broken? |
22:07:40 | * | xet7 quit (Quit: Leaving) |
22:18:06 | * | smt joined #nim |
22:19:41 | * | aguspiza quit (Ping timeout: 268 seconds) |
22:22:40 | Araq | changelog: deprecated strutils.escape for the people who do not know what they are doing. Instead write your own escapeJson, escapeC, escapeUrl, escapeCsharp |
22:23:02 | Araq | because strutils.escape "is kind of broken". |
22:23:22 | Araq | what is not kind of broken assuming you don't read its docs? |
22:33:00 | dom96 | Araq: SmallString<128> Data; |
22:33:07 | dom96 | Any ideas how to wrap that in C++? |
22:33:31 | dom96 | I guess I can just emit it... |
22:33:42 | dom96 | but maybe there is a better way |
22:33:58 | Araq | type SmallString {.importcpp.}[N: static[int]] = object |
22:34:12 | dom96 | Hope that's been tested :) |
22:34:23 | FromGitter | <mratsim> Yes we use it at Status |
22:35:39 | FromGitter | <mratsim> it was fixed a month ago: https://github.com/nim-lang/Nim/issues/6415 |
22:36:06 | dom96 | Still worries me |
22:36:17 | dom96 | This is too cutting edge |
22:37:19 | FromGitter | <mratsim> You will have first-class zah support for that, the whole ttmath library that we use everywhere is built on this: https://github.com/status-im/nim-ttmath |
22:37:47 | FromGitter | <mratsim> we need it for Uint256 integers that are pervasive for Ethereum |
22:38:33 | dom96 | Soon we'll have a better clang wrapper than libclang offers :D |
22:39:02 | dom96 | It's a bit hacky but it works |
22:39:25 | FromGitter | <mratsim> Repeat after me “Static is not a hack” :P |
22:42:22 | dom96 | my clang wrapper is :P |
22:50:17 | dom96 | So I have this: |
22:50:18 | dom96 | type |
22:50:18 | dom96 | SmallStringObj* {.importcpp: "llvm::SmallString", header: "llvm/ADT/SmallString.h".}[N: static[int]] = object |
22:50:18 | dom96 | SmallString*[N: static[int]] = ptr SmallStringObj[N] |
22:50:32 | dom96 | Nim is generating this: typedef llvm::SmallString<NI> TY_UeWaPvSqgj7oqe6toRA9bhA; |
22:56:11 | * | jrbrt quit (Quit: Oíche mhaith) |
22:59:19 | Araq | what's that 'ptr' doing here? |
23:05:44 | dom96 | Most functions take a 'ptr' |
23:11:03 | dom96 | I'm just going to hardcode the size for now |
23:11:30 | dom96 | Another issue I've run into now is that I need to emit 'using namespace blah' inside the module that I am using a C++ function in |
23:11:35 | dom96 | Is there some way around that? |
23:17:30 | dom96 | btw this also generates the same code as above: |
23:17:31 | dom96 | SmallString* {.importcpp: "llvm::SmallString", header: "llvm/ADT/SmallString.h".} [N: static[int]] = object |
23:22:42 | dom96 | https://github.com/nim-lang/Nim/issues/7477 |
23:27:08 | dom96 | Aww yess |
23:27:23 | dom96 | To fix the namespacing problems I just created a dummy proc in my wrapper module. |
23:36:22 | * | girvo quit (Ping timeout: 264 seconds) |
23:37:23 | * | girvo joined #nim |
23:41:38 | FromGitter | <krux02> Araq: The question is rather "Where does strutils.escape |
23:41:56 | FromGitter | <krux02> " actaually work? |
23:42:25 | FromGitter | <krux02> I could not find anything yet, where |
23:42:39 | FromGitter | <krux02> `escape` actually did the right thing. |
23:43:22 | FromGitter | <dandevelo> Any thoughts on this? https://github.com/kostya/benchmarks/blob/master/README.md |
23:47:23 | * | gokr quit (Ping timeout: 260 seconds) |
23:47:42 | FromGitter | <krux02> well Nim seems to be pretty fast |