00:11:28 | * | desophos quit (Remote host closed the connection) |
00:15:08 | * | mahasamoot joined #nim |
00:19:30 | * | mahasamoot quit (Ping timeout: 250 seconds) |
00:23:15 | * | francisl quit (Quit: francisl) |
00:23:21 | onionhammer1 | C# is very popular in the corporate world as well |
00:28:19 | * | irrequietus quit () |
00:50:12 | * | desophos joined #nim |
00:54:11 | * | couven92 joined #nim |
00:56:03 | * | fredrik92 quit (Ping timeout: 240 seconds) |
00:57:05 | * | freddy92 joined #nim |
00:58:33 | * | couven92 quit (Ping timeout: 240 seconds) |
01:01:59 | * | couven92 joined #nim |
01:02:30 | * | couven92 quit (Client Quit) |
01:05:28 | * | freddy92 quit (Ping timeout: 244 seconds) |
01:05:51 | Varriount | Araq: The ParamTypesMatch procedure in sigmatch... why doesn't it return a bool or something? |
01:14:26 | * | pregressive joined #nim |
01:32:48 | dom96 | https://twitter.com/velartrill/status/713501595430817792 |
01:35:52 | cncl | clearly he hasn't used haskell with ghc extensions enabled |
01:36:09 | cncl | (she?) |
01:38:35 | Varriount | I'm finding her twitter tagline... interesting, as well as her website. |
01:40:27 | Varriount | I haven't actually had strong spaces bite me yet... then again, I'm paranoid and use braces anyway. |
01:40:46 | dom96 | Varriount: The thing is: strong spaces aren't enabled by default. |
01:41:07 | Varriount | dom96: They aren't? I could have sworn they were enabled in the latest release. |
01:41:42 | dom96 | These people aren't very friendly :( |
01:44:32 | cncl | yeah, don't expect a lot of friendliness from programmers, haha |
01:47:09 | dom96 | oh well |
01:48:15 | cncl | languages tend to gain more acceptance once there are a couple of high-profile projects made with them |
01:48:55 | cncl | advocacy alone will only do so much |
01:48:59 | cncl | (in my experience) |
01:51:42 | dom96 | yeah, makes sense. |
02:13:52 | dom96 | good night guys |
02:18:52 | * | filwit joined #nim |
02:31:23 | * | pregressive quit (Remote host closed the connection) |
02:31:32 | * | brson quit (Quit: leaving) |
02:38:48 | * | Demos_ joined #nim |
02:39:06 | cncl | seeya |
02:42:09 | * | Demos quit (Ping timeout: 260 seconds) |
02:48:36 | * | filwit quit (Quit: Leaving) |
03:13:05 | * | arnetheduck joined #nim |
03:15:38 | * | mahasamoot joined #nim |
03:27:41 | * | chrisheller joined #nim |
03:30:33 | * | Vivek quit (Ping timeout: 240 seconds) |
03:30:48 | * | Vivek joined #nim |
03:31:02 | * | nicktick joined #nim |
03:31:12 | * | Vivek is now known as Guest15833 |
03:38:10 | nicktick | Hint: [Link] |
03:38:10 | nicktick | d:\nim\sources\nimcache\system.o:system.c:(.text+0xdb3f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_wfopen' |
03:38:18 | nicktick | what's it ? |
03:39:06 | nicktick | nim c test_str.nim |
03:39:31 | nicktick | fs = newFileStream("dat",fmReadWrite) |
03:40:20 | nicktick | is there any library need be linked? |
03:45:18 | cncl | you're using gcc? |
04:01:31 | nicktick | cncl , yes |
04:02:40 | nicktick | with MSYS2 |
04:03:33 | cncl | what's the output of gcc --version and nim --version |
04:04:36 | nicktick | gcc (GCC) 4.9.2 , |
04:04:36 | nicktick | Nim Compiler Version 0.12.0 (2015-10-27) [Windows: amd64] |
04:04:37 | * | apotheon joined #nim |
04:06:39 | cncl | the output of the gcc version should have many more lines |
04:07:00 | nicktick | gcc (GCC) 4.9.2 |
04:07:00 | nicktick | Copyright (c) 2014 Free Software Foundation, Inc. |
04:07:14 | cncl | hmm |
04:07:19 | cncl | you don't see the build information? |
04:07:33 | cncl | most gcc builds look like |
04:07:36 | cncl | gcc.exe (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 5.3.0 |
04:07:40 | cncl | or something like that |
04:07:44 | nicktick | no |
04:07:52 | cncl | well |
04:08:02 | cncl | my first suggestion is to update to newer gcc/mingw |
04:08:08 | cncl | and newer nim (0.13.0) |
04:08:20 | nicktick | ok |
04:09:28 | cncl | ah |
04:09:31 | cncl | i think i see |
04:09:33 | cncl | you're using cygwin |
04:09:44 | cncl | nim for windows is not built for cygwin |
04:09:50 | nicktick | no, mingw |
04:10:32 | cncl | msys2 uses cygwin |
04:11:44 | cncl | at least i think so |
04:11:48 | cncl | maybe i'm wrong |
04:11:52 | nicktick | $ ./build.sh |
04:11:52 | nicktick | Error: unknown operating system: mingw64_nt-10.0 |
04:12:23 | nicktick | but I did compile nim with this gcc ago. |
04:12:47 | nicktick | nim(0.13.0) can't be installed on windows now? |
04:12:53 | cncl | it can, i'm using it right now |
04:13:06 | cncl | gcc.exe (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 5.3.0 |
04:13:32 | cncl | i don't use msys2 or cygwin though |
04:13:36 | cncl | i don't really know much about them |
04:13:57 | cncl | but i do believe that the nim distribution for windows will not work with cygwin |
04:16:03 | nicktick | build64.bat work |
04:16:19 | nicktick | compiling ... |
04:26:55 | * | vendethiel joined #nim |
04:28:03 | cncl | Araq: do i need to worry about the cost of reallocations for seq? in c++ (and elsewhere), for variable-sized arrays, i'm used to doing things like reserving a larger amount of space when creating the array to avoid multiple reallocations/resizes when filling it |
04:28:46 | cncl | often i will know roughly or exactly the maximum the number of entries that will be added to it |
04:29:12 | cncl | i see that it's possible to use setLen or to call newSeq with a number, but that changes the actual number of entries in the seq and not just how much memory is allocated for it |
04:29:24 | cncl | but i know nim has a managed runtime so maybe it's not something that has to be worried about? |
04:44:01 | * | brson joined #nim |
04:55:07 | * | NimBot joined #nim |
04:58:25 | * | Demon_Fox quit (Quit: Leaving) |
05:00:03 | * | exebook quit (Read error: Connection reset by peer) |
05:21:49 | * | exebook joined #nim |
05:23:39 | * | desophos_ joined #nim |
05:28:48 | * | desophos_ quit (Ping timeout: 276 seconds) |
05:31:15 | * | vendethiel quit (Ping timeout: 248 seconds) |
05:33:26 | * | chrisheller quit (Remote host closed the connection) |
05:50:38 | * | enthus1ast quit (Ping timeout: 244 seconds) |
05:50:45 | * | enthus1ast1 joined #nim |
06:02:51 | * | Demos_ quit (Ping timeout: 264 seconds) |
06:07:22 | * | bjz joined #nim |
06:08:46 | * | bjz_ quit (Ping timeout: 250 seconds) |
06:35:19 | * | enthus1ast1 quit (Quit: Leaving.) |
06:49:53 | * | desophos quit (Read error: Connection reset by peer) |
06:54:23 | * | darius93 joined #nim |
06:56:54 | darius93 | I have a question: nim has gc correct? if so how often does it run because i ran a small sample code i found and after stress testing it, it doesnt seems to free up memory. the code is http://hastebin.com/ponuzapufu.coffee |
07:05:00 | * | yglukhov joined #nim |
07:09:37 | * | rok joined #nim |
07:27:24 | * | brson quit (Quit: leaving) |
07:53:28 | * | yglukhov quit (Remote host closed the connection) |
07:59:19 | * | yglukhov joined #nim |
08:15:01 | * | yglukhov quit (Remote host closed the connection) |
08:16:12 | Araq | darius93: try --gc:v2 with async. |
08:16:28 | Araq | hopefully I can get it to become the default soon... |
08:16:45 | Araq | cncl: it's much like C++ in this respect |
08:21:12 | * | Demos joined #nim |
08:24:15 | cncl | Araq: ah, ok. so, for example, let's say i know that i will have about 1500 entries for something that i need to put into a seq, but i won't know exactly until i'm finished iterating some source data |
08:25:12 | cncl | is there some way to tell a seq to allocate enough space for 1500 entries, but not actually initialize the memory or have its len report as 1500? |
08:25:37 | cncl | just as a hint to avoid re-allocating/copying |
08:25:45 | Araq | add newSeqOfCap to system.nim |
08:25:52 | Araq | that's on my todo for a while now |
08:26:01 | Araq | but you can do it. it's "easy". |
08:26:23 | cncl | ah ok, thanks. i'll take a look |
08:26:42 | cncl | also will add the uint `mod` :) i will change to a source build soon, and try that stuff |
08:26:55 | cncl | i'm on the binary distribution but i'll change to building from source soon |
08:35:24 | * | yglukhov joined #nim |
08:36:53 | * | nicktick1 joined #nim |
08:39:09 | * | nicktick quit (Ping timeout: 246 seconds) |
09:00:07 | Varriount | Araq: Any chance for 'setCap', analagous to setLen? |
09:02:53 | * | vendethiel joined #nim |
09:28:09 | * | vendethiel quit (Ping timeout: 246 seconds) |
09:34:12 | Araq | Varriount: that would be less convienent to use wouldn't it? |
09:35:28 | * | Arrrr joined #nim |
09:35:28 | * | Arrrr quit (Changing host) |
09:35:28 | * | Arrrr joined #nim |
10:03:56 | * | endragor joined #nim |
10:04:34 | * | rok quit (Quit: rok) |
10:05:31 | * | macbeth joined #nim |
10:24:09 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
10:27:22 | * | bjz joined #nim |
10:43:24 | * | heinrich5991 quit (Ping timeout: 276 seconds) |
10:49:53 | * | heinrich5991 joined #nim |
10:55:55 | * | irrequietus joined #nim |
10:58:10 | * | enthus1ast joined #nim |
11:00:26 | cheatfate | Araq, is it possible to access stack in runtime? |
11:00:49 | cheatfate | i mean get traceback |
11:06:20 | * | irrequietus quit () |
11:06:24 | * | irrequietus_ joined #nim |
11:06:43 | * | irrequietus_ quit (Client Quit) |
11:07:01 | flyx | cheatfate: in debug builds, you can use writeStackTrace and getStackTrace from system.nim |
11:07:28 | cheatfate | flyx, thanks |
11:15:15 | * | Arrrr quit (Ping timeout: 248 seconds) |
11:22:26 | * | Arrrr joined #nim |
11:33:35 | * | toaoMgeorge joined #nim |
11:50:42 | * | exebook quit (Ping timeout: 260 seconds) |
11:57:26 | * | darkf quit (Quit: Leaving) |
12:13:17 | toaoMgeorge | Just out of curiosity, what are the worst showstoppers for Nim right now? |
12:15:20 | toaoMgeorge | Probably in a month or two I will have some time to get my hands dirty with the compiler... |
12:19:44 | dom96 | toaoMgeorge: Glad to hear that :) |
12:20:25 | dom96 | toaoMgeorge: We've got a showstopper label on github: https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+label%3AShowstopper |
12:20:43 | * | exebook joined #nim |
12:24:04 | * | Riviera- quit (Remote host closed the connection) |
12:25:13 | * | Trustable joined #nim |
12:25:25 | Araq | Varriount: why would it return 'bool'? type relations are way more complex than that ... |
12:28:27 | toaoMgeorge | dom96: thanks |
12:28:48 | * | fredrik92 joined #nim |
12:32:24 | * | gokr joined #nim |
12:42:36 | fredrik92 | Hmm, for NimStudio you need sth. called a development build of Nim, how do I produce one? Build from source? |
12:53:02 | dom96 | fredrik92: What's NimStudio? |
12:54:35 | fredrik92 | dom96, Nim extension for Visual Studio (not the Nim plugin for VS Code) but the one for the big bloated IDE |
12:55:04 | dom96 | fredrik92: ahh. I would guess that you do have to build Nim from source then. |
12:56:54 | fredrik92 | Araq, I tried to compile Nim from source using VCC, that mainly failed because the nim source code uses ranged switch cases which is not supported by the MS Compiler |
12:56:55 | * | exebook quit (Read error: Connection reset by peer) |
12:59:22 | Araq | so build it properly |
12:59:41 | Araq | use a GGC based Nim first to compile a VCC based Nim. |
13:03:44 | * | fredrik92 quit (Read error: Connection reset by peer) |
13:03:49 | * | couven92 joined #nim |
13:05:03 | * | fredrik92 joined #nim |
13:08:30 | * | couven92 quit (Ping timeout: 268 seconds) |
13:17:57 | * | exebook joined #nim |
13:36:29 | * | ehmry joined #nim |
13:36:30 | * | rok joined #nim |
14:04:15 | fredrik92 | Araq, but isn't the nim source code generated? If yes, any chance to expand ranged switch cases in the future? Or can run Regex over the entire thing a do a VCC compileable PR? |
14:06:35 | fredrik92 | I actually started with that, so I could probably get it running after Easter... As a proof of concept? |
14:12:11 | * | baff1e quit (Remote host closed the connection) |
14:16:56 | Varriount | fredrik92: It's generated, but there are options for tailoring it to various compilers, IIRC |
14:17:56 | Varriount | --cc:vcc for example |
14:23:54 | Varriount | Araq: I don't suppose endb works wih the compiler? |
14:27:50 | * | macbeth quit (Quit: Page closed) |
14:32:47 | darius93 | Araq, it seems to segfault when i add '--gc:v2'. |
14:37:27 | * | francisl joined #nim |
14:38:29 | * | francisl quit (Client Quit) |
15:18:20 | cheatfate | do we have something like ordered stack, i need to push values of any order but i want to pop always maximum value of stack? |
15:23:21 | endragor | in stdlib - no, as far as I know. there is https://github.com/bluenote10/nim-heap |
15:28:44 | * | fredrik92 quit (Quit: Shutting down . . .) |
15:32:23 | * | fredrik92 joined #nim |
15:35:15 | * | Arrrr quit (Ping timeout: 276 seconds) |
15:35:33 | * | endragor_ joined #nim |
15:38:02 | * | rok quit (Quit: rok) |
15:39:28 | * | endragor quit (Ping timeout: 250 seconds) |
15:40:27 | * | endragor_ quit (Ping timeout: 276 seconds) |
15:49:47 | fredrik92 | Hmm... I get a weird error when using nim and the target file are not in the same directory as my current working directory: |
15:49:48 | fredrik92 | ...\Source\GitHub\nim-lang>nim compile niminst |
15:49:48 | fredrik92 | Hint: system [Processing] |
15:49:48 | fredrik92 | Hint: niminst [Processing] |
15:49:48 | fredrik92 | Error: cannot open '...\source\github\nim-lang\niminst.nim' |
15:50:12 | fredrik92 | (On Windows in cmd) |
15:50:52 | fredrik92 | But when I cd'ed into the niminst directory, nim compiled just fine!... |
15:51:14 | fredrik92 | Backslash problems? |
15:54:27 | * | endragor joined #nim |
15:56:14 | cheatfate | endragor, thanks |
16:06:19 | Varriount | Demos: You around? |
16:11:45 | fredrik92 | how do I generate csources for nim itself? instead of clong the nim-lang/csources repo? I have Nim installed and in my path |
16:12:11 | * | Arrrr joined #nim |
16:12:11 | * | Arrrr quit (Changing host) |
16:12:11 | * | Arrrr joined #nim |
16:13:22 | dom96 | fredrik92: ./koch csources -d:release |
16:17:02 | fredrik92 | thx |
16:18:56 | * | arnetheduck quit (Ping timeout: 244 seconds) |
16:34:22 | * | chrisheller joined #nim |
16:35:47 | Arrrr | Why does sizeOf static variable display a different value than the one from a non static variable? |
16:35:50 | Arrrr | http://ideone.com/JyZyBf |
16:35:51 | * | s455wang left #nim ("WeeChat 1.3") |
16:36:29 | fredrik92 | koch csources -d:release --cc:vcc fails:nim compile -f --symbolfiles:off --compileonly --gen_mapping --cc:gcc --skipUserCfg --os:linux --cpu:i386 -d:release --cc:vcc compiler/nim.nimc:\nim\lib\pure\math.nim(135, 8) Error: implementation of 'math.randomize()' expected |
16:37:15 | fredrik92 | Oh, sry.. |
16:37:17 | fredrik92 | $ koch csources -d:release --cc:vcc |
16:37:26 | fredrik92 | $ nim compile -f --symbolfiles:off --compileonly --gen_mapping --cc:gcc --skipUserCfg --os:linux --cpu:i386 -d:release --cc:vcc compiler/nim.nim |
16:37:37 | fredrik92 | > c:\nim\lib\pure\math.nim(135, 8) Error: implementation of 'math.randomize()' expected |
16:38:12 | fredrik92 | and that's both in the devel branch and the v0.13.0 branch of the Nim repo |
16:41:02 | * | filwit joined #nim |
16:42:01 | * | filwit quit (Client Quit) |
16:43:40 | * | filwit joined #nim |
16:52:42 | dom96 | fredrik92: hrm, is koch passing both 'cc:gcc' and 'cc:vcc', is that the issue? |
16:53:32 | fredrik92 | seems so... because when I just take that one line and execute it without --os:linux and --cc:gcc then everything is fine |
16:54:02 | fredrik92 | But I cannot really figure out where koch generates that command and inserts gcc and linux... |
16:54:43 | fredrik92 | tried to change the GitHub/nim-lang/Nim/config/nim.cfg, but that did not work either |
16:55:03 | fredrik92 | and I have cc = vcc in my C:\Nim\config\nim.cfg |
16:55:24 | dom96 | I think it's just generated here: https://github.com/nim-lang/Nim/blob/devel/koch.nim#L101 |
16:55:51 | dom96 | Guessing whatever creates `args` is doing it incorrectly, think you could investigate? :) |
16:58:08 | fredrik92 | Yeah... will do... do we have a clue where args is coming from? |
16:59:08 | dom96 | fredrik92: not sure, look up where `csources` is being called |
16:59:19 | fredrik92 | ah, https://github.com/nim-lang/Nim/blob/devel/koch.nim#L377 |
17:06:50 | Demos | Varriount, I am now |
17:07:42 | * | pregressive joined #nim |
17:17:10 | * | desophos joined #nim |
17:29:48 | fredrik92 | dom96, the error actually happens in niminst which koch calls |
17:42:25 | Varriount | fredrik92: Do 'nim c --cc:vcc compiler/nim.nim' |
17:42:53 | Varriount | E.g, compile manually instead of using koch. |
17:43:15 | * | brson joined #nim |
17:43:22 | fredrik92 | yes, that works.. But i actually wanted koch to csource nim using vcc settings... But that may not be possible? |
17:45:54 | dom96 | fredrik92: why do you need the csources for vcc? |
17:46:54 | fredrik92 | wanted to compile nim with vcc instead of gcc... right now, more as a proof of concept... |
17:59:52 | fredrik92 | Araq, the nimcache option in nim is interpreted relative to the location of the nim.file to compile, not relative to the current directory! the -o option however is relative to the current working directory. That is actually a big problem when the nim file is not in current dir, because the linking step fails |
18:00:25 | fredrik92 | the only way is to use absolute paths whenever possible, that always works |
18:03:05 | dom96 | fredrik92: can't you simply do: nim c --cc:vcc compiler/nim to do so? |
18:04:02 | dom96 | regarding the problem with -o, likely already reported https://github.com/nim-lang/Nim/labels/Path%20Handling |
18:04:03 | fredrik92 | dom96 can I? I don't know... You guys here told me to do ./koch csource -d:release to generate Nim's C source code |
18:04:37 | dom96 | fredrik92: Try it :) |
18:09:09 | * | pregressive quit (Remote host closed the connection) |
18:09:43 | * | pregressive joined #nim |
18:13:55 | fredrik92 | is there a way to get nim only to generate code, no compile, no linking, no anything? |
18:14:15 | * | pregressive quit (Ping timeout: 264 seconds) |
18:21:34 | * | vendethiel joined #nim |
18:23:23 | Demos | nim does compile wiht VCC |
18:23:30 | Demos | I do it regularly |
18:23:43 | Demos | koch boot --cc:vcc I think will work |
18:23:53 | Demos | you do need vcc actually on the path |
18:27:09 | * | ehmry left #nim ("Leaving") |
18:27:09 | mog | KeyError: Identifier('ehmry') (file "/usr/lib/python3/dist-packages/sopel/tools/target.py", line 65, in clear_user) |
18:29:51 | dom96 | fredrik92: nim c --compileonly --cc:vcc file.nim |
18:32:57 | fredrik92 | Demos, you're right, that worked like a charm... csource appearently does not work nice with vcc |
18:33:24 | Demos | oh yeah, that's super annoying |
18:33:32 | Demos | I tend to bootstrap with an official release\ |
18:33:41 | Demos | or the buildbots when those were working |
18:34:20 | fredrik92 | hmm... well enough playing around for today... I will have a look tomorrow... :-) |
18:34:22 | * | fredrik92 quit (Quit: Shutting down . . .) |
18:55:54 | * | fredrik92 joined #nim |
18:58:39 | * | nicktick joined #nim |
19:00:19 | * | apotheon quit (Ping timeout: 248 seconds) |
19:02:27 | * | nicktick1 quit (Ping timeout: 248 seconds) |
19:02:31 | * | nicktick2 joined #nim |
19:02:36 | * | vendethiel quit (Ping timeout: 276 seconds) |
19:06:10 | * | nicktick quit (Ping timeout: 268 seconds) |
19:11:45 | * | apotheon joined #nim |
19:17:50 | * | Demon_Fox joined #nim |
19:19:19 | * | endragor quit (Remote host closed the connection) |
19:40:18 | cheatfate | i'm looking for fast concurrent hash map/table |
19:49:18 | Varriount | cheatfate: I think there's a lock free hash table in the stdlib. |
19:52:49 | cheatfate | Varriount, it looks a little bit strange |
19:53:06 | cheatfate | Varriount, maybe {.experimental.} staff |
19:53:06 | Varriount | Howso? |
19:53:42 | cheatfate | no header, no docs |
19:55:26 | Varriount | cheatfate: You can also use sharedtables.nim |
19:56:07 | cheatfate | Varriount, already tried to use sharedtables.nim it locking whole table... |
19:56:14 | cheatfate | and missed many functions |
19:56:53 | Varriount | cheatfate: What are you doing that you're running into such a large amount of lock contention? |
19:58:11 | cheatfate | Varriount, new variant of selectors.nim, with more feautures and multithreading |
19:59:30 | Varriount | cheatfate: https://github.com/nim-lang/Nim/tree/crazy_concurrency |
19:59:55 | cheatfate | Varriount, not working and forgotten i think |
20:00:16 | Varriount | cheatfate: Well, that branch is using shared tables. |
20:00:37 | Varriount | So your choices are to use sharedtables, lockfree tables, or roll your own. |
20:03:52 | cheatfate | i think lockfree tables ready and tested only on 32bit |
20:12:16 | * | rok joined #nim |
20:14:12 | Varriount | cheatfate: I'd use the sharedtables module, and not pre-optimize |
20:14:28 | Varriount | A truly lock-free backend can always be added. |
20:16:07 | Varriount | Araq: Why is it 'paramTypesMatch' and not just 'typesMatch'? |
20:23:59 | * | nicktick joined #nim |
20:27:34 | * | nicktick2 quit (Ping timeout: 268 seconds) |
20:28:51 | Varriount | Araq: Also, what is considered to be "metaConvertible"? |
20:38:26 | * | vendethiel joined #nim |
20:50:21 | Varriount | Araq: I think I've found the bug with generic types - there's something wrong in typeRel |
20:51:37 | * | toaoMgeorge quit (Ping timeout: 268 seconds) |
20:56:30 | * | filwit quit (Quit: Leaving) |
21:00:53 | * | nicktick1 joined #nim |
21:02:04 | * | nicktick quit (Ping timeout: 244 seconds) |
21:09:14 | * | darkf joined #nim |
21:14:09 | * | Arrrr quit (Quit: WeeChat 1.4) |
21:20:34 | * | vendethiel quit (Ping timeout: 252 seconds) |
21:23:08 | * | tinAndi joined #nim |
21:25:43 | * | pregressive joined #nim |
21:30:05 | Araq | Varriount: well? what's the bug? |
21:30:29 | Varriount | Araq: I don't know quite yet. I'm still trying to decipher the huge function. |
21:30:46 | Varriount | typeRel is saying that the generics are convertible though, which isn't true. |
21:32:26 | Araq | exactly! |
21:35:11 | Varriount | Araq: Well, I feel dumb. |
21:35:24 | * | fredrik92 quit (Ping timeout: 268 seconds) |
21:35:28 | Varriount | It took me manually tracing the assignment code to get to this point. |
21:36:07 | Varriount | Of course, now there's the 500+ line monster that is typeRel to debug. |
21:37:26 | Araq | hmm, didn't I tell you it's in sigmatch.nim ? |
21:40:27 | Varriount | Yes, but not which procedure. |
21:42:05 | * | Gonzih quit (Quit: WeeChat 1.4) |
21:42:23 | * | Gonzih joined #nim |
21:50:39 | * | nicktick joined #nim |
21:52:28 | Araq | Varriount: tyGenericInst |
21:52:46 | Araq | line 928 |
21:52:50 | Araq | it's completely wrong. |
21:53:43 | * | nicktick1 quit (Ping timeout: 244 seconds) |
21:59:11 | * | vendethiel joined #nim |
22:00:45 | Varriount | I don't think I would have spotted that without quite a bit of effor. |
22:01:19 | * | rok quit (Quit: rok) |
22:03:05 | cheatfate | Araq, can i use seqs with threads? are seqs using shared memory? |
22:04:09 | * | tinAndi quit (Ping timeout: 260 seconds) |
22:04:57 | Araq | no. |
22:05:38 | Varriount | cheatfate: Think about it: what happens if one thread adds to a sequence and the internal arrays needs to be re-sized/moved? |
22:06:06 | * | nicktick1 joined #nim |
22:07:45 | * | nicktick2 joined #nim |
22:08:23 | cheatfate | Varriount, :) i understand this and bring my locks to it, problem is that all most of collection staff using "ref object" and not using allocShared... so other threads could not access this memory |
22:08:45 | Varriount | cheatfate: Use arrays? |
22:09:23 | cheatfate | instack arrays? |
22:09:40 | Varriount | cheatfate: Arrays allocated from shared memory. |
22:09:52 | cheatfate | hmm |
22:10:04 | * | nicktick quit (Ping timeout: 252 seconds) |
22:10:16 | cheatfate | but arrays could not be extended... |
22:10:28 | Varriount | cheatfate: So copy and reallocated the arrays. |
22:10:31 | * | fredrik92 joined #nim |
22:11:15 | * | nicktick1 quit (Ping timeout: 248 seconds) |
22:11:16 | * | fredrik92 quit (Read error: Connection reset by peer) |
22:11:26 | cheatfate | Varriount, could you please point me on some examples |
22:11:39 | * | fredrik92 joined #nim |
22:14:16 | * | fredrik92 quit (Read error: Connection reset by peer) |
22:14:55 | cheatfate | Varriount, i even dont know how to declare such array... |
22:15:34 | Varriount | One moment. |
22:21:03 | * | vendethiel quit (Ping timeout: 240 seconds) |
22:28:52 | * | yglukhov quit (Read error: Connection reset by peer) |
22:29:24 | * | yglukhov joined #nim |
22:31:10 | Varriount | Araq: Has something changed with the {.unchecked.} pragma? I can't seem to use it on generic arrays. |
22:33:42 | Araq | no |
22:33:57 | Varriount | cheatfate: Use createShared, resizeShared, and freeShared to allocate blocks of memory. |
22:34:54 | * | nicktick joined #nim |
22:34:59 | Varriount | Araq: "type UncheckedArray[T] {.unchecked.} = array[0..30, T]" gives "Error: implementation of 'UncheckedArray' expected" |
22:36:02 | cheatfate | Varriount, i know about functions :) |
22:36:36 | * | nicktick2 quit (Ping timeout: 244 seconds) |
22:36:37 | Araq | Varriount: put the pragma before the [T] |
22:40:18 | Araq | Varriount: to make you feel better: I've no idea what that code section is supposed to do |
22:41:22 | Varriount | Araq: Well, I can see that the loop is meant to check the type relation of all the generic's subtypes. I don't quite understand why the first child node is skipped though. |
22:42:25 | Varriount | Araq: What's so special about the last child node of a parent node? I mean, why is skipTypes used so much in the compiler? |
22:47:39 | Araq | the data structures are arranged so that the last child is most important |
22:49:18 | Varriount | Araq: So, in a PType that represents a generic type, the last node is..? |
22:49:30 | Araq | the implementation/instantiation |
22:49:48 | Varriount | Huh. |
22:50:01 | Varriount | I would have thought the first node would be most important. |
22:56:42 | Varriount | cheatfate: https://gist.github.com/Varriount/a300ef3b3213eb1c79c7 |
22:59:39 | cheatfate | Varriount, thanks |
22:59:45 | cheatfate | i will try to use it |
23:00:43 | Varriount | cheatfate: Note that ptr ptr is used - This means that when you want to resize the sequence, you won't get broken pointers. |
23:01:18 | Varriount | It also means that the semantics for this particular data structure are the same as references - the data isn't copied on assignment. |
23:01:32 | * | vendethiel joined #nim |
23:01:46 | Varriount | This is different from how Nim's sequences and strings behave. Nim strings and sequences are copy-on-assignment. |
23:23:59 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:24:26 | * | bjz joined #nim |
23:28:15 | * | vendethiel quit (Ping timeout: 268 seconds) |
23:28:27 | * | vendethiel joined #nim |
23:41:04 | cheatfate | Varriount, could you please test this? https://gist.github.com/cheatfate/e7de8594e22df63ae455 |
23:41:37 | cheatfate | i dont understand why capacity has been changed |
23:42:51 | Varriount | cheatfate: Are you sure you want that structure layout? |
23:43:27 | cheatfate | yeah i want copy-on-assignment for it |
23:44:34 | cheatfate | there will be push/pop and iterate nothing more |
23:46:14 | Varriount | cheatfate: That will only copy the capacity and length, not the data. |
23:46:48 | cheatfate | i think we are talking about different things |
23:47:22 | cheatfate | i dont understand why first repr gives 64 and second one 72 |
23:47:48 | cheatfate | after first repr result.capacity = 64 after second repr result.capacity = 72 |
23:48:30 | Varriount | cheatfate: It might have something to do with the wierd casting stuff on line 39 |
23:48:38 | Varriount | What are you even trying to do there? |
23:49:28 | * | vendethiel quit (Ping timeout: 244 seconds) |
23:49:41 | cheatfate | i will try to set data = address of memory after structure |
23:50:14 | cheatfate | [structure][memory] i will try to point data to [memory] |
23:50:26 | * | Jesin quit (Quit: Leaving) |
23:51:00 | Varriount | cheatfate: You know that will break as soon as the object is assigned somewhere else, right? |
23:51:59 | cheatfate | what object? |
23:52:56 | * | Jesin joined #nim |
23:53:12 | onionhammer1 | Araq how do you enable the new GC? |
23:53:19 | onionhammer1 | or is it default yet in devel? |
23:53:21 | Varriount | onionhammer1: --gc:v2 |
23:54:14 | Varriount | cheatfate: Ok, objects are value types. They usually lie on the stack, and their entire structure data is copied from one chunk of memory to another when assigned. |
23:54:59 | * | gokr quit (Quit: Leaving.) |
23:55:14 | cheatfate | and? |
23:55:18 | Varriount | If you set the data member to point to the end of the object, the data member will have a wierd pointer to another object when it is copied. |
23:56:11 | cheatfate | but data member will be not accessible... |
23:56:16 | onionhammer1 | Araq Varriount looks like my websocket memtest thing is working better (?) |
23:56:26 | onionhammer1 | with default GC still, not testing v2 yet |
23:56:47 | Varriount | cheatfate: Not directly, but I'm assuming that the push and pop procedures will need to access the data |
23:57:00 | Araq | your websocket memtest is a decade old and I fixed it years ago. |
23:57:09 | onionhammer1 | :P |
23:57:21 | Varriount | cheatfate: Also, assignment will only copy the *pointer* to the data, not the data itself. I'm not quite sure you want that. |
23:57:23 | onionhammer1 | it wont build with gc v2 though ARaq |
23:57:37 | onionhammer1 | stdlib_posix.c:106:1: error: unknown type name 'FILE' |
23:57:39 | onionhammer1 | FILE* dumpheapfile; |
23:58:11 | onionhammer1 | has anyone made a websocket nimble package yet? |
23:58:57 | Araq | shouldn't your system have a FILE type? |
23:59:08 | cheatfate | Varriount, ok i will do it in 2 allocs |
23:59:10 | * | nicktick2 joined #nim |
23:59:26 | dom96 | hello guys |