00:04:18 | * | bjz joined #nim |
00:06:04 | * | devted quit (Quit: Sleeping.) |
00:06:16 | * | nsf quit (Quit: WeeChat 1.7) |
00:21:26 | * | carterza joined #nim |
00:33:02 | * | vlad1777d quit (Remote host closed the connection) |
01:00:37 | * | chemist69 quit (Ping timeout: 256 seconds) |
01:03:30 | * | chemist69 joined #nim |
01:10:58 | * | xet7 quit (Quit: Leaving) |
01:48:56 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:03:09 | * | gangstacat quit (Quit: Ĝis) |
02:03:29 | * | krux02 quit (Ping timeout: 240 seconds) |
02:04:30 | * | chemist69 quit (Ping timeout: 245 seconds) |
02:18:37 | * | chemist69 joined #nim |
02:48:17 | * | allan0 quit (Ping timeout: 256 seconds) |
02:49:44 | * | eizua joined #nim |
02:52:45 | * | allan0 joined #nim |
02:56:26 | FromGitter | <martinium> anyone know of a rss lib for Nim with documentation? |
02:56:37 | FromGitter | <martinium> I found one called nim-rss but doesn't have any documentation |
03:02:34 | * | chemist69 quit (Ping timeout: 240 seconds) |
03:15:49 | * | rauss joined #nim |
03:16:38 | * | chemist69 joined #nim |
03:35:21 | * | cjbest joined #nim |
03:44:02 | * | yglukhov joined #nim |
03:49:18 | * | yglukhov quit (Ping timeout: 276 seconds) |
03:55:41 | shashlick | I've been trying libcurl.nim and while it builds, it doesn't seem to run |
03:56:11 | shashlick | could not load: libcurl.dll |
03:56:11 | shashlick | - Error: execution of an external program failed: |
03:56:41 | shashlick | at least the version of libcurl.dll bundled nim doesn't seem to work |
04:17:30 | shashlick | https://nim-lang.org/docs/libcurl.html => 404 |
04:29:08 | * | brson quit (Quit: leaving) |
04:35:03 | * | cjbest quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
04:36:06 | * | sz0 joined #nim |
04:55:23 | FromGitter | <rosshadden> I have a `c2nim` question. Given the following two lines in a header file: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=589e9939f045df0a22326184] |
04:59:30 | * | yay quit (Quit: yay) |
04:59:34 | FromGitter | <rosshadden> Do you know, @gokr? Your blog post on this was a great resource. |
05:03:31 | * | Jesin joined #nim |
05:03:40 | * | chemist69 quit (Ping timeout: 245 seconds) |
05:20:47 | carterza | I need to wrap - https://github.com/jarikomppa/soloud |
05:23:04 | carterza | I’m running into some problems - https://gist.github.com/zacharycarter/5313dd425a7f570172ecf6f6de73305b#file-gistfile1-txt-L61 |
05:23:54 | carterza | I don’t understand the error, even if I add an empty struct for the type, I still get the same error |
05:30:37 | carterza | ah nm |
05:30:44 | carterza | stupid me. it’s late... |
05:30:50 | * | chemist69 joined #nim |
05:36:18 | * | eizua quit (Remote host closed the connection) |
06:22:00 | * | tankfeeder joined #nim |
06:22:56 | * | rauss quit (Quit: WeeChat 1.7) |
06:38:06 | * | chemist69 quit (Ping timeout: 252 seconds) |
06:46:41 | Araq | shashlick: 32 vs 64 bit problem? |
06:47:11 | shashlick | I am using libcurl.dll in the nim folder itself |
06:47:45 | shashlick | copied it over to my exe dir |
06:49:40 | carterza | sweet |
06:49:54 | carterza | I have https://github.com/jarikomppa/soloud wrapped now |
06:56:41 | * | chemist69 joined #nim |
06:56:49 | Araq | shashlick: yes, the installer likely got it wrong |
06:57:12 | Araq | that's why most DLLs have <bits> attached |
07:02:25 | shashlick | ya, actually I installed the x64 version via the installer but it was unable to install the DLLs so I copied those over from the x64 ZIP file |
07:02:44 | shashlick | the ZIP includes 32 and 64 bit versions of all DLLs but libcurl has only one DLL |
07:40:03 | Araq | that pretty much means libcurl is not supported :P |
07:42:53 | * | bjz joined #nim |
07:46:05 | * | yglukhov joined #nim |
07:47:55 | * | Vladar joined #nim |
07:48:41 | * | tankfeeder quit (Ping timeout: 240 seconds) |
07:50:19 | * | yglukhov quit (Ping timeout: 256 seconds) |
07:55:00 | shashlick | I just tried building a 32bit version of my app with mingw32 and 32-bit version of Nim but this time, it just crashes with libcurl |
07:55:17 | shashlick | This application has requested the Runtime to terminate it in an unusual way. |
07:55:17 | shashlick | Please contact the application's support team for more information. |
07:55:17 | shashlick | No stack traceback available |
07:55:17 | shashlick | SIGABRT: Abnormal termination. |
07:55:44 | * | nsf joined #nim |
07:56:53 | shashlick | Araq: the libcurl.dll packaged with Nim, was it built along with Nim or downloaded from elsewhere? I'm not able to find a DLL version of libcurl that's not for cygwin |
08:08:05 | shashlick | okay I found a version of libcurl that is working, so just the dll is bad |
08:08:37 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:24:05 | FromGitter | <Varriount> @rosshadden Integers are not implicitly convertible to pointers |
08:28:49 | Araq | shashlick: thanks for reporting, will remove this DLL then |
08:29:00 | * | yglukhov joined #nim |
08:31:21 | * | yglukhov quit (Remote host closed the connection) |
08:36:31 | * | rokups joined #nim |
08:41:48 | Araq | varriount: awaiting your finish PR ;-) |
08:47:32 | * | hjsagg joined #nim |
08:50:05 | * | bjz joined #nim |
08:55:29 | Jipok[m] | Hi everybody. I can't register on the forum. It asks: |
08:55:34 | Jipok[m] | What is 969+1? |
08:55:47 | Jipok[m] | all time |
08:55:56 | Xe | can you add? |
08:56:04 | Jipok[m] | I answer: 970 |
08:56:24 | Jipok[m] | and i get "Error: Answer to captcha incorrect! " |
08:56:43 | Xe | clear your cookies and try again? |
08:57:15 | Jipok[m] | already tried |
08:57:35 | Xe | try from the tor browser? |
08:57:42 | Jipok[m] | I also tried to use private mode and a different browser |
08:58:12 | Jipok[m] | not from tor |
08:58:41 | Araq | Jipok[m]: you're a bot? ;-) |
08:58:47 | Araq | try to get a different captcha |
08:59:29 | rokups | Araq: need guidance. what do i do to make coroutines support yelding in try/except blocks? |
08:59:41 | * | gokr joined #nim |
09:00:12 | Araq | rokups: good question. try is either mapped to setjmp or C++ exceptions |
09:00:26 | Jipok[m] | Araq: how? it asks me all the time 969 + 1 |
09:01:24 | Araq | both mechanisms put something on the stack, rokups. you switch stacks properly, it works out of the box? |
09:01:57 | rokups | somehow it doesnt. i thought maybe there is some magic like with stack frames that needed explicit handling |
09:02:30 | * | yglukhov joined #nim |
09:02:41 | Araq | Jipok[m]: clean cookies and get a fresh IP and retry |
09:03:00 | Araq | for me it asks 5+145, for instance |
09:03:16 | rokups | one coroutine after cathing exception exits proper, another dies with "stack smashing detected". |
09:03:32 | Araq | also it overlays 2 numbers, maybe you misread the numbers? |
09:04:03 | Araq | only blue digits matter |
09:04:50 | Jipok[m] | I made it through a proxy. |
09:05:14 | Araq | show me screenshot please |
09:05:18 | Jipok[m] | it worked |
09:05:22 | Araq | from the captcha |
09:05:26 | Araq | ah ok. |
09:05:40 | rokups | Araq: there is thing called `currException`, doesnt that need to be preserved somehow? |
09:05:54 | Araq | rokups: it's a thread local |
09:06:17 | * | yglukhov quit (Remote host closed the connection) |
09:06:18 | rokups | Araq: but coroutines run on same thread and try/except blocks may overlap so to speak if suspend() is called in them |
09:06:53 | Araq | hmm yeah, that's a problem then |
09:07:18 | Araq | try C++ mode first, maybe C++ gets it right? |
09:07:28 | rokups | kk |
09:09:16 | Araq | the thread local currException needs to become "coroutine" local, right. tough nut, but you can do that in your 'swapStack' op |
09:10:01 | shashlick | Tried to build libcurl as a static library but program crashes |
09:10:16 | rokups | yeah, just like with stack frames. cpp doesnt even compile heh. doesnt like my importc'ed apis. |
09:10:20 | shashlick | nim c --dynlibOverride:libcurl --passL:libcurl.lib program.nim |
09:12:35 | shashlick | well, looks like libcurl.nim is written as a dynlib only |
09:12:43 | * | yglukhov joined #nim |
09:14:28 | Jipok[m] | Can you help me? I used the code sample from githab. |
09:14:29 | Jipok[m] | https://github.com/nim-lang/ui |
09:14:37 | Jipok[m] | But it does not work for me. The output of the compiler here: |
09:14:37 | Jipok[m] | http://pastebin.com/zZaW1KB2 |
09:14:58 | * | yglukhov quit (Remote host closed the connection) |
09:16:54 | Araq | Jipok[m]: for some reason a newline is in the GCC invocation? |
09:17:00 | shashlick | I need a libcurl.a for Windows, not a .lib |
09:17:26 | Araq | shashlick: just use httpclient instead. I know it sucks, but dom96 is working on it. |
09:17:44 | * | yglukhov joined #nim |
09:17:52 | shashlick | man reason for curl is SSPI to punch through an NTLM proxy |
09:18:24 | Araq | I don't know what that means, so it must be a bad idea. |
09:18:45 | Jipok[m] | Araq: idk. I just called "nim c sample.nim" |
09:19:04 | Araq | Jipok[m]: worked on my ubuntu, but I have an idea |
09:19:38 | Jipok[m] | fedora 25 |
09:20:09 | Jipok[m] | can offer to try anything? |
09:21:36 | Araq | just a sec |
09:21:49 | * | yglukhov quit (Ping timeout: 240 seconds) |
09:22:42 | Araq | Jipok[m]: try most recent master please |
09:23:12 | rokups | Araq: saving and restoring (framePtr, excHandler, currException) when switching context worked ^_^ |
09:23:34 | Araq | rokups: :D good job |
09:23:53 | Araq | I think these are the only ones that need to be saved |
09:23:58 | rokups | did you check out https://github.com/nim-lang/Nim/compare/devel...rokups:feature/coroutines2?expand=1 ? any objections? |
09:24:16 | Araq | well you removed the old Registers stuff |
09:24:24 | Araq | not sure that's valid |
09:24:45 | Araq | better be safe than sorry when it comes to GC stack scanning |
09:25:07 | rokups | well.. main stack is still scanned like all coroutine stacks so that buffer should end up scanned i think |
09:25:16 | rokups | if it is scanned it should be good right? |
09:25:49 | rokups | i can try debugging in IDA if its picked up by gc |
09:26:03 | Araq | yes, but I cannot review this, it needs to be tested somehow |
09:26:19 | rokups | do we have any gc stress tests available? |
09:26:33 | Araq | well we have tests/gc |
09:26:55 | Araq | and some stress test that I dunno where it ended, it runs for so long we had to disable it |
09:27:07 | rokups | btw whats your stance on using ucontext.h? |
09:27:31 | Araq | I don't like this move to OS specific APIs, inline assembler is way cooler |
09:27:48 | rokups | its not exactly os-specific. its posix |
09:27:49 | cheatfate | Araq, we don't have resources to maintain assembly code for all platforms |
09:27:59 | Araq | but by now you know more about these things than I do |
09:28:05 | Araq | so I trust your judgement. |
09:28:20 | Araq | cheatfate: so make the OS specific stuff a fallback |
09:28:39 | Araq | inline assembler means we avoid context switches |
09:28:51 | Araq | which is kind of the point of this. |
09:29:02 | rokups | err wut? setjmp does not perform context switch |
09:29:06 | Araq | well not *the* point, but one point. |
09:29:06 | rokups | it just dumps registers |
09:29:14 | rokups | longjmp does context switch |
09:29:57 | Araq | well Windows fibers at least mean the kernel is involved, so user<->kernel context switch |
09:30:07 | cheatfate | Araq, fibers are userspace |
09:30:08 | rokups | nooo its not |
09:30:20 | rokups | fibers just meddle with TEB or something, totally userspace |
09:30:23 | rokups | thats the whole point |
09:30:51 | cheatfate | ucontext for posix and fibers on windows are all userspace, no kernel involved |
09:32:04 | rokups | i dont like apple/posix deprecating ucontext, but i think we can be sure at least linux will not remove them. even if apple yanks ucontext it is probably still easier to maintain support for 3 OS at source code level than X architectures at assembly level |
09:33:16 | rokups | by the way speaking of fibers - if you inspected that coroutines2 branch - it uses undocumented Fiber struct on windows to get allocated stack start and end, cool stuff :p picked it up from reactos and verified debugging on windows ;) |
09:33:44 | Araq | ok, I misunderstood these APIs then |
09:33:56 | Araq | also this C++ exception stuff is convincing |
09:34:28 | Araq | we don't know what thread local stuff it uses, but the OS has some chance of knowing |
09:34:51 | Araq | „On a somewhat historical note, the real reason we added fibers was not to give people control over their threads. Heck, it’s your thread, you’ve got control, just allocate some memory for a stack then set ESP to point to it. Lots of people tried this, but it’s not quite that simple. There are a lot of subtleties to get wrong. For instance, they would switch the stack base, but not update the stack limit. Or not switch the exception handler list |
09:34:51 | Araq | . Or forget to swap the FP state. And down the line these little gotchas would bite them in some subtle unforeseen way. |
09:34:51 | Araq | Since people kept getting it wrong (and in fact, it was not possible to get it right without doing some fairly undocumented stuff) and causing untold grief, we figured it was time to build it into the OS and let everybody use.“ |
09:34:59 | Araq | from https://blogs.msdn.microsoft.com/larryosterman/2005/01/05/why-does-win32-even-have-fibers/ |
09:35:50 | * | carterza quit (Quit: carterza) |
09:36:31 | Jipok[m] | Araq: http://pastebin.com/mrCuy94F |
09:36:46 | Araq | Jipok[m]: use nim devel |
09:37:13 | Jipok[m] | arrr |
09:38:14 | rokups | now i wonder what will happen using cpp exceptions on unixes |
09:38:38 | rokups | i have no idea how exceptions work in c++ on non-windows, just vaguely familiar with windows stuff even |
09:38:55 | Araq | bbl |
09:39:48 | Jipok[m] | Araq: you wrote: "Jipok[m]: try most recent master please" |
09:40:46 | * | Matthias247 joined #nim |
09:41:15 | * | Trustable joined #nim |
09:41:49 | Jipok[m] | before that I used devel |
09:49:08 | * | hjsagg quit (Ping timeout: 255 seconds) |
09:52:20 | dom96 | Jipok[m]: he probably means most recent master of the ui repo. |
09:53:18 | * | gokr quit (Ping timeout: 276 seconds) |
09:55:21 | Jipok[m] | ah< ok |
10:01:58 | Jipok[m] | http://pastebin.com/KwwzyWJj |
10:02:31 | Jipok[m] | Nim Compiler Version 0.16.1 (2017-02-11) [Linux: amd64] |
10:03:24 | * | tankfeeder joined #nim |
10:16:38 | FromGitter | <Varriount> rokups: Eh, we really shouldn't use undocumented APIs |
10:17:05 | rokups | Varriount its best we got, and its not going to change anyway so its cool ;) |
10:17:20 | Jipok[m] | maybe I'm wrong set nim? nimx not work for me, too. |
10:17:21 | Jipok[m] | http://pastebin.com/R6uJbNbj |
10:17:43 | FromGitter | <Varriount> Rokups: Couldn't we use a marker variable, and take the address of it? |
10:19:13 | rokups | gc needs both ends of the stack. if we were getting stack address that way we would have no way to get other end of the stack precisely. all we could do is guess because we know stack size we requested, but it is still a guess. and undocummented api that is stable is better than guess that will eventually lead to a crash ;) |
10:19:57 | rokups | i dealt quite a bit with undocumented windows internals in the past, they arent changing. all microsoft is doing is adding on to end of structs, not introducing random members in the middle. trust me ;) |
10:20:30 | * | Vladar quit (Read error: Connection reset by peer) |
10:20:42 | FromGitter | <Varriount> rokups: But the stack end is stored in a register, right? |
10:21:35 | FromGitter | <Varriount> And the stack start can be calculated by using a marker variable, which is what the scanning gc does for the main stack. |
10:21:39 | rokups | its not precise end since we are already executing and stack was already manipulated |
10:22:42 | rokups | even if we check that variable very first thing in coroutine just started it will not be at very end. some stuff will be pushed on the stack |
10:23:00 | rokups | it gets even more messy between different build configs and optimizations |
10:23:17 | rokups | some stuff may go on stack in debug but not be there in release and so on |
10:23:57 | rokups | but hey - if you prove me wrong and deliver a proc that can get exact stack ends upon execution ill take it immediately as a proper solution :p |
10:24:26 | FromGitter | <Varriount> Fine. But I don't like it - using undocumented internals leads to headaches for everyone when things need to/have changed. |
10:24:49 | cheatfate | Varriount: using undocumented api on windows is not so big sin as you think... |
10:24:59 | cheatfate | everybody uses it |
10:25:29 | FromGitter | <Varriount> https://blogs.msdn.microsoft.com/oldnewthing/20031223-00/?p=41373/ |
10:25:41 | rokups | there probably is bigger chance for api to get removed entirely than for undocumented structs to be changed in the middle |
10:26:35 | cheatfate | Varriount i dont see here any changes to TEB/PEB |
10:27:06 | cheatfate | even windows fibers api uses undocumented TEB |
10:27:08 | Jipok[m] | Araq: Should I create a theme with my problem on the forum? |
10:27:09 | rokups | Varriount that article describes accessing something that is not even exposed. it is totally different thing and indeed unsafe. |
10:27:32 | cheatfate | try to look at windows headers macro GetCurrentFiber() |
10:27:45 | cheatfate | it uses undocumented TEB |
10:30:18 | cheatfate | and you know what PEB/TEB structures have not changed from windows 2000 |
10:30:30 | FromGitter | <Varriount> Ugh, fine, I'll be silent. |
10:31:08 | FromGitter | <Varriount> But if things ever do break due to an OS change, I reserve the right to say "I told you so" |
10:31:58 | rokups | will remind you of that in 10 years if we both are still around here :) |
10:33:01 | cheatfate | Varriount the only way when microsoft breaking something undocumented it always tries to document it properly, also if TEB/PEB will be changed this information will appears in net just because AV authors reveal it while testing technical preview windows versions |
10:34:13 | rokups | i should mention we do not even access TEB or PEB, but a struct returned by fiber api as raw pointer. thats pretty old feature, idk what they should do to break struct layout |
10:35:03 | dom96 | Varriount: This channel is logged for precisely these moments, save this link somewhere https://irclogs.nim-lang.org/11-02-2017.html#10:31:08 :) |
10:36:01 | FromGitter | <Varriount> Rokups: Changing the alignment of structures? Turning packing on? |
10:36:26 | FromGitter | <Varriount> What about different architectures? Wouldn't alignment be different on them? |
10:36:30 | rokups | now that would be a backwards compatibility disaster for an OS |
10:37:18 | rokups | struct is defined in nim, not like we use raw offsets. it would likely work on arm as well |
10:39:01 | rokups | still if anyone can come up with a way to obtain prcisely both stack ends without using that stuff then it would indeed be a proper solution. idk how to do that though |
10:42:27 | FromGitter | <Varriount> rokups: What do you mean by stack end - the end of all the data located by the current call stack? |
10:42:45 | * | Vladar joined #nim |
10:43:29 | FromGitter | <Varriount> Would it be ok for the calculated end to be greater than the actual end? |
10:44:07 | * | yglukhov joined #nim |
10:44:18 | rokups | suppose we got char stack[0x1000]; upon start of coroutine SP is set to somewhere at stack[0xFD0] or so. we need to know &stack[0] so gc does not scan past it |
10:44:54 | rokups | SP + 0x1000 would indeed go past it. i would say it is unsafe |
10:45:06 | rokups | SP - 0x1000 that is |
10:47:10 | FromGitter | <Varriount> So how does Windows calculate/know the end of the stack, if it's always changing? |
10:48:34 | rokups | CreateFiberEx API allocates stack, thats how its known. there is nothing to calculate as exact stack ends are stored in that struct. |
10:51:11 | * | Sembei joined #nim |
10:51:19 | FromGitter | <Varriount> rokups: Ah, so the start and end of the entire region of stack memory (even that which isn't being used) is needed, not just the memory that's being actively used? |
10:52:34 | rokups | well im tracking it all for reasons i dont recall now |
10:53:10 | * | Pisuke quit (Ping timeout: 258 seconds) |
10:53:29 | rokups | hmm, but now you got me thinking |
10:53:31 | FromGitter | <Varriount> Because the scanning GC doesn't need the entire region, just the part that is being actively used |
10:54:18 | rokups | maybe it indeed would be enough to do &var at coroutine start and scan region between that and current stack top |
10:55:15 | * | jh32 joined #nim |
10:56:32 | FromGitter | <Varriount> rokups: That's what confused me. You don't want to scan unused memory, as it contains stale values |
10:56:57 | * | yglukhov quit (Remote host closed the connection) |
10:57:11 | rokups | yes. well i have no schooling on gc stuff so.. ^_^ |
10:57:26 | rokups | and tbh that gc handling for coroutines is broken anyway. it needs to be redone |
10:57:45 | rokups | still cant bootstrap with coroutines enabled due to crash. something is certainly wrong there |
10:58:15 | FromGitter | <Varriount> On a related note, I wonder if large c/c++ programs have run into stack overflow issues with normal call stacks. |
10:59:14 | rokups | never seen such cases as long as its not recursion gone wild (which is a bug really) |
11:02:54 | rokups | Varriount i read some stuff hinting that at least glibc handles running out of stack as well by allocating more. no idea how that is happening though |
11:03:43 | * | nsf quit (Quit: WeeChat 1.7) |
11:14:11 | FromGitter | <Varriount> rokups: I know that on Windows, not ask stable memory reserved is actually allocated |
11:14:31 | FromGitter | <Varriount> *all stack |
11:15:11 | rokups | hmm sounds familiar. CreateFiberEx() allows specifying reserved stack size and commited stack size separately |
11:15:31 | FromGitter | <Varriount> Yes. |
11:54:50 | * | yglukhov joined #nim |
12:02:21 | * | Snircle joined #nim |
12:04:56 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
12:09:20 | * | filcuc joined #nim |
12:18:15 | * | vlad1777d joined #nim |
12:22:41 | * | vlad1777d quit (Remote host closed the connection) |
12:25:12 | * | vlad1777d joined #nim |
12:26:45 | * | yglukhov quit (Remote host closed the connection) |
12:28:15 | * | yglukhov joined #nim |
12:29:10 | FromGitter | <gyermolenko> "Nim enters the TIOBE index at position 129 this month." |
12:30:30 | * | yglukhov quit (Remote host closed the connection) |
12:42:08 | * | yglukhov joined #nim |
12:42:32 | dom96 | oooh |
12:44:03 | * | MyMind joined #nim |
12:44:08 | dom96 | Pity that it's not even in the top 100 :\ |
12:45:14 | * | Sembei quit (Ping timeout: 240 seconds) |
12:45:41 | federico3 | :( |
12:45:59 | dom96 | I do find it odd that the other new entry (Ring) is 104th |
12:47:31 | dom96 | but meh, this index likely isn't very accurate. |
12:48:38 | * | Trustable quit (Remote host closed the connection) |
12:48:52 | * | yglukhov quit (Remote host closed the connection) |
12:49:33 | * | Trustable joined #nim |
12:52:25 | * | carterza joined #nim |
12:53:27 | dom96 | yay, streamed downloads now work :D |
12:53:39 | * | Trustable quit (Remote host closed the connection) |
12:56:46 | * | Trustable joined #nim |
12:57:40 | * | nsf joined #nim |
13:02:58 | filcuc | is there a nimsuggest documentation? |
13:03:20 | * | elrood joined #nim |
13:03:31 | dom96 | https://nim-lang.org/docs/nimsuggest.html |
13:03:32 | FromGitter | <zacharycarter> @Varriount you around? |
13:03:58 | FromGitter | <Varriount> @zacharycarter Yep! |
13:04:02 | FromGitter | <zacharycarter> oh sweet! |
13:04:06 | FromGitter | <zacharycarter> got some new stuff to show you - one sec |
13:04:36 | FromGitter | <zacharycarter> well first of all, I wrapped - https://github.com/jarikomppa/soloud last night |
13:04:44 | FromGitter | <zacharycarter> and got it working with my engine |
13:05:41 | filcuc | dom96: thank you |
13:06:07 | FromGitter | <zacharycarter> starting on 3d - http://imgur.com/a/61Wip |
13:06:18 | FromGitter | <zacharycarter> and I got sprite animations working, along with resizing widgets |
13:06:26 | FromGitter | <zacharycarter> with scrollbars |
13:07:40 | FromGitter | <Varriount> @zacharycarter Oh cool! The sound library looks prefect |
13:07:47 | FromGitter | <Varriount> *perfect |
13:08:07 | FromGitter | <Varriount> Really hits that sweet spot |
13:08:44 | filcuc | maybe someone here already played with nimsuggest..but how do i know that the stream is complete for a request? |
13:08:59 | filcuc | suppose i sent through the socket "sug etc...." |
13:09:18 | FromGitter | <zacharycarter> mmhmm |
13:09:20 | filcuc | on the socker i will receive 0 or N lines |
13:09:24 | filcuc | socket |
13:09:32 | FromGitter | <Varriount> fulcuc: If I recall correctly, it's newline terminated |
13:10:33 | filcuc | varriount maybe i'm doing something wrong here, but with my QSocket API if i so m_socket.readLine() i get only on line of sug |
13:10:49 | filcuc | if do the same with the plain NimSuggest from a console i obtain multiple lines |
13:11:06 | filcuc | :| |
13:11:54 | filcuc | in other words: is the whole reply a single line? |
13:11:56 | FromGitter | <Varriount> filcuc: But isn't there a "blank" line that signals end of output? |
13:12:29 | filcuc | where whole reply is made of multiple "sug ....."? |
13:12:36 | FromGitter | <Varriount> I didn't design the protocol. If I had, we would have length-prefixed binary output. |
13:13:15 | filcuc | i agree...or at least with an echo mode (like serial protocol) |
13:13:26 | filcuc | so i can read until i see my command |
13:15:01 | FromGitter | <Varriount> filcuc: The original protocol just cut the connection/exited the process after the suggestion. Let me see what it does now. |
13:16:32 | dom96 | filcuc: you're comparing apples to oranges |
13:16:44 | dom96 | if you readLine from a terminal fd then you will also only get a single line |
13:16:55 | dom96 | Your terminal prints all of them automatically |
13:17:04 | FromGitter | <Varriount> https://github.com/nim-lang/Nim/blob/devel/tools/nimsuggest/nimsuggest.nim#L296 |
13:18:01 | FromGitter | <Varriount> Adds \c\L then closes the connection |
13:18:24 | filcuc | do you mean that i can make only one request to a NimSuggest process? |
13:19:18 | FromGitter | <Varriount> No, you can only make one request per connection |
13:19:21 | filcuc | so one request through the socket and then it dies. Correct? |
13:19:31 | filcuc | Varriount ok |
13:19:32 | FromGitter | <Varriount> Yes. |
13:19:56 | filcuc | So basically one request and then he close the socket |
13:20:02 | filcuc | closes |
13:20:05 | FromGitter | <Varriount> Yes. |
13:20:23 | FromGitter | <Varriount> Have fun opening a socket on every keystroke |
13:20:25 | dom96 | I guess you need to reconnect for each request |
13:22:15 | filcuc | maybe is should just use stdin |
13:22:19 | filcuc | and no sockets |
13:22:48 | filcuc | and connect to the process streams |
13:23:09 | filcuc | in this way i shouldn't need connect/disconnect the sockets |
13:23:09 | FromGitter | <Varriount> Filcuc: I hope you can do threads... |
13:23:54 | filcuc | :| or another option is to keep a pool of connections |
13:23:58 | FromGitter | <Varriount> Or are targeting *nix only |
13:24:20 | Araq | filcuc: use the EPC protocol then, that has lengths |
13:24:29 | Araq | and is what VS Plugin uses too |
13:25:09 | * | yglukhov joined #nim |
13:25:53 | FromGitter | <Varriount> Araq: How does the VS plugin handle dirty files? |
13:26:12 | Araq | it uses them? |
13:26:26 | Araq | I dunno what to answer, it uses /tmp |
13:26:48 | FromGitter | <Varriount> I mean, if you want suggestions on every keystroke, doesn't that necessitate saving every keystroke? |
13:27:00 | filcuc | Araq: ok, now it's a compromise of getting the thing done or not..how complex is this epc protocol? |
13:27:29 | filcuc | otherwise i think that i should just use a pool of connections |
13:28:44 | Jipok[m] | filcuc: You can also rewrite nimsuggest to fit your needs. There's not a lot of code |
13:28:51 | Jipok[m] | https://github.com/nim-lang/Nim/blob/devel/tools/nimsuggest/nimsuggest.nim |
13:30:24 | * | yglukhov quit (Ping timeout: 276 seconds) |
13:31:00 | filcuc | Jipok[m]: thanks for the link...maybe yes, i could..but i hoped to not have to |
13:31:39 | filcuc | i reality i just wanted to know what is the correct way to integrate it and use it |
13:31:57 | Araq | epc is pretty simple |
13:32:15 | Araq | 16 bit length followed by a Lisp ((tree thingie)) |
13:33:30 | Araq | er no, 6 byte ascii hex number as the length |
13:36:17 | filcuc | ok |
13:36:17 | Jipok[m] | Araq: what's about my problem? |
13:36:20 | Jipok[m] | http://pastebin.com/Z2YhZWHn |
13:36:47 | Araq | Jipok[m]: you need to use my fork of libui |
13:36:53 | rokups | Araq: should gc scan stacks of all coroutines in markStackAndRegisters() or should it scan only current active stack? |
13:37:26 | Araq | it needs to scan all stacks |
13:37:35 | rokups | my guess is maybe active stack is enough provided i put explicit gc collect when coroutine exits? |
13:37:40 | * | yglukhov joined #nim |
13:38:00 | rokups | they all would get scanned anyway. what do you think about that? |
13:39:16 | Jipok[m] | Araq: I use your fork |
13:39:16 | Jipok[m] | I therefore use your fork |
13:39:35 | Jipok[m] | https://github.com/nim-lang/ui |
13:43:01 | Jipok[m] | 0_o |
13:43:02 | Jipok[m] | i wrote this once |
13:43:42 | Jipok[m] | matrix sometimes works wonders |
13:53:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:08:33 | * | yglukhov quit (Remote host closed the connection) |
14:19:31 | Araq | Jipok[m]: my fork is https://github.com/araq/libui |
14:19:50 | Araq | rokups: that doesn't work |
14:20:00 | rokups | why? |
14:20:08 | rokups | (just want to understand) |
14:20:19 | Araq | GCs are far more complex than that and any incremental steps need to be proven correct |
14:20:57 | Araq | if you scan partial heaps, you need some write barrier to ensure correctness |
14:21:15 | Araq | I cannot even explain it here in simple terms. |
14:22:33 | rokups | alright then, ill take your word for it ^_^ by the way i fixed that bug which prevented ./koch boot -d:nimCoroutines, but do not ask how |
14:22:51 | Araq | how? |
14:23:17 | rokups | no idea. one thing is clear that this coroutine gc stuff from last year was broken. i reworked that and now it works ;) |
14:23:33 | Araq | ok, good enough. I hope. |
14:23:34 | Araq | bbl |
14:24:17 | rokups | we will see, at least gcbench.nim works, crashed before rework |
14:24:30 | rokups | something funky going on with my file system, will do more tests when i sort it out |
14:34:47 | * | ibk joined #nim |
14:37:49 | Jipok[m] | Araq: I think it is necessary to add the information at github: libui should be placed in ~/.nimble/pkgs |
14:38:06 | Jipok[m] | it's not obvious |
14:40:35 | Jipok[m] | I could understand this only when I saw it |
14:40:36 | Jipok[m] | https://github.com/nim-lang/ui/blob/master/ui/rawui.nim#L39 |
14:47:00 | * | yglukhov joined #nim |
14:55:23 | * | gangstacat joined #nim |
14:56:47 | * | yglukhov quit (Remote host closed the connection) |
14:57:49 | * | Jesin quit (Ping timeout: 240 seconds) |
15:00:02 | * | yglukhov joined #nim |
15:02:50 | * | elrood quit (Quit: Leaving) |
15:04:19 | * | yglukhov quit (Remote host closed the connection) |
15:05:15 | filcuc | thank you all, cya |
15:05:33 | * | filcuc quit (Quit: Konversation terminated!) |
15:13:30 | * | cjbest joined #nim |
15:14:32 | * | gokr joined #nim |
15:21:57 | * | yglukhov joined #nim |
15:30:47 | * | Jesin joined #nim |
15:39:07 | * | cjbest quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:41:15 | * | nsf quit (Quit: WeeChat 1.7) |
15:45:50 | * | cjbest joined #nim |
15:46:27 | * | Jesin quit (Quit: Leaving) |
15:48:35 | * | Jesin joined #nim |
15:50:06 | * | Jesin quit (Max SendQ exceeded) |
15:50:31 | * | Jesin joined #nim |
15:53:55 | * | yglukhov quit (Remote host closed the connection) |
16:02:46 | * | bjz joined #nim |
16:02:55 | * | tankfeeder quit (Quit: Leaving) |
16:06:00 | * | cjbest quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:06:14 | * | gokr quit (Ping timeout: 240 seconds) |
16:07:21 | * | yglukhov joined #nim |
16:08:13 | * | krux02 joined #nim |
16:12:19 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
16:14:39 | dom96 | So me and Araq are discussing https://github.com/nim-lang/Nim/pull/5373 |
16:15:15 | dom96 | Araq suggested aliasing the streams 'write' proc to 'add' |
16:15:47 | dom96 | But I like the semantic distinction between 'add' and 'write' to be: add never blocks and write may block. |
16:16:16 | dom96 | The FutureStreams I implemented in that PR currently use 'put' for this 'write' operation |
16:16:30 | dom96 | But for the sake of consistency with the streams module I will rename it to 'write; |
16:17:15 | * | carterza quit (Quit: carterza) |
16:17:32 | dom96 | This consistency makes working with synchronous (streams in the streams module) and asynchronous streams (FutureStream) much easier. |
16:18:06 | euantor | I like write, makes sense. |
16:18:13 | dom96 | (For example, the following 'when' block could be removed: https://github.com/nim-lang/Nim/pull/5373/files#diff-232b8586e82bf9dedf2b071ec6fd52aaR891) |
16:18:35 | dom96 | (The multisync macro takes care of the difference between 'await' and no 'await' for sync IO) |
16:18:59 | dom96 | euantor: Great :) |
16:19:37 | dom96 | It's tough to design things like this so for anyone interested in this please take a look at the PR and let me know what you think. |
16:20:26 | dom96 | I'm still unsure about FutureStream[T], it's not an interface like the Stream type and I wonder whether it should be. |
16:21:51 | dom96 | In the meantime, the PR implements an efficient synchronous and asynchronous downloadFile so I can move on with choosenim :) |
16:22:16 | euantor | I've not looked at it, hadn't even realised there was a PR for it already. Would be great to have it in though |
16:22:31 | euantor | Perhaps the reason I like read/write is https://msdn.microsoft.com/en-us/library/system.io.stream.write(v=vs.110).aspx |
16:22:55 | euantor | .net's Stream type is used heavily and is quite well implemented |
16:23:20 | euantor | (though it lacks a method to read up until a given delimiter, which I always end up implementing as an extension method) |
16:36:27 | * | carterza joined #nim |
16:37:16 | * | yglukhov quit (Remote host closed the connection) |
16:37:18 | Araq | I'll say it again here, IMO Nim should move to use somewhat more operator |
16:37:21 | Araq | s |
16:37:47 | Araq | $, len, &= (for add/push/write/sink), and for reading I suggest ^ |
16:38:02 | Araq | so that would be 4 highly generic common operations |
16:38:14 | dom96 | and I'll say what I said again: What I like about Nim is its avoidance of operators. |
16:38:23 | dom96 | and I continue to use 'add' instead of &= |
16:38:32 | dom96 | and inc instead of += |
16:38:41 | Araq | put it in the tutorial and enjoy a "don't make me think" language |
16:39:09 | dom96 | programmers shouldn't be zombies |
16:39:10 | demi- | dom96: agreed |
16:39:37 | Araq | 'add' and 'read' are more common than + and - in some domains |
16:39:58 | Araq | it's tiresome we only have nice operators for things that came from math. |
16:40:32 | Araq | Nim doesn't turn into APL or Perl anytime soon with these carefully chosen constructs. |
16:40:32 | * | yglukhov joined #nim |
16:40:34 | * | carterza quit (Ping timeout: 240 seconds) |
16:41:05 | Araq | but *shrug* I know my opinion is a minority opinion so I won't fight for it. |
16:41:28 | dom96 | In fact, I dislike the `^` for reading and think that Channels should use 'read' instead. |
16:41:46 | Araq | ^ is sexy :P |
16:41:47 | federico3 | *shudders* perl |
16:41:59 | dom96 | No, it's not. |
16:42:26 | Araq | federico3: I said it *doesn't* turn into perl :P |
16:42:50 | federico3 | Araq: I saw that. I just wrote "*shudders* perl" |
16:44:41 | * | yglukhov quit (Ping timeout: 240 seconds) |
16:55:21 | FromGitter | <andreaferretti> @dom96 I just noticed you (perhaps without noticing) work around https://github.com/nim-lang/nimble/issues/305 too |
16:55:29 | FromGitter | <andreaferretti> here https://github.com/nim-lang/nimble/blob/master/nimble.nimble#L34 |
16:56:08 | FromGitter | <andreaferretti> if you changed that line to `setCommand "c", "tester.nim"` |
16:56:35 | FromGitter | <andreaferretti> you would get all tests result together |
16:56:52 | dom96 | huh |
16:56:56 | dom96 | What did I work around? |
16:57:05 | FromGitter | <andreaferretti> well, the main issue I have |
16:57:16 | FromGitter | <andreaferretti> is that whenever I write a task to run tests |
16:57:25 | FromGitter | <andreaferretti> using `setCommand` |
16:57:34 | FromGitter | <andreaferretti> all the output comes together at the end |
16:57:46 | FromGitter | <andreaferretti> here you are lucky that tester has no deps |
16:57:52 | FromGitter | <andreaferretti> so you can just run nim |
16:58:13 | FromGitter | <andreaferretti> if there was some dependency, you would be forced to use `setCommand` |
16:58:21 | FromGitter | <andreaferretti> so that nimble handles the deps paths |
16:58:39 | FromGitter | <andreaferretti> and then you would have the same problem I have on all my libraries |
16:58:55 | dom96 | and why can't you just write 'exec 'nimble c tester.nim''? |
16:59:13 | FromGitter | <andreaferretti> because nimble buffers all output! :-D |
16:59:58 | FromGitter | <andreaferretti> I can write it like that, but in any case I have to wait until all tests run |
17:00:10 | FromGitter | <andreaferretti> and then get a dump of all results |
17:00:59 | dom96 | I see. |
17:01:17 | dom96 | The correct fix is to show live output in the right situations. |
17:01:42 | FromGitter | <andreaferretti> I think so |
17:01:47 | dom96 | So in this case whenever the 'c' subcommand is passed to Nimble |
17:02:08 | FromGitter | <andreaferretti> yup |
17:05:07 | shashlick | how do I pass a string as a reference to a proc and then use it in the proc? |
17:05:35 | shashlick | proc name(str: ref string) |
17:06:18 | shashlick | reason being it is a very large string so trying to avoid making a copy |
17:15:04 | FromGitter | <Varriount> dom96: Regarding your PR, what are future streams? |
17:15:43 | federico3 | what's tester.nim? |
17:16:07 | FromGitter | <Varriount> shashlick: passing arguments never copies them, unless you use special pragmas |
17:16:25 | dom96 | federico3: a script that runs tests. |
17:16:32 | FromGitter | <Varriount> Strings and sequences only copy on assignment operations |
17:16:53 | shashlick | Varriount: excellent, thanks |
17:16:56 | * | yglukhov joined #nim |
17:16:58 | federico3 | is it published somewhere? |
17:17:18 | dom96 | federico3: it's program-specific. Take a look inside it. |
17:17:28 | federico3 | I'm writing something similar |
17:17:59 | FromGitter | <Varriount> federico3: What is published? |
17:18:08 | dom96 | Varriount: A way to send/receive multiple pieces of data over-time asynchronously. |
17:18:46 | dom96 | or perhaps a better explanation: they allow you to react to data immediately, before all of it is received. |
17:19:01 | dom96 | In the case of the httpclient: let's say you're downloading a 100MB file. |
17:19:10 | dom96 | You don't want to wait until the 100MB is downloaded before you save it to disk |
17:19:15 | dom96 | You want to save the data as it's coming in |
17:19:22 | dom96 | The FutureStream allows you to do that |
17:27:12 | * | yglukhov quit (Remote host closed the connection) |
17:27:34 | dom96 | does that make sense? |
17:37:42 | * | cjbest joined #nim |
17:39:38 | FromGitter | <Varriount> Yep. |
17:43:03 | FromGitter | <Varriount> dom96: So what kind of input do you want exactly? The PR doesn't outline any concerns. |
17:43:38 | shashlick | is it possible to unload a module while running? I'm trying to stop accessing a DLL the module is using |
17:44:00 | * | cjbest quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:44:04 | dom96 | Varriount: Whether the API for it looks good. |
17:44:17 | dom96 | And anything else that you might see wrong with it :) |
17:45:28 | dom96 | shashlick: afraid not |
17:47:44 | shashlick | I see unloadLib() which could work but since the DLL is loaded with dynlib in the module, I don't have the handle |
17:49:12 | shashlick | not by loadLib() that is, but {.cdecl, dynlib: libname, importc: "function".} |
17:49:20 | * | cjbest joined #nim |
17:50:07 | dom96 | You would need to load it manually to use that. |
17:50:21 | dom96 | You could do that but it would be a bit painful |
17:50:44 | dom96 | You could probably write a nice pragma macro to make it nicer though |
17:50:57 | dom96 | That might be a nice addition to Nim actually |
17:51:23 | * | dom96 still hopes I can load openssl on-demand |
17:51:28 | dom96 | *hopes he |
17:55:19 | shashlick | dom96: so if I loadLib() before the module import, it would reuse the handle I have? doesn't sound like it would be that simple... |
17:55:30 | dom96 | nope |
17:56:04 | dom96 | You would have to mess with pointer casts to procs |
17:56:08 | dom96 | and stuff like that |
17:56:19 | shashlick | seems beyond my understanding at this point :/ |
17:56:27 | dom96 | Why do you want to unload a module? |
17:57:46 | shashlick | well, so I want to distribute a single EXE app and am using libcurl, so am carrying it within the EXE and writing it out on startup |
17:57:55 | shashlick | just curious if i could clean up on exit |
17:59:26 | shashlick | so much easier just to use curl.exe at this point and throw it in TEMP |
17:59:29 | * | chemist69 quit (Ping timeout: 240 seconds) |
18:00:20 | * | ofd joined #nim |
18:04:08 | * | chemist69 joined #nim |
18:08:27 | * | gokr joined #nim |
18:09:39 | dom96 | shashlick: you're embedding the dll inside the .exe and then writing it beside the .exe? |
18:10:57 | shashlick | yep |
18:11:14 | shashlick | works fine, i was just venturing into cleanup and that doesn't work since it's in use |
18:13:52 | dom96 | wouldn't it be better to statically link libcurl? |
18:17:47 | * | gangstacat quit (Ping timeout: 255 seconds) |
18:19:19 | * | gokr quit (Ping timeout: 256 seconds) |
18:23:04 | shashlick | ya for that I'd need to find a static build of libcurl for windows, no patience to build it myself |
18:23:51 | shashlick | and the libcurl website doesn't have .lib files, just .dll |
18:24:34 | dom96 | true :\ |
18:25:29 | dom96 | Doesn't the DLL get loaded at the start of your program though? |
18:25:46 | dom96 | How are you able to write the DLL to disk before that happens? |
18:27:30 | shashlick | I do the import after I write it out and wait long enough for it to hit the disk |
18:27:41 | * | yglukhov joined #nim |
18:27:45 | shashlick | doesn't seem to mind :) |
18:31:03 | dom96 | Cool. Wouldn't have expected that to work :) |
18:32:21 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:34:34 | shashlick | would have preferred the lib since it is smaller, but i've already written the code to run curl.exe so I can get around to that some day |
18:37:00 | * | cjbest quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:46:07 | * | ibk quit (Quit: Connection closed for inactivity) |
18:49:29 | Araq | shashlick: can't you compile curl with visual studio or mingw to build a DLL/static lib? |
18:50:40 | shashlick | i might eventually, just want to stick to learning Nim right now rather than bridging off into libcurl on mingw headaches |
18:51:10 | shashlick | right now, am trying out the spawn statement and getting Error: 'spawn' takes a GC safe call expression |
18:56:24 | Araq | spawn foo(a, b, c) # error |
18:56:42 | Araq | proc foo(...) {.gcsafe.} = ... # annotate with .gcsafe |
18:56:55 | Araq | compiler says "is not .gcsafe because ..." |
19:03:14 | shashlick | how am I confident that it is gcsafe? looking at the proc and underlying code, i'm not writing any global vars or vars passed in, am just reading the registry |
19:08:05 | shashlick | I see the gc safety section in the manual, will check it out |
19:08:37 | Araq | shashlick: unfortunately external libs might not be .gcsafe even though they actually are |
19:09:09 | Araq | you can use {.gcsafe.}: offendingLineHere() in your proc to make the compiler shut up then |
19:09:15 | Araq | but that's a last resort |
19:09:30 | Araq | (only available on devel, omg we need to add that to the news...) |
19:14:06 | shashlick | I was worried, but this is great - I added .gcsafe. and build, now compiler tells me exactly what isn't gcsafe in its opinion which is helpful |
19:14:18 | shashlick | it's in the winregistry module |
19:14:55 | shashlick | winregistry.nim(356, 6) Warning: 'queryMaxKeyLength' is not GC-safe as it accesses 'nullWinString' which is a global using GC'ed memory [GcUnsafe2] |
19:17:07 | * | yglukhov joined #nim |
19:20:36 | shashlick | figured it out, will submit a bug report to winregistry - simple fix, each proc can have its own copy of nullWinString |
19:24:10 | Araq | k great |
19:26:34 | shashlick | https://github.com/miere43/nim-registry/issues/4 |
19:29:24 | shashlick | can you share a global read-only (let) string safely somehow? what's the concern with sharing it if it isn't expected to change |
19:29:55 | * | carterza joined #nim |
19:29:58 | * | yglukhov quit (Remote host closed the connection) |
19:34:44 | * | yglukhov joined #nim |
19:36:40 | Araq | shashlick: people can do crazy things, so the compiler is conservative |
19:37:11 | FromGitter | <Varriount> What about a const string? |
19:38:05 | * | Matthias247 quit (Read error: Connection reset by peer) |
19:38:29 | dom96 | hrm, splitFile("foo.tar.gz").ext gives "gz" |
19:38:39 | shashlick | both const and let vars seem excusable, but I don't know enough about concurrency to claim that |
19:38:49 | * | yglukhov quit (Remote host closed the connection) |
19:38:52 | dom96 | shouldn't it be .tar.gz? |
19:39:30 | Araq | no. |
19:41:40 | shashlick | is there a pragma to excuse such global variables? |
19:42:12 | dom96 | ok |
19:42:31 | Araq | http://unix.stackexchange.com/questions/181410/how-to-find-a-file-extension-with-multiple-dots |
19:42:39 | Araq | shashlick: .threadvar ? :P |
19:43:37 | Araq | http://stackoverflow.com/questions/21692444/get-file-extension-with-a-file-that-has-multiple-periods |
19:44:06 | Araq | ^ others agree with nim's stdlib, the extension is actually .gz |
19:45:57 | * | yglukhov joined #nim |
19:46:08 | * | bjz joined #nim |
19:49:10 | shashlick | threadvar won't work for immutable variables since you cannot set the value on init with threadvar, but "let" doesn't like it without a value |
19:50:11 | * | yglukhov quit (Ping timeout: 240 seconds) |
19:54:51 | * | couven92 joined #nim |
19:55:05 | shashlick | I feel an immutable global should be copied across into threads implicitly |
20:01:11 | Araq | that feature is in development but it's surprisingly hard and for your case it seems unnecessary anyway |
20:01:42 | Araq | that package shouldn't require globals for anything. |
20:07:33 | * | chemist69 quit (Ping timeout: 256 seconds) |
20:08:36 | * | chemist69 joined #nim |
20:09:55 | * | ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:11:57 | * | ofd joined #nim |
20:19:22 | shashlick | understood, i've implemented it as a threadvar for now, no issues |
20:27:31 | * | ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:48:10 | * | nsf joined #nim |
20:51:10 | * | carterza quit (Quit: carterza) |
20:51:58 | * | gokr joined #nim |
20:58:22 | * | vlad1777d quit (Remote host closed the connection) |
21:00:51 | * | ofd joined #nim |
21:11:11 | * | bjz quit (Ping timeout: 240 seconds) |
21:12:08 | * | rokups quit (Quit: Connection closed for inactivity) |
21:13:36 | * | bjz joined #nim |
21:24:37 | * | Jesin quit (Ping timeout: 256 seconds) |
21:29:06 | * | Jesin joined #nim |
21:32:13 | * | ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:33:38 | * | Jesin quit (Max SendQ exceeded) |
21:35:31 | * | Jesin joined #nim |
21:38:47 | * | Jesin quit (Max SendQ exceeded) |
21:39:28 | * | Jesin joined #nim |
21:48:03 | * | yglukhov joined #nim |
21:52:06 | * | yglukhov quit (Ping timeout: 240 seconds) |
21:55:59 | * | Vladar quit (Remote host closed the connection) |
22:09:56 | * | bjz quit (Ping timeout: 245 seconds) |
22:10:10 | * | bjz joined #nim |
22:12:41 | * | gangstacat joined #nim |
22:17:02 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:21:23 | * | gokr quit (Ping timeout: 264 seconds) |
22:50:11 | * | ofd joined #nim |
22:50:24 | * | rauss joined #nim |
23:01:15 | * | nsf quit (Quit: WeeChat 1.7) |
23:20:03 | * | vlad1777d joined #nim |
23:25:17 | * | couven92 quit (Read error: Connection reset by peer) |
23:27:22 | * | rektide_ quit (Quit: leaving) |
23:27:49 | * | rektide joined #nim |
23:28:32 | * | ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:28:58 | rauss | I can't really tell if I'm just an idiot or inexperienced, or if I just happened to pick a hard library to try and wrap with c2nim =\. Probably the former |
23:37:46 | * | eizua joined #nim |
23:44:26 | * | Trustable quit (Remote host closed the connection) |
23:45:17 | dom96 | rauss: Don't be so hard on yourself. What's the problem? |
23:46:01 | rauss | dom96: I'm trying to wrap ChakraCore, a JavaScript runtime |
23:46:41 | rauss | dom96: And I just keep coming to issue after issue. Most I can fix, some I have to comment out (or don't know how to fix), and others just elude me completely. |
23:46:44 | dom96 | ooh, awesome. |
23:48:30 | dom96 | What might be better for you is if you just wrap the classes/functions that you know you will need. Wrapping the full library is likely not necessary. |
23:49:05 | dom96 | But of course, feel free to ask questions about any errors you run into here. |
23:49:56 | rauss | That's an interesting thought. |
23:50:25 | dom96 | I guess that you just mainly want to execute some JS using this, right? |
23:50:42 | rauss | Yes |
23:51:01 | dom96 | Surely there is a nice function that does just that in ChakraCore :) |
23:51:32 | rauss | I may well need all of or most of the functions |
23:51:57 | rauss | But you saying that at least gives me another option of "skip it" if I can't fix an issue with something I might not need. |
23:53:07 | rauss | dom96: So at this point I'm passed all of the c2nim errors themselves, but getting nim compilation errors |
23:53:25 | dom96 | Yeah, and you can compile a list of things that you can't get translated. Then somebody here can take a look at it and give you some advice. |
23:53:33 | dom96 | oh, I might be able to help with those |
23:56:05 | dom96 | So feel free to gist the errors so that I can take a look. |
23:57:40 | FromGitter | <rosshadden> dom96: ⏎ Given this c (taken from various places out of context, for simplicity): ⏎ ⏎ ```ChakraCommon.nim(632, 3) Error: redefinition of 'JsValueRef'``` [https://gitter.im/nim-lang/Nim?at=589fa4f321d548df2cf8b457] |
23:58:22 | rauss | dom96: I can gist if that's easier. I switched to gitter for code writing |
23:58:30 | * | ofd joined #nim |
23:58:32 | dom96 | np, that's fine too |