00:01:12 | dom96 | PRs to improve the readme are welcome :) |
00:04:46 | martinium | GOt it |
00:04:58 | martinium | I'm relatively a noob programmer so getting there |
00:08:57 | dom96 | no worries |
00:09:13 | dom96 | Feel free to highlight me if you have other questions |
00:09:23 | martinium | will do |
00:12:38 | dom96 | Although keep in mind that I will be heading to sleep soon |
00:12:59 | martinium | that will be the same for me as well work tomorrow |
00:13:05 | martinium | :P |
00:48:09 | * | chemist69 quit (Ping timeout: 260 seconds) |
00:54:29 | * | chemist69 joined #nim |
01:05:46 | * | aFrigginElf joined #nim |
01:07:45 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:10:15 | * | dddddd quit (Remote host closed the connection) |
01:15:37 | * | bjz joined #nim |
01:16:46 | martinium | Note: You will need to run asynchronous examples in an async proc otherwise you will get an Undeclared identifier: 'await' error. |
01:16:50 | martinium | what do they mean by this? |
01:17:05 | martinium | I am getting this error |
01:17:58 | martinium | what would be an async proc I could run the second example on this page http://nim-lang.org/docs/httpclient.html#getContent,string,string,int,SSLContext,Proxy |
01:28:58 | * | space-wizard joined #nim |
01:36:32 | * | stisa joined #nim |
01:41:27 | * | space-wizard quit (Quit: Textual IRC Client: www.textualapp.com) |
01:41:58 | * | space-wizard joined #nim |
01:48:16 | * | devted quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:51:31 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
02:02:23 | * | aFrigginElf quit (Ping timeout: 258 seconds) |
02:02:23 | * | stisa quit (Read error: Connection reset by peer) |
02:02:31 | * | yglukhov joined #nim |
02:02:49 | * | aFrigginElf joined #nim |
02:06:54 | * | yglukhov quit (Ping timeout: 252 seconds) |
02:10:33 | * | renesac joined #nim |
02:25:50 | FromGitter | <martinium> Currently trying to pretty print a json response. Anyone have any idea how to do that? |
02:32:14 | * | aFriginElf joined #nim |
02:32:40 | FromGitter | <vegansk> @martinium, use http://nim-lang.org/docs/json.html#pretty,JsonNode,int |
02:34:12 | * | aFrigginElf quit (Ping timeout: 258 seconds) |
02:36:19 | FromGitter | <martinium> so I saw that in the docs but my attempts to use it properly have failed |
02:36:29 | * | aFrigginElf joined #nim |
02:36:43 | FromGitter | <martinium> I have a get request for a URL that returns a json object saved to a var called req |
02:36:59 | FromGitter | <martinium> how would I use that pretty procedure on that response variable |
02:37:00 | * | stisa joined #nim |
02:37:21 | FromGitter | <martinium> I was trying pretty(req; indent = 2) but no luck |
02:38:09 | FromGitter | <vegansk> maybe because it's string and first you must ``parseJson`` it? |
02:39:17 | FromGitter | <martinium> when I tried to parseJson on the get method variable it gives me a type mismatch error |
02:39:38 | FromGitter | <vegansk> what's the error message? |
02:39:57 | * | aFriginElf quit (Ping timeout: 258 seconds) |
02:39:58 | FromGitter | <martinium> Error: type mismatch: got (Response) ⏎ but expected one of: ⏎ proc pretty(node: JsonNode; indent = 2): string |
02:40:34 | FromGitter | <martinium> what is JsonNode? do I specifically need to create that object? |
02:41:58 | FromGitter | <vegansk> Something like that: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5861d4f5c895451b7524726c] |
02:42:23 | FromGitter | <martinium> I'll give that a try |
02:45:30 | FromGitter | <vegansk> Btw, why var of type ``Response`` is called ``req``? A little confusing :-) |
02:46:52 | * | martinium quit (Ping timeout: 258 seconds) |
02:52:01 | * | martinium joined #nim |
02:52:22 | FromGitter | <martinium> I was just trying something so I placed the client.getcontent(url) inside of req variable |
02:52:29 | FromGitter | <martinium> so see if it made a difference |
02:52:58 | * | chemist69 quit (Ping timeout: 245 seconds) |
02:57:53 | * | martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
02:58:42 | * | aFriginElf joined #nim |
03:00:42 | * | bjz quit (Ping timeout: 250 seconds) |
03:00:46 | * | bjz_ joined #nim |
03:01:02 | * | aFrigginElf quit (Ping timeout: 258 seconds) |
03:03:22 | * | stisa quit (Read error: Connection reset by peer) |
03:06:29 | * | kulelu88 quit (Quit: Leaving) |
03:06:41 | * | chemist69 joined #nim |
03:10:52 | * | martinium joined #nim |
03:19:24 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:23:39 | * | martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
03:26:16 | * | martinium joined #nim |
03:31:49 | * | bjz_ quit (Ping timeout: 248 seconds) |
03:32:19 | * | bjz joined #nim |
03:37:21 | * | stisa joined #nim |
04:09:39 | FromGitter | <Elezium> Hi folks. I wanted to have a look at something new over the holidays and get a book from Manning (50% off ) but I only have 1 hour to left to buy. Can someone point me to a article with the differences between nim / rust / d? I know this question has been asked probably a zillions time, but I'm kind of limited in time to get the offer. ;) Thanks. |
04:31:14 | FromGitter | <vegansk> @Elezium, nim vs rust http://arthurtw.github.io/2015/01/12/quick-comparison-nim-vs-rust.html |
04:32:45 | FromGitter | <Elezium> Cool. Thanks. And if I may ask, what did bring you to nim? :) |
04:32:55 | * | def-pri-pub joined #nim |
04:36:38 | FromGitter | <martinium> @vegansk your idea actually worked for pretty printing the json. Now I will work on shortening those into hopefully one or two lines |
04:40:32 | * | martinium quit (Quit: Textual IRC Client: www.textualapp.com) |
04:43:53 | * | def-pri-pub quit (Changing host) |
04:43:54 | * | def-pri-pub joined #nim |
04:45:02 | * | def-pri-pub quit (Quit: leaving) |
04:46:38 | * | def-pri-pub joined #nim |
04:50:33 | * | eizua joined #nim |
05:04:28 | * | stisa quit (Ping timeout: 258 seconds) |
05:04:40 | * | yglukhov joined #nim |
05:09:23 | * | yglukhov quit (Ping timeout: 265 seconds) |
05:33:39 | * | stisa joined #nim |
05:44:24 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
06:06:26 | * | s4 joined #nim |
06:33:37 | * | aFrigginElf joined #nim |
06:35:34 | * | bjz joined #nim |
06:37:37 | * | aFriginElf quit (Ping timeout: 258 seconds) |
06:39:41 | * | bjz quit (Client Quit) |
06:42:01 | FromGitter | <vegansk> @Elezium, multi-platform, multi-paradigm, good metaprogramming |
06:42:34 | FromGitter | <vegansk> @martinium, ``req.body.parseJson.pretty``? |
06:43:32 | FromGitter | <Elezium> Reading the tutorial. Somewhat different from what I'm used to. But that's the point of learning. Just curious, how's the debug experience? (I know it's a young language..) |
06:44:54 | * | def-pri-pub quit (Quit: leaving) |
06:48:11 | * | bjz joined #nim |
06:48:41 | * | eizua quit (Quit: Leaving) |
07:02:26 | * | stisa quit (Read error: Connection reset by peer) |
07:07:01 | * | yglukhov joined #nim |
07:11:40 | * | yglukhov quit (Ping timeout: 265 seconds) |
07:40:32 | * | vlad1777d joined #nim |
07:42:45 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:01:27 | FromGitter | <vegansk> (https://files.gitter.im/nim-lang/Nim/AI3S/blob) |
08:01:31 | FromGitter | <vegansk> @Elezium , you can use native debuggers with c/c++ backends: |
08:10:23 | * | aFrigginElf quit (Ping timeout: 258 seconds) |
08:13:42 | * | rokups joined #nim |
08:42:28 | * | zaquest quit (Quit: Leaving) |
08:53:39 | * | Arrrr joined #nim |
09:18:20 | FromGitter | <vegansk> @dom96 , hi! Can you tell me please about this exception in asyncdispatch.nim (https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L261), what's the reason for throwing it? For example, posix version of ``poll`` just ignores that there is nothing to do. And that's the reason why our internal project works on linux and fails on windows, there is nothing to dispatch on start |
09:21:37 | FromGitter | <vegansk> PS: it was added in commit 192e11e7b72470e27bc6bccf1fedbfefc9c4ebd8 |
09:23:46 | Araq | hi vegansk |
09:24:23 | FromGitter | <vegansk> @Araq, hi! |
09:33:03 | FromGitter | <vegansk> @dom96, without these lines, the app works normaly on windows. |
09:36:49 | * | Trustable joined #nim |
09:40:18 | * | yglukhov joined #nim |
09:41:07 | * | yglukhov_ joined #nim |
09:44:53 | * | yglukhov quit (Ping timeout: 265 seconds) |
09:53:21 | * | yglukhov_ quit (Remote host closed the connection) |
10:06:02 | * | bjz_ joined #nim |
10:06:43 | * | bjz quit (Ping timeout: 245 seconds) |
10:08:57 | * | yglukhov joined #nim |
10:09:44 | * | yglukhov quit (Remote host closed the connection) |
10:15:24 | * | Trustable quit (Remote host closed the connection) |
10:25:09 | * | yglukhov joined #nim |
10:29:50 | * | yglukhov quit (Ping timeout: 265 seconds) |
10:34:09 | * | yglukhov joined #nim |
11:17:29 | dom96 | vegansk: hrm, I suppose it can be removed. Make a PR. |
12:02:12 | * | Snircle joined #nim |
12:19:31 | * | xet7 joined #nim |
12:32:15 | * | Ven joined #nim |
12:34:58 | * | bjz joined #nim |
12:36:36 | * | bjz_ quit (Ping timeout: 250 seconds) |
12:44:06 | * | dmi0 joined #nim |
12:44:20 | dmi0 | |
12:49:06 | * | dmi0 quit (Quit: BitchX: use it, it makes you bulletproof) |
12:52:20 | * | dmi0 joined #nim |
13:04:54 | * | s4 quit (Quit: Konversation terminated!) |
13:07:37 | * | byte512 joined #nim |
13:11:54 | cheatfate_ | vegansk: absence of this exception in posix is dom's mistake.. |
13:12:07 | cheatfate_ | vegansk: it must be present in both versions |
13:12:27 | cheatfate_ | if your app causes this exception, then something wrong with your code... |
13:13:50 | cheatfate_ | there should not be idle calls to `poll()` |
13:13:58 | cheatfate_ | and you trying to perform idle calls |
13:16:57 | * | cheatfate_ is now known as cheatfate |
13:19:29 | dom96 | yeah, I changed my mind. Cheatfate is correct. |
13:21:56 | cheatfate | dom96, i remember you made this changes when `tables.nim` dont have `len` procedure |
13:22:21 | cheatfate | dom96, now it has `len` so it is possible to add this check to posix branch too |
13:31:29 | * | couven92 joined #nim |
13:55:55 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:58:37 | * | yglukhov_ joined #nim |
14:01:54 | * | yglukhov quit (Ping timeout: 256 seconds) |
14:10:21 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:14:31 | * | Snircle joined #nim |
14:23:26 | * | ludocode quit (Ping timeout: 256 seconds) |
14:43:17 | FromGitter | <Elezium> @vegansk Thanks fot the answer. Appreciate. |
15:05:00 | FromGitter | <martinium> @vegansk it actually ended up working as `req.parseJson.pretty` didn’t need to include body. |
15:10:40 | Araq | what does that mean? |
15:10:55 | * | Vladar joined #nim |
15:10:56 | Araq | "there should not be idle calls to poll()"? |
15:11:08 | Araq | can't I call poll whenever I want to? |
15:15:24 | cheatfate | Araq, if there no descriptors registered in system queue, no timers/delayed callbacks registered in asyncdispatch queue, is there any reason to call poll()? you want to waste your cpu cycles? |
15:15:32 | * | azur_kind joined #nim |
15:16:36 | cheatfate | continuous calls to poll() with empty queue just make your program run at 100% cpu usage |
15:16:45 | cheatfate | nothing else |
15:17:47 | Araq | ok, so poll must not be called before any event listener is registered? |
15:18:09 | cheatfate | before any timers/delayed callbacks or event listener is registered |
15:18:44 | Araq | what if I create a thread that will eventually register something? |
15:19:16 | Araq | I think poll on empty datastructure should be a nop |
15:20:06 | cheatfate | poll on empty queue is algorithmic error |
15:21:26 | dom96 | This seems like a Nim bug https://travis-ci.org/nim-lang/nimble#L526 DL |
15:21:27 | dom96 | *D: |
15:24:25 | Araq | dom96: Nim stdlib bug perhaps |
15:24:51 | dom96 | yep |
15:25:16 | Araq | cheatfate: I disagree. while true: poll() # poll returns immediately. is *my* 100% cpu usage bug loop, not the stdlib's |
15:25:54 | Araq | the nature of concurrent programming can lead to poll being called before the registrations happened, I think |
15:30:15 | dom96 | I think that can only happen when you are calling poll on a single dispatcher from multiple threads |
15:30:20 | dom96 | which isn't support right now as far as I knpw |
15:30:22 | dom96 | *know |
15:32:12 | Araq | didn't vegansk report just that? his program works if not for the artificial exception being raised |
15:32:39 | Araq | and multithread support is coming anyway |
15:33:00 | cheatfate | Araq, multithread support is not needed, because it mostly supported only by windows |
15:34:22 | * | Amrykid quit (Changing host) |
15:34:22 | * | Amrykid joined #nim |
15:34:25 | cheatfate | the nature of concurrent programming is to use cpu as more effective as you can |
15:34:40 | cheatfate | but not to waste cpu cycles because of wrong algorithm |
15:35:04 | * | yglukhov_ quit (Remote host closed the connection) |
15:35:43 | cheatfate | linux epoll, freebsd kqueue is threadsafe but it not gives you any performance boost if you will try to use 1 system queue for many threads |
15:36:01 | * | yglukhov joined #nim |
15:38:36 | cheatfate | most effective way is to use 1 dispatcher/system queue per thread, all other variants are wrong... (this is true for everything except windows) |
15:41:35 | cheatfate | also upcoming version has this check for a long time for both windows and posix branches... and nobody complains |
15:42:22 | Araq | cheatfate: ok then. |
15:42:29 | Araq | leave the check in. |
15:43:00 | Araq | yglukhov: can you help me fix the emscripten regression? |
15:43:10 | dom96 | cheatfate is right, this error is typically a sign that you are using asyncdispatch incorrectly. |
15:46:22 | dom96 | ugh, these tests are so irritating. |
15:52:44 | yglukhov | Araq: how can i help? |
15:53:10 | yglukhov | i can revert your commit :D |
15:53:11 | yglukhov | =) |
15:54:23 | Araq | no, the commit is good |
15:54:29 | Araq | the logic is: |
15:55:06 | Araq | what to request from the OS depends on the current heap size, large heaps request bigger sizes |
15:55:35 | Araq | a.nextChunkSize = |
15:55:35 | Araq | if a.currMem < 64 * 1024: PageSize*4 |
15:55:35 | Araq | else: a.nextChunkSize*2 |
15:55:54 | * | nsf quit (Quit: WeeChat 1.6) |
15:56:11 | Araq | result = cast[PBigChunk](osTryAllocPages(a.nextChunkSize)) |
15:56:11 | Araq | if result == nil: |
15:56:11 | Araq | result = cast[PBigChunk](osAllocPages(size)) |
15:56:13 | Araq | a.blockChunkSizeIncrease = true |
15:56:33 | Araq | so if osTryAllocPages fails, we don't increase the chunk size anymore |
15:56:46 | Araq | and use the real requested size instead |
15:57:12 | Araq | question is: can osTryAllocPages fail on emscripten? |
15:57:47 | Araq | and if not, how come we keep requesting more and more anyway? |
15:58:49 | * | Matthias247 joined #nim |
15:58:49 | Araq | proc osTryAllocPages(size: int): pointer = osAllocPages(size) |
15:58:56 | Araq | I see. |
16:01:19 | * | Arrrr quit (Quit: WeeChat 1.5) |
16:02:56 | * | fredrik92 joined #nim |
16:05:25 | * | couven92 quit (Ping timeout: 248 seconds) |
16:15:32 | Araq | yglukhov: well fix osalloc.nim so that emscripten implements osTryAllocPages properly |
16:26:09 | * | fredrik92 quit (Quit: Disconnecting) |
16:31:36 | * | Trustable joined #nim |
16:32:32 | yglukhov | Araq: I don't think we can somehow rely on amescripten's failure to alloc. |
16:33:26 | yglukhov | That would involve patching emscripten at the very least. |
16:33:36 | * | couven92 joined #nim |
16:34:59 | yglukhov | I'm no expert in emscripten internals, but as far as i observed emscripten always doubles its heap size whenever it needs more. Increasing heap size means asking the browser to alloc another arraybuffer and copy existing buffer into the new one. |
16:35:18 | yglukhov | allocating new arraybuffer is browser specific. |
16:35:59 | yglukhov | e.g. 32bit chrome fails with exception on > 1gb |
16:37:19 | yglukhov | and emscripten will just "kill" the process afaict |
16:39:23 | yglukhov | afk 1hour |
16:40:05 | * | yglukhov_ joined #nim |
16:40:10 | * | ludocode_ joined #nim |
16:43:53 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:44:28 | * | yglukhov_ quit (Ping timeout: 250 seconds) |
16:45:50 | * | nsf joined #nim |
17:52:54 | * | space-wizard joined #nim |
18:01:34 | * | kulelu88 joined #nim |
18:02:59 | * | devted joined #nim |
18:03:22 | * | yglukhov joined #nim |
18:07:53 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:07:55 | * | devted quit (Read error: Connection reset by peer) |
18:14:44 | * | nsf quit (Quit: WeeChat 1.6) |
18:47:41 | * | azur_kind quit (Remote host closed the connection) |
18:52:16 | * | azur_kind joined #nim |
19:00:03 | * | devted joined #nim |
19:04:18 | * | fredrik92 joined #nim |
19:06:45 | * | couven92 quit (Ping timeout: 248 seconds) |
19:08:38 | FromGitter | <martinium> what is the proper way to install nimble now |
19:08:51 | FromGitter | <martinium> there are about two different ways that don’t work on macOS |
19:17:58 | Araq | that's an excellent question, I'm patching koch.nim because 'koch nimble' or 'koch tools' is the supposed way to build nimble |
19:18:12 | Araq | it fails with: |
19:18:15 | Araq | nimblepkg/publish.nim(35, 14) Warning: getContent is deprecated [Deprecated] |
19:18:15 | Araq | nimblepkg/publish.nim(39, 53) Error: Error: ambiguous identifier: 'Success' --use TResult.Success or DisplayType.Success |
19:20:48 | FromGitter | <martinium> am trying to help a friend install nimble |
19:20:55 | FromGitter | <martinium> but each method has failed to produce the binary |
19:22:11 | Araq | tried the obvious 'brew install nimble'? |
19:22:23 | FromGitter | <martinium> have not |
19:22:30 | FromGitter | <martinium> is the homebrew the latest? |
19:22:43 | Araq | no, but "latest" fails for me too |
19:22:50 | FromGitter | <martinium> I built mine from source and it worked but not working for him |
19:39:23 | FromGitter | <martinium> Araq: let me know if that koch nimble issue is fixed |
19:39:24 | FromGitter | <martinium> hehe |
19:39:43 | Araq | well I know why it fails |
19:39:44 | FromGitter | <martinium> whenever you get to it etc |
19:39:52 | Araq | just give me 10 minutes |
19:39:52 | FromGitter | <martinium> why does it fail? |
19:39:56 | FromGitter | <martinium> cool beans |
19:49:35 | FromGitter | <dom96> Indeed. Why does it fail? The nimble tests pass. |
19:53:35 | FromGitter | <dom96> Remember, if all else fails, you can always reproduce the steps taken in the .Travis-ci.yml file to get a working binary. |
19:55:16 | Araq | git is a piece of shit, that's why |
19:55:33 | Araq | koch nimble |
19:55:33 | Araq | git --git-dir dist/nimble/.git pull |
19:55:33 | Araq | You are not currently on a branch. |
19:55:54 | Araq | git --git-dir dist/nimble/.git checkout v0.7.8 |
19:55:54 | Araq | error: Your local changes to the following files would be overwritten by checkout: |
19:56:02 | Araq | there are no local changes! |
19:56:22 | * | dmi0 quit (Quit: BitchX: your way, right away) |
19:56:33 | FromGitter | <dom96> Tell me about it. Nimble has to work with git intimately. |
19:56:52 | * | byte512 quit (Ping timeout: 258 seconds) |
19:57:26 | FromGitter | <martinium> Yikes |
19:59:12 | FromGitter | <martinium> going to send him my compiled nimble binary |
19:59:14 | FromGitter | <martinium> it’ll work |
20:00:43 | FromGitter | <martinium> maybe someone can code a better git in Nim to showcase the language |
20:01:31 | Araq | I think it's the old "git --git-dir" bug |
20:03:08 | * | yglukhov joined #nim |
20:07:10 | * | yglukhov quit (Remote host closed the connection) |
20:08:03 | Araq | dom96: latest tagged release doesn't compile |
20:08:07 | Araq | nimblepkg/nimscriptsupport.nim(77, 18) Error: type mismatch: got (PSym) |
20:08:07 | Araq | but expected one of: |
20:08:07 | Araq | proc newCtx(module: PSym; cache: IdentCache): PCtx |
20:08:20 | Araq | because the compiler API changed |
20:08:40 | Araq | so neither git HEAD nor v0.7.8 works |
20:09:13 | FromGitter | <martinium> well I am glad you’re aware of this urgent issue |
20:10:04 | Araq | I liked to use HEAD for these reasons but you said, HEAD is allowed to break stuff |
20:10:27 | Araq | so tag a new release already ffs |
20:11:12 | * | Vladar quit (Quit: Leaving) |
20:13:46 | FromGitter | <martinium> has anyone used mercurial? |
20:13:53 | FromGitter | <martinium> is it better than git or no? |
20:14:02 | FromGitter | <martinium> these types of issues shouldn’t even happen |
20:15:02 | * | dddddd joined #nim |
20:15:25 | FromGitter | <dom96> I'm not home right now. But being rude really isn't helping. |
20:16:22 | FromGitter | <martinium> I wasn’t complaining about you guys I meant that git the program is buggy and can cause these issues and that sucks |
20:16:37 | FromGitter | <martinium> no offense intended |
20:17:23 | Araq | he meant me. |
20:17:48 | Araq | martinium: I'm sure the git people will argue that there is no bug, but I don't understand 'git checkout'. |
20:18:13 | FromGitter | <martinium> k cool |
20:19:24 | FromGitter | <martinium> maybe Araq we should keep a redundant repo on bitbucket via mercurial |
20:19:41 | FromGitter | <martinium> as a backup in the case where git messes something up |
20:19:55 | Araq | well my patch is ready, but as I said, neither HEAD nor v0.7.6 compile |
20:24:20 | FromGitter | <dom96> Sorry @martinium. I didn't mean you. |
20:24:56 | FromGitter | <martinium> @dom96 no worries :p I hadn’t read everything above |
20:25:29 | FromGitter | <dom96> @Araq we'll have to discuss this when I come home. |
20:26:01 | FromGitter | <dom96> I don't know what the solution is yet, but 'tag the release' isn't it. |
20:26:49 | Araq | well 'koch nimble' build latest tagged version |
20:26:59 | Araq | 'koch nimble --latest' builds HEAD |
20:30:37 | Araq | HEAD is not supposed to work all the time, so latest tagged version has to work |
20:30:49 | Araq | what's there to discuss? |
20:31:34 | * | fredrik92 is now known as couven92 |
20:33:25 | * | nsf joined #nim |
20:47:30 | * | vlad1777d quit (Quit: Leaving) |
20:51:34 | * | bjz joined #nim |
21:01:20 | * | yglukhov joined #nim |
21:09:57 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
21:11:01 | * | Trustable quit (Remote host closed the connection) |
21:24:15 | * | Jesin quit (Quit: Leaving) |
21:24:20 | * | brson joined #nim |
21:33:53 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:43:25 | * | azur_kind quit (Remote host closed the connection) |
21:52:40 | yglukhov | Araq: ping |
21:56:21 | * | Pisuke quit (Read error: Connection reset by peer) |
21:57:31 | * | Pisuke joined #nim |
22:01:24 | Araq | yglukhov: does it work? |
22:01:28 | * | bjz joined #nim |
22:01:45 | yglukhov | no |
22:01:53 | Araq | why not? |
22:02:22 | yglukhov | oh wait. you have disabled it. |
22:02:39 | yglukhov | just saw your commit |
22:02:49 | yglukhov | it should work this way. |
22:03:03 | Araq | yeah |
22:03:08 | yglukhov | but i've got some observations which might be of interest |
22:04:11 | Araq | I'm listening |
22:04:32 | yglukhov | there's an option in emscripten ABORTING_MALLOC which is 1 by default. so that malloc failure just aborts. otherwise malloc will return null. |
22:04:43 | yglukhov | mmap uses malloc on emscripten |
22:05:35 | yglukhov | using ABORTING_MALLOC=0 the behavior is as follows |
22:07:13 | yglukhov | since nim asks for more and more ram, emscripten keeps reallocating heap up to 1.2gb (at this point safari mac 64bit process eats 4gb ram). |
22:07:35 | yglukhov | then "out of mem" is printed by nim |
22:07:56 | yglukhov | which further calls exit(1) |
22:09:23 | yglukhov | and thats about it |
22:10:37 | yglukhov | theres a tiny interesting detail which doesnt directly connected to nim, that the game actually starts after exit(1) and seems to operate normally (though i havent played much) |
22:12:14 | yglukhov | anyways, i think its a bad idea to alloc as_much_as_we_can on emscripten, because thats what you're doing, right? |
22:15:45 | Araq | no, that's not what I do, so there are open questions left |
22:15:45 | Araq | I double the memory requests |
22:15:45 | Araq | but these are then split up into smaller chunks internally |
22:16:14 | Araq | but if the limit is 1.2gb your program might reach this, yeah |
22:16:41 | * | bjz quit (Read error: Connection reset by peer) |
22:18:10 | yglukhov | so devel as of now works perfectly. emscripten heap is 32mb, and nim ram is 10mb. |
22:18:50 | Araq | how can 10mb trigger an allocation of 1.2 gb? there is still something fishy going on |
22:19:01 | Araq | maybe my doubling logic is wrong |
22:19:22 | * | Pisuke quit (Max SendQ exceeded) |
22:19:33 | * | devted quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:20:38 | * | Pisuke joined #nim |
22:20:55 | yglukhov | the attempt was to allocate more than 1.2 to be precise. 1.2 was the "os" limit. |
22:22:23 | FromGitter | <martinium> @Araq have the compile issues been fixed and the nimble issue as well? |
22:22:36 | yglukhov | Araq: also 10mb is when things settle down a bit after loading. during loading it might get higher, but no higher than 32mb obviously. |
22:23:01 | Araq | I can push my 'koch.nim' changes, martinium, but dom96 is away |
22:23:43 | Araq | I guess I can hotfix nimble so that HEAD compiles again |
22:27:01 | FromGitter | <martinium> @Araq I am getting a friend into this lang and programs that compiled for me don’t for him |
22:27:10 | FromGitter | <martinium> so I am going to send him my binary |
22:27:17 | FromGitter | <martinium> which was built on a working version |
22:41:58 | * | rokups quit (Quit: Connection closed for inactivity) |
22:44:34 | * | Snircle joined #nim |
23:00:21 | * | FromGitter quit (Remote host closed the connection) |
23:00:21 | * | BlaXpirit quit (Quit: Bye) |
23:00:38 | * | FromGitter joined #nim |
23:00:51 | * | BlaXpirit joined #nim |
23:02:37 | * | bjz joined #nim |
23:03:04 | * | bjz quit (Client Quit) |
23:04:53 | * | bjz joined #nim |
23:05:57 | * | bjz quit (Client Quit) |
23:14:17 | * | Jesin joined #nim |
23:18:11 | * | couven92 quit (Quit: Disconnecting) |
23:24:42 | Araq | martinium: 'koch nimble --latest' now works for me |
23:25:53 | FromGitter | <martinium> I can just use that flag or should I clone latest repo? |
23:26:02 | FromGitter | <martinium> Or better said have hin |
23:26:04 | FromGitter | <martinium> Him* |
23:26:44 | FromGitter | <martinium> A program that compiles for me doesn't compile for him |
23:26:56 | FromGitter | <martinium> He gets a weird open ssl dylib error |
23:27:17 | Araq | you need to clone Nim devel |
23:27:34 | Araq | and do: nim c koch.nim to get a koch that supports --latest |
23:27:55 | FromGitter | <martinium> Ok will have him do that now |
23:33:01 | * | def-pri-pub joined #nim |
23:35:50 | * | devted joined #nim |
23:44:19 | FromGitter | <dom96> An openssl dylib error is a runtime error. |
23:44:37 | FromGitter | <dom96> It means s he's missing openssl :) |
23:48:44 | * | yglukhov quit (Remote host closed the connection) |
23:55:47 | * | vendethiel joined #nim |
23:55:55 | * | vendethiel quit (Client Quit) |