00:07:56 | * | gokr quit (Quit: Leaving.) |
00:35:32 | * | Trioxin joined #nim |
00:35:41 | * | Trioxin2 quit (Read error: Connection reset by peer) |
01:09:39 | * | def-pri-pub quit (Quit: leaving) |
01:27:26 | * | libman joined #nim |
01:38:36 | libman | http://turnoff.us/geek/java20-predictions/ - anyone else like "import whocares"? /class_clown |
01:56:33 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:02:10 | ftsf | hmm something change in devel that makes nim exit with 0 when it fails to compile? |
02:02:15 | ftsf | breaks make |
02:03:12 | ftsf | or maybe it's the choosenim wrapper? |
02:10:42 | * | chemist69 joined #nim |
02:38:25 | ftsf | hmm, parsecfg.writeConfig seems broken in devel too |
02:38:43 | ftsf | writes and empty file and errors with unknown IOError |
02:40:13 | ftsf | tested it works correctly in stable with the same code |
02:55:23 | ftsf | https://github.com/nim-lang/Nim/issues/5816 |
02:58:12 | * | vendethiel quit (Ping timeout: 240 seconds) |
03:01:20 | * | vendethiel joined #nim |
03:45:08 | ftsf | https://github.com/ftsf/nim-webaudio |
04:01:02 | FromGitter | <zacharycarter> nice! |
04:01:31 | FromGitter | <zacharycarter> although ftsf: https://github.com/yglukhov/sound |
04:01:37 | FromGitter | <zacharycarter> not sure if there is any crossover or not |
04:02:01 | ftsf | ooh |
04:02:05 | ftsf | didn't know of that |
04:02:38 | FromGitter | <zacharycarter> I use it in frag |
04:02:49 | ftsf | looks like it does most of what mine does, but does a lot more |
04:03:00 | ftsf | more high level api |
04:03:03 | FromGitter | <zacharycarter> yeah |
04:03:20 | FromGitter | <zacharycarter> I use it in frag |
04:04:23 | FromGitter | <zacharycarter> whoops |
04:49:46 | FromGitter | <zacharycarter> ftsf: is your js backend open source / can I take a look at the code to see how you're doing things? |
04:50:39 | ftsf | ftsf, haven't published the js version yet, but i shall be soon |
04:51:13 | * | BennyElg joined #nim |
04:51:31 | ftsf | currently it's a separate implementation to the c backend, but i'll likely merge most of the code except for the platform specific bits |
04:51:31 | * | BennyElg quit (Remote host closed the connection) |
04:52:56 | FromGitter | <zacharycarter> I'm doing the same thing with frag atm |
04:53:06 | FromGitter | <zacharycarter> I'm going to use pixi.js as the renderer for 2d |
04:53:52 | ftsf | mine's all html5 canvas 2d |
04:56:04 | ftsf | https://github.com/ftsf/nico/blob/js/js/nicojs.nim |
04:56:26 | FromGitter | <zacharycarter> thanks! |
05:21:30 | ftsf | how's frag coming along? |
05:22:51 | FromGitter | <zacharycarter> pretty good! |
05:23:04 | FromGitter | <zacharycarter> I got NanoVG support added yesterday and pretty much fleshed out today |
05:23:17 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/ybHe/Screen-Shot-2017-05-14-at-11.21.15-PM.png) |
05:23:59 | FromGitter | <zacharycarter> hrmm is there any js2nim haha? I'm a bit confused on how to bind to JS |
05:24:10 | ftsf | cool |
05:24:35 | ftsf | https://github.com/ftsf/nim-webaudio/blob/master/webaudio.nim that's all i did to bind to JS |
05:25:07 | ftsf | it's pretty lightweight, just define the procs and types as {.importc/importcpp.} |
05:25:07 | FromGitter | <zacharycarter> thanks! |
05:25:12 | FromGitter | <zacharycarter> gotcha |
05:35:53 | FromGitter | <zacharycarter> hrm I wonder how to dump to console with js, I know with karax it was rather simple |
05:36:35 | ftsf | import jsconsole |
05:36:37 | ftsf | console.log |
05:36:43 | FromGitter | <zacharycarter> thanks |
05:38:37 | FromGitter | <almynic> how can i format echo output in color? I implemented a crude text search engine which should output the match in color |
05:40:47 | ftsf | almynic https://nim-lang.org/docs/terminal.html |
05:53:28 | * | Vladar joined #nim |
05:57:03 | * | ftsf quit (Remote host closed the connection) |
05:58:50 | * | ftsf joined #nim |
06:01:05 | * | chemist69 quit (Ping timeout: 272 seconds) |
06:05:20 | * | chemist69 joined #nim |
06:13:23 | * | vendethiel- joined #nim |
06:14:12 | * | vendethiel quit (Ping timeout: 240 seconds) |
06:17:33 | * | rauss quit (Quit: WeeChat 1.7.1) |
06:23:19 | * | nsf joined #nim |
06:32:01 | * | BennyElg joined #nim |
06:32:02 | * | BennyElg quit (Remote host closed the connection) |
06:32:36 | * | BennyElg joined #nim |
06:44:17 | * | nohusuro joined #nim |
06:56:08 | * | sz0 joined #nim |
06:57:30 | * | gokr joined #nim |
06:59:45 | * | BennyElg quit (Remote host closed the connection) |
07:00:41 | * | BennyElg joined #nim |
07:03:58 | * | Arrrr joined #nim |
07:15:11 | * | m712 quit (Ping timeout: 240 seconds) |
07:16:41 | FromGitter | <zacharycarter> http://imgur.com/a/9ex8b |
07:16:49 | * | m712 joined #nim |
07:18:21 | ftsf | \o/ |
07:20:39 | FromGitter | <zacharycarter> finally getting the hang of wrapping pixi.js |
07:36:57 | ftsf | preparing to publish Vektor2089 finally =) |
07:37:16 | * | libman quit (Quit: Connection closed for inactivity) |
07:37:29 | FromGitter | <zacharycarter> nice! grats ftsf! |
07:38:01 | * | adeohluwa joined #nim |
07:38:39 | FromGitter | <zacharycarter> pixijs is going to work beautifully i think |
07:38:44 | ftsf | mmm nice api? |
07:38:58 | FromGitter | <zacharycarter> very much so and it implements a lot of what I was going to have to implement |
07:39:22 | FromGitter | <zacharycarter> has a stage / scene graph api which kind of clashes with FRAG's thick client but I think that's okay given the fact this is for the web and people are used to that kind of api |
07:39:39 | FromGitter | <zacharycarter> and I could always add a scene graph to frag desktop / mobile |
07:39:40 | ftsf | ahh i see |
07:39:58 | FromGitter | <zacharycarter> but it has async asset loading, texture atlases, shaders, spine integration |
07:39:59 | ftsf | i prefer stuff that doesn't do the scene stuff for me |
07:40:01 | FromGitter | <zacharycarter> all sorts of good stuff |
07:40:04 | ftsf | nice |
07:40:12 | FromGitter | <zacharycarter> this is mostly just like position sprite a here |
07:40:15 | FromGitter | <zacharycarter> if you want to add a child |
07:40:16 | FromGitter | <zacharycarter> you can |
07:40:28 | * | ftsf_ quit (Quit: Leaving) |
07:40:31 | FromGitter | <zacharycarter> but I tend to avoid scene graphs entirely in most of my games |
07:41:01 | ftsf | i guess they're good for big projects, but a pain for small ones |
07:41:12 | FromGitter | <zacharycarter> exactly |
07:41:28 | FromGitter | <zacharycarter> I don't even know if that's always the case |
07:41:53 | FromGitter | <zacharycarter> I think it's just very situational where they're useful |
07:42:01 | FromGitter | <zacharycarter> you have a lot of entities in your game world that influence one another |
07:42:23 | FromGitter | <zacharycarter> and 3d apps of course |
07:43:56 | * | Vladar quit (Remote host closed the connection) |
07:47:15 | * | nsf quit (Quit: WeeChat 1.7.1) |
08:00:14 | * | nsf joined #nim |
08:01:56 | FromGitter | <andreaferretti> I confirm that nim exits with 0 code when failing to compile |
08:02:00 | FromGitter | <andreaferretti> I opened https://github.com/nim-lang/Nim/issues/5817 |
08:02:19 | ftsf | awesome, thanks |
08:08:16 | * | chemist69 quit (Ping timeout: 246 seconds) |
08:09:48 | * | chemist69 joined #nim |
08:32:46 | * | yglukhov joined #nim |
08:41:00 | FromGitter | <yglukhov> @ftsf, @zacharycarter, regarding js bind, have a look at https://github.com/yglukhov/jsbind . Here's an example of its usage in real life: https://github.com/yglukhov/sound/blob/master/sound/private/sound_js.nim |
08:44:10 | * | Vladar joined #nim |
08:53:38 | * | Mat4 joined #nim |
08:57:08 | * | couven92 joined #nim |
08:58:41 | * | Mat4 quit (Quit: Mat4) |
09:11:05 | * | planhths joined #nim |
09:27:42 | m712 | i need to find some place where i can use nimrod so i can learn it |
09:28:31 | ftsf | m712, i started by porting something of mine from another language, good way to learn |
09:28:40 | m712 | irc bot then |
09:28:45 | m712 | lulz |
09:29:40 | m712 | i wrote an irc bot in C, so now i'm gonna rewrite it in Nim with all the metaprogramming shenanigans |
09:29:40 | m712 | how's threading support in nim? |
09:29:51 | ftsf | there are threads |
09:30:06 | m712 | are they easy to use? |
09:30:39 | ftsf | i haven't used the much tbh |
09:30:50 | couven92 | easier than in C! :P Nim has an automatic threadpool iirc |
09:30:51 | m712 | thanks |
09:31:07 | couven92 | go to the manual an look for the spawn keyword |
09:31:17 | couven92 | s/an/and |
09:31:32 | m712 | tom hanks |
09:35:04 | Araq | use .async for your IRC bot, not threads |
09:36:02 | m712 | okay |
09:36:14 | dom96 | andreaferretti: ftsf: can you confirm that it's not choosenim that's messing up the exit code for Nim? |
09:36:27 | FromGitter | <andreaferretti> I can check |
09:36:29 | ftsf | dom96, confirmed |
09:36:33 | ftsf | err actually |
09:37:25 | ftsf | i think it is actually |
09:37:40 | ftsf | i get a 1 when running the bin in toolchains directly |
09:37:43 | m712 | is the nim "secret" shell JIT? |
09:38:06 | m712 | i don't get why importing os works if it is |
09:38:12 | m712 | doesn't work* |
09:39:10 | FromGitter | <andreaferretti> yep, it's choosenim |
09:39:20 | m712 | i can see the main issue is cimport |
09:39:32 | FromGitter | <andreaferretti> with stock nim, the error codes are ok |
09:40:51 | dom96 | Thanks for checking. Should be an easy fix. |
09:41:41 | Araq | good, I was worried about this regression :-) |
09:44:41 | m712 | btw i'm really digging the var.func() stuff |
09:45:06 | m712 | i can do num.inc which is cleaner than inc(num) imo |
09:45:21 | ftsf | m712, yeah it's very nice |
09:45:44 | m712 | also the no parens on the functions |
09:46:02 | m712 | is there a printf in the stdlib? |
09:46:36 | Arrrr | echo ? |
09:46:47 | m712 | echo can do format strings? |
09:46:47 | FromGitter | <andreaferretti> I am trying to add a little improvement to c2nim |
09:46:58 | FromGitter | <andreaferretti> but when I try to compile it I get `.nimble/pkgs/compiler-#head/compiler/idents.nim(15, 21) Error: cannot open 'etcpriv'` |
09:47:04 | Arrrr | You want strutils.`%` |
09:47:17 | FromGitter | <andreaferretti> (using `nimble c c2nim.nim) |
09:47:34 | m712 | something like ("%d" % 5).echo? |
09:48:04 | m712 | can i pass varargs of untyped to `%`? |
09:48:17 | m712 | iirc there was a note on that |
09:48:17 | Arrrr | https://nim-lang.org/docs/strutils.html#%,string,openArray[string] |
09:48:46 | m712 | actually i remember that varargs of untyped are passed literally because otherwise echo wouldn't work |
09:48:48 | ftsf | https://github.com/nim-lang/Nim/issues/5816 any ideas about this? |
09:49:01 | ftsf | what could cause an Unknown IO Error? |
09:50:42 | Araq | andreaferretti: doesn't seem like "compiler-#head" |
09:50:55 | Araq | I nuked etcpriv |
09:51:21 | Araq | ftsf: requires an example program. iirc saving of config has a test case. |
09:51:31 | dom96 | andreaferretti: nimble install compiler@#head |
09:51:50 | ftsf | that example program in the issue causes it |
09:53:31 | FromGitter | <andreaferretti> @Araq @dom96 ok installing again compiler@#head fixed it |
09:53:45 | Arrrr | Tested on my computer, i got the same error |
09:53:57 | FromGitter | <andreaferretti> it seems my nimble packages are a little messed up |
09:54:01 | Araq | ftsf: sorry I misread the issue |
09:54:13 | FromGitter | <andreaferretti> there should be no compiler@#head in the first place |
09:54:22 | FromGitter | <andreaferretti> but I cannot remove it because of c2nim |
09:54:42 | FromGitter | <andreaferretti> even though I have other versions of compiler in the nimble packages, recent enough for c2nim |
09:54:46 | FromGitter | <andreaferretti> :-/ |
09:55:09 | dom96 | ahh yeah, sounds like a bug. |
09:56:02 | Arrrr | Maybe is because of this https://github.com/nim-lang/Nim/blob/devel/lib/pure/parsecfg.nim#L542 |
09:56:25 | Arrrr | Recently parsecfg was updated and now throws exceptions for stupid things |
09:56:30 | Arrrr | Before it was more permissive |
09:58:53 | ftsf | hmm opens file and filestream for the same filename |
09:59:00 | dom96 | andreaferretti: please report it |
09:59:07 | ftsf | should probably be passing file instead of filename ot the newFileStream |
10:05:28 | Araq | Arrrr, ftsf yeah that's a stupid typo |
10:06:29 | couven92 | what type gets assigned to the literal `42.42`? float32 or float64. The manual doesn't say |
10:06:43 | Araq | float |
10:07:24 | couven92 | which is the architecturally sized floating-point type? i.e. float32 on x86 and float64 on x64? |
10:07:39 | Araq | no it's always float64 |
10:07:44 | couven92 | ah |
10:09:26 | couven92 | so like a C floating-point literal then... okay... I'd say that we want that covered under [Numerical constants](https://nim-lang.org/docs/manual.html#lexical-analysis-numerical-constants) in the manual? |
10:12:10 | Araq | "There exists a literal for each numerical type that is defined. The suffix starting with an apostrophe (''') is called a type suffix. Literals without a type suffix are of the type int, unless the literal contains a dot or E|e in which case it is of type float." |
10:12:47 | couven92 | Yeah, sorry, I appearently suffer from accute illeteracy |
10:22:02 | * | vlad1777d joined #nim |
10:30:44 | m712 | core.nim(3, 13) Error: invalid type: 'typed' in this context: 'proc (fmt: string, args: varargs[typed])' |
10:30:47 | m712 | ????? |
10:32:32 | m712 | http://termbin.com/pe72 |
10:35:20 | m712 | nevermind |
10:46:55 | m712 | is importing a module relative to the module's current path or the main module that's being compiled? |
10:59:40 | Arrrr | Relative to current path and whatever you set to path https://nim-lang.org/docs/nimc.html#compiler-usage-search-path-handling |
11:02:22 | * | Snircle joined #nim |
11:03:02 | m712 | so if i compile main.nim, which includes utils.logger, i should include utils.core in utils.logger? or just core? |
11:03:11 | * | sz0 quit (Quit: Connection closed for inactivity) |
11:04:54 | * | PMunch joined #nim |
11:05:52 | * | Tiberium joined #nim |
11:16:00 | Arrrr | wut |
11:24:46 | * | arnetheduck joined #nim |
11:27:03 | Trioxin | thinking about making a program to convert php to nim. would probably save me a lot of tmie |
11:28:41 | * | bjz joined #nim |
11:34:46 | * | BennyElg_ joined #nim |
11:34:46 | * | BennyElg quit (Read error: Connection reset by peer) |
11:39:35 | * | Trioxin quit (Ping timeout: 268 seconds) |
11:47:48 | m712 | can you concat string literals like in C or python? |
11:48:00 | couven92 | m712, & operator |
11:48:04 | m712 | thanks |
11:48:15 | couven92 | "My " & "string" -> "My string" |
11:51:15 | m712 | works with literals or string vars too? |
11:51:22 | couven92 | both |
11:51:29 | m712 | cool |
11:51:55 | m712 | i can do something like "some_int: " &$some_int |
11:52:27 | couven92 | I'd put a space surrounding the `&`, but yeah, why not? |
11:53:23 | m712 | i'm gonna confuse that a lot with dereference and binary AND |
11:54:13 | couven92 | well, in Nim binary AND is `and` and dereference is not done with `&` in any language I know |
11:55:10 | couven92 | unary `*` is usually the dereference operator in languages like C and C++ |
12:03:01 | FromGitter | <mratsim> Is that normal that I get undeclared routine with those 2 examples (trying to use pairs/enumerate iterator with another inline iterator) ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I get `Error: attempting to call undeclared routine: ‘zip’` ... [https://gitter.im/nim-lang/Nim?at=591998f5d1a7716a0aca182d] |
12:07:51 | m712 | couven92: i meant address operator |
12:08:40 | couven92 | I think the `addr` operator in Nim has a little more descriptive name :P |
12:09:20 | couven92 | But, yeah... i needed to get used to the `&` operator as well ;_) |
12:10:28 | m712 | addr returns untracked references right? |
12:10:35 | couven92 | yup |
12:12:03 | m712 | do i need * to export constants? |
12:12:15 | m712 | or are they global once declared |
12:13:37 | dom96 | everything needs to be exported |
12:14:10 | Tiberium | dom96, out of curiosity: can I mark my nim file so all functions/variables/constants from it are exported? |
12:14:17 | Tiberium | or I'll need to place "*" everywhere? |
12:14:18 | m712 | also i'd like to make a feature request: type* blocks for making all-public objects |
12:14:19 | m712 | probably can be done with a macro |
12:14:27 | FromGitter | <mratsim> Replying to myself, I guess pairs/enumerate are expecting `closure iterator`instead of `inline iterator`. I guess I probably could use a template instead of “iterator” for enumerate and pairs. |
12:17:09 | FromGitter | <andreaferretti> @Araq I have added support for a `#skip` directive in c2nim, to skip some `#ifdef` sections altogether. I will need it to wrap CUDA, let me know if it is ok for inclusion |
12:19:22 | dom96 | Tiberium: Not as far as I'm aware. |
12:23:56 | yglukhov | does anyone know anything about jester memory leak on serving statics? |
12:27:31 | dom96 | yglukhov: have you tried jester's 'devel' branch? |
12:27:53 | yglukhov | i think its master. lemme try it |
12:32:15 | yglukhov | dom96: nope, still leaks |
12:32:26 | m712 | does write(f: File) return the number of bytes written? |
12:32:52 | dom96 | yglukhov: is it easy to reproduce? |
12:33:19 | yglukhov | dom96: in my private project - yes =) |
12:34:09 | yglukhov | dom96 ill try to make a sample |
12:34:30 | dom96 | thanks |
12:34:43 | dom96 | You can also try a different GC |
12:45:51 | couven92 | Do we have increment and decrement operators for ordinal types in nim? or do we just do: `i += 1` (or alternatively create a proc `++`) |
12:47:33 | Tiberium | couven92, "dec" and "inc" |
12:47:46 | couven92 | Tiberium, ah, ok :) |
12:56:41 | m712 | what does nim do in a situation like some_proc(i.inc, i.inc, i.inc)? |
12:57:54 | couven92 | it probably assumes `some_proc` to be a proc that takes three `proc(i: int): int` typed arguments |
12:58:35 | Tiberium | btw, is inc a and a+=1 are the same? |
12:58:36 | couven92 | i.e. to get the actual value, i guess you have to use call syntax instead of command syntax |
13:03:59 | PMunch | Yeah, I'm pretty sure you would have to call it like some_proc(i.inc(),i.inc(),i.inc()) or some_proc(inc i,inc i,inc i) |
13:05:06 | PMunch | Oh wait, inc doesn't return an int. It modifies i |
13:06:35 | couven92 | PMunch, ah! okay, that explains things... :P |
13:17:21 | yglukhov | dom96: yay! i've got a sample!! |
13:18:55 | * | sz0 joined #nim |
13:21:15 | yglukhov | dom96: https://github.com/yglukhov/jesterleak |
13:43:57 | yglukhov | Araq: can i make newobj/rawalloc boil down to malloc instead of mmap? |
13:45:47 | Araq | -d:emscripten ? |
13:46:15 | Araq | look at system/osalloc.nim, you might need to patch it |
13:46:34 | yglukhov | ok thanks |
13:46:37 | Araq | and introduce -d:nimMallocInsteadOfMMap |
13:46:56 | Araq | why do you need it? there is a reason we don't use fucking malloc |
13:47:35 | yglukhov | i want to debug memory leaks with xcode instruments. mmap tells nothing useful to instruments |
13:48:54 | * | nsf quit (Quit: WeeChat 1.7.1) |
13:49:09 | Araq | why not use -d:nimTypeNames and dump*? |
13:50:22 | * | couven92 quit (Quit: Client disconnecting) |
13:53:40 | FromGitter | <couven92> Can you do `type ProcType = type(someProc)`? |
13:54:37 | FromGitter | <couven92> I.e. can I somehow avoid writing the potentially very long argument list multiple times? |
14:08:05 | * | planhths quit (Quit: Konversation terminated!) |
14:09:20 | * | rauss joined #nim |
14:09:50 | * | krux02 joined #nim |
14:20:10 | arnetheduck | yglukhov, I've used --gc:none -d:useMalloc occasionally when I didn't want the gc noise |
14:20:29 | arnetheduck | but of course, you get plenty of leaks then ;) |
14:21:03 | arnetheduck | Araq, https://github.com/nim-lang/Nim/pull/5712? failing test is the broken windows test |
14:21:31 | arnetheduck | https://github.com/nim-lang/Nim/pull/5713 would be nice too |
14:21:59 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:22:05 | arnetheduck | just added dwarf debug info support to nlvm, can debug code with gdb very smoothly now ;) |
14:22:16 | yglukhov | arnetheduck: yeah, but i want to keep the gc behavior. |
14:22:23 | yglukhov | just change the underlying impl |
14:25:20 | * | libman joined #nim |
14:27:32 | * | BennyElg_ quit (Remote host closed the connection) |
14:50:31 | FromGitter | <zacharycarter> I keep getting : undeclared identifier: 'convertToConsoleLoggable' |
14:50:43 | FromGitter | <zacharycarter> when trying to import jsconsole and use console.log |
14:50:46 | ftsf | hmm =\ |
14:50:49 | ftsf | never seen that one |
14:53:58 | FromGitter | <zacharycarter> figured it out - stupid mistake on my part |
15:07:45 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
15:10:14 | * | smt__ joined #nim |
15:13:27 | * | smt_ quit (Ping timeout: 240 seconds) |
15:17:04 | yglukhov | Araq, dom96: interesting observation. with my sample jester starts consuming ram rapidly, but stops at around 1.6gb... any ideas? |
15:19:19 | Araq | yglukhov: why not dump the heap and tell us? |
15:19:48 | yglukhov | Araq: i can't see anything useful in the dump :( |
15:19:53 | Araq | the conservative stack likely keeps more stuff alive than it should but that cannot explain 1.6gb |
15:20:21 | Araq | well the dump should give you some numbers |
15:20:40 | ftsf | drat! my osx build doesn't work =( |
15:21:15 | ftsf | so annoying testing on a platform you don't have |
15:27:53 | yglukhov | Araq: does this mean anything for you? https://gist.github.com/yglukhov/071e7ce255d765332d10550ea61beb1a |
15:28:06 | yglukhov | dump after 3 and 6 serves |
15:31:46 | * | Trustable joined #nim |
15:35:23 | * | Trustable quit (Remote host closed the connection) |
15:35:33 | Araq | yglukhov: seems like an allocator problem. fragmentation. |
15:36:19 | * | Trustable joined #nim |
15:36:21 | yglukhov | thats unfortunate... |
15:38:53 | Araq | do you use 0.16.0 ? no, right? |
15:39:11 | yglukhov | i'm using freshest devel with zahary merged in |
15:39:49 | yglukhov | but i suspect thats an old problem, because we've got a similar leak in our prod server for a couple of months. |
15:40:06 | yglukhov | i think i've told you about that one |
15:40:29 | Araq | cprintf(„chunksize: %ld\n", a.nextChunkSize) |
15:40:45 | Araq | add that code in alloc.nim 'requestOsChunks' |
15:41:23 | Araq | should grow quickly and tell us what's wrong |
15:42:56 | yglukhov | Araq: https://gist.github.com/yglukhov/4abeac7856e21fb3266e0fcccad1477c |
15:43:36 | * | PMunch quit (Quit: leaving) |
15:51:15 | yglukhov | Araq: does that help? |
15:52:00 | Araq | it confirms my hypothesis, can't you see it? |
15:53:17 | yglukhov | well i see that chunksize grows to more than 300mb. |
15:54:29 | yglukhov | Araq: but i don't know how it should work |
15:56:14 | Araq | let usedMem = a.currMem # - a.freeMem |
15:56:21 | Araq | remove the '#' comment marker please |
15:56:46 | yglukhov | Araq: a non-related problem: https://gist.github.com/yglukhov/beb25034a57961227560bdfd1fe481f7 . does this nim crash log tell you anything? or do you need a sample? |
15:57:13 | Araq | already fixed that one |
15:57:30 | yglukhov | Araq: how come? today? |
15:57:31 | yglukhov | =) |
15:57:31 | Araq | most likely zahary's branch didn't keep up with the bugfix for that in devel |
15:57:39 | yglukhov | ah, maybe |
15:58:45 | Araq | the logic is hard to get right, you can also try a fixed size chunk size |
15:59:15 | yglukhov | Araq: sorry, but removing '#' did not help |
15:59:34 | yglukhov | the leak is pretty much the same |
15:59:40 | Araq | well the image you serve is 45MB |
15:59:47 | yglukhov | yep |
15:59:53 | Araq | and I bet somewhere a string of size 45MB is allocated |
16:00:00 | yglukhov | sure |
16:00:09 | Araq | so the chunksize reflects that somewhat |
16:00:13 | Araq | bbl |
16:10:34 | ftsf | hmm has anyone managed to get threads working on osx? |
16:10:56 | yglukhov | ftsf: sure, why? |
16:11:50 | ftsf | ahh issues with thread local storage when compiling with nim |
16:11:57 | ftsf | actually i think i just remembered i fixed this before... |
16:14:41 | * | yglukhov quit (Remote host closed the connection) |
16:16:50 | * | chrisheller quit (Remote host closed the connection) |
16:18:30 | * | chrisheller joined #nim |
16:23:03 | * | chemist69 quit (Ping timeout: 260 seconds) |
16:24:06 | * | yglukhov joined #nim |
16:25:25 | * | chemist69 joined #nim |
16:27:25 | * | CcxWrk joined #nim |
16:28:08 | * | yglukhov quit (Ping timeout: 240 seconds) |
16:32:27 | * | vendethiel joined #nim |
16:34:27 | * | vendethiel- quit (Ping timeout: 240 seconds) |
16:46:02 | * | gokr quit (Ping timeout: 258 seconds) |
16:48:18 | FromGitter | <mratsim> Is there any recommendation or package with a specific slicing with steps syntax? From this very old (2015) post I see something like 1..10|2 to go from 1 to 10 (1, 3, 5, 7, 9) https://forum.nim-lang.org/t/837. ⏎ ⏎ I’m implementing a multidimensional array library and would like to avoid inconsistencies across Nim ecosystem i.e. some Nim packages using 1..10|2, other 1..10:2 or 1..10::2 or something even different |
16:49:12 | * | yaiyan is now known as Ieuan |
16:50:56 | * | krux02 quit (Remote host closed the connection) |
16:51:56 | Araq | 1..10|+2 |
16:51:59 | Araq | 1..10|-2 |
16:52:48 | Araq | is what I would use |
16:53:27 | Araq | with custom |- and |+ operators because Nim is awesome |
16:54:10 | Araq | and because the runtime sign should never ever have an influence on iteration direction |
16:56:08 | Araq | also sometimes |* is useful |
17:11:06 | Tiberium | do you need macros to make something like "1..10|+2"? |
17:12:53 | * | couven92 joined #nim |
17:14:21 | * | aedigix quit (Remote host closed the connection) |
17:14:44 | FromGitter | <Varriount> Tiberium: "1..10" produces a simple slice. "SimpleSlice|+2" would produce a complex slice? |
17:14:46 | * | aedigix joined #nim |
17:14:57 | FromGitter | <Varriount> You would need a new type, but I don't think it would require a macro |
17:16:26 | * | aedigix quit (Remote host closed the connection) |
17:16:28 | * | Trioxin joined #nim |
17:16:46 | * | aedigix joined #nim |
17:20:12 | FromGitter | <mratsim> thanks @Araq. @Tiberium, I may need a macro if I have to do myArray[1..10, 3, 1..10|+2] |
17:20:42 | FromGitter | <mratsim> I’m not sure a vargargs[CustomSlice] will work since I mix integer and slices |
17:21:59 | FromGitter | <mratsim> And I also want to be able to do myArray[ .. , 1] with .. being “Don’t slice that dimension" |
17:22:40 | Araq | he, that is not allowed by Nim's parser |
17:25:27 | FromGitter | <mratsim> argh |
17:26:22 | * | gokr joined #nim |
17:32:54 | FromGitter | <Varriount> @mratsim `..` is an operator, not a valid identifier |
17:33:21 | gangstacat | is there a flag or something to test the new asyncdispatch? I got like +4k requests per second and no crash at all in my tests |
17:33:28 | * | gokr quit (Read error: No route to host) |
17:34:42 | * | nsf joined #nim |
17:38:47 | Araq | mratsim, you can do that though, myArray[`..`, 1] |
17:46:10 | * | chrisheller quit (Remote host closed the connection) |
17:47:01 | * | chrisheller joined #nim |
17:47:25 | * | rauce joined #nim |
17:47:26 | * | chrisheller quit (Remote host closed the connection) |
17:48:58 | * | rauss quit (Ping timeout: 268 seconds) |
17:50:58 | * | yglukhov joined #nim |
17:53:16 | FromGitter | <Varriount> gangstacat: Is 4k per second good? |
17:53:48 | gangstacat | certainly, Araq said we could get +30k requests/second yesterday |
17:55:11 | gangstacat | actually with a hello world on jester I get ~30k/sec on head, and ~34k/sec with the new asyncdispatch |
17:55:45 | * | yglukhov quit (Ping timeout: 268 seconds) |
17:57:38 | * | yglukhov joined #nim |
18:00:07 | * | chrisheller joined #nim |
18:00:26 | * | yglukhov quit (Remote host closed the connection) |
18:00:30 | Araq | gangstacat: and with my refactoring 30% more requests, but it crashes most of the time ;-) |
18:00:48 | Araq | will investigate after 0.17 is out |
18:00:58 | * | yglukhov joined #nim |
18:01:15 | gangstacat | Araq, I couldn't get the 30% more and I got no crash so that's why I asked if there is a flag to turn on or something special to do |
18:01:29 | Araq | awww ok |
18:01:56 | * | couven92 quit (Ping timeout: 255 seconds) |
18:02:11 | * | Matthias247 joined #nim |
18:05:37 | * | yglukhov quit (Ping timeout: 268 seconds) |
18:05:49 | Tiberium | Araq, any plans on release date of 0.17? probably shortly after zahary branch will get merged? |
18:09:11 | * | skrylar joined #nim |
18:09:21 | skrylar | well damn. you guys are holding on pretty well. |
18:09:52 | * | skrylar was last here before the rename |
18:13:47 | dom96 | hey skrylar, aren't you the guy that was going to work on NITS? :) |
18:14:06 | dom96 | Tiberium: Today is in fact the plan for release |
18:14:14 | skrylar | dom96, i don't know what NITS is. |
18:14:29 | skrylar | i was the guy who ported some old heavily tested unicode stuff over way back when |
18:15:09 | dom96 | oh, I misremembered, i'm thinking of twist-vector. I definitely recognise your name though |
18:15:23 | skrylar | i used to be here a lot |
18:15:48 | skrylar | saw nim mentioned on a pseudo-framework a bunch of games were using tho. |
18:16:11 | dom96 | The fact that we're still here after so many years should inspire some confidence I hope |
18:17:07 | skrylar | might poke around a bit again |
18:18:45 | skrylar | minorly excited about Red but they're taking forever to get anywhere lol |
18:19:02 | skrylar | they got their GUI stuff put together before a garbage collector o_O |
18:20:21 | skrylar | saw nim and nimble have official arch packages too. congrats. |
18:20:59 | * | smt_ joined #nim |
18:21:59 | dom96 | Debian/Ubuntu as well |
18:22:03 | dom96 | I was surprised to see nim on Ubunty 16.04 |
18:22:05 | * | elrood joined #nim |
18:22:11 | dom96 | And old version, but still |
18:22:17 | skrylar | well that's debian for you |
18:24:07 | skrylar | was porting some neural network stuff over to C and realized i may have overreacted when i quit over the first-letter-capitalization thing |
18:24:21 | skrylar | typing tensor_type_extra_crap multiple times per function is well. |
18:24:35 | * | smt__ quit (Ping timeout: 240 seconds) |
18:25:02 | * | yglukhov joined #nim |
18:27:57 | * | PMunch joined #nim |
18:28:18 | * | yglukhov quit (Remote host closed the connection) |
18:33:07 | * | yglukhov joined #nim |
18:33:10 | skrylar | huh. concepts weren't here before |
18:33:27 | skrylar | looks like you yoinked the best part of pascal lol |
18:34:30 | Tiberium | dom96, what do you mean by today? |
18:35:23 | FromGitter | <mratsim> @Araq For the stepped slice, it seems like `..`as lower precedence than `|+`so I’m forced to use parenthesis: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I guess I will have to define a `..|+`operator. I’m not even sure how Nim deal with that: would `a..b|+step` and `a..b|step+`match ? what about `a.b.|+step`? [https://gitter.im/nim-lang/Nim?at=5919f4eb33e9ee771cad0cd0] |
18:36:24 | * | yglukhov quit (Remote host closed the connection) |
18:38:12 | * | yglukhov joined #nim |
18:40:41 | Araq | proc `|+`(a, b: int): Step = Step(a: a, b: b) |
18:40:58 | Araq | proc `..`(a: int; s: Step): SlicedStep = ... |
18:42:00 | Araq | ^ no problem, types to the rescue. |
18:43:50 | FromGitter | <mratsim> Thanks |
18:49:27 | dom96 | Tiberium: I mean we are planning on releasing today |
18:49:30 | * | yglukhov quit (Remote host closed the connection) |
18:50:32 | * | yglukhov joined #nim |
18:53:38 | Tiberium | dom96, WOW, that's cool |
18:53:53 | Tiberium | dom96, btw, what's the current time for you? |
18:54:01 | dom96 | 19:53 |
18:54:18 | Tiberium | ok, thanks |
18:54:43 | * | gokr joined #nim |
18:55:00 | Tiberium | btw, can tiny cc compiler compile nim? |
18:57:44 | demi- | depends on what C requirements nim has i guess |
18:58:25 | Tiberium | demi-, anyway I'll try now :) |
18:59:36 | Tiberium | wat |
19:00:10 | Tiberium | it compiled nim's csources (I know what tcc doesn't have any optimizations) in 0,448 sec |
19:00:11 | Tiberium | WTF? |
19:01:17 | Tiberium | (I just replaced CC and LINKER with "tcc" |
19:02:02 | FromGitter | <yglukhov> dom96: did I miss anything or nim is gonna be released today? |
19:02:21 | Tiberium | I think you didn't |
19:02:23 | Tiberium | 0.17 yay |
19:03:07 | FromGitter | <yglukhov> thats kinda funny given the state of zah branch =) |
19:04:00 | FromGitter | <yglukhov> may i suggest to delay the release until after at least few days after its merged? |
19:09:06 | * | vlad1777d quit (Remote host closed the connection) |
19:15:47 | Araq | yeah we'll have to |
19:20:59 | FromGitter | <yglukhov> Since we're at it, what are the plans about merging? ;) |
19:21:55 | * | nsf quit (Quit: WeeChat 1.7.1) |
19:26:02 | * | yglukhov quit (Remote host closed the connection) |
19:26:24 | * | BennyElg joined #nim |
19:34:07 | * | yglukhov joined #nim |
19:44:27 | * | yglukhov quit (Remote host closed the connection) |
19:46:47 | * | Arrrr quit (Quit: Leaving.) |
19:55:10 | * | yglukhov joined #nim |
19:59:53 | * | Ven joined #nim |
20:00:16 | * | Ven is now known as Guest50585 |
20:02:13 | * | Tiberium quit (Remote host closed the connection) |
20:02:39 | * | yglukhov quit (Remote host closed the connection) |
20:04:36 | * | Guest50585 quit (Ping timeout: 258 seconds) |
20:05:08 | * | libman quit (Quit: Connection closed for inactivity) |
20:05:10 | * | Ven_ joined #nim |
20:07:14 | * | Trustable quit (Remote host closed the connection) |
20:09:35 | * | Ven_ quit (Ping timeout: 240 seconds) |
20:11:15 | * | Ven_ joined #nim |
20:12:18 | * | rauce quit (Quit: WeeChat 1.7.1) |
20:18:18 | * | yglukhov joined #nim |
20:24:27 | * | couven92 joined #nim |
20:24:36 | * | yglukhov quit (Remote host closed the connection) |
20:27:44 | * | Vladar quit (Quit: Leaving) |
20:34:40 | * | elrood quit (Quit: Leaving) |
20:35:35 | * | Ven_ quit (Ping timeout: 240 seconds) |
20:36:12 | * | Ven joined #nim |
20:36:36 | * | Ven is now known as Guest873 |
20:39:44 | * | frekowidgets joined #nim |
20:40:31 | * | Guest873 quit (Ping timeout: 246 seconds) |
20:41:10 | * | Ven_ joined #nim |
20:43:23 | * | frekowidgets left #nim ("Textual IRC Client: www.textualapp.com") |
20:45:48 | * | Ven_ quit (Ping timeout: 260 seconds) |
20:47:17 | * | Ven_ joined #nim |
20:54:11 | skrylar | argh. there's no jack bindings |
20:58:30 | FromGitter | <mratsim> jack the audio? Can’t you use it through Openal, unless you want adanced stuff like VST-like plugins |
21:00:49 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:02:03 | * | bjz joined #nim |
21:06:50 | * | nsf joined #nim |
21:09:25 | skrylar | yeah midi sequencer stuff |
21:10:01 | * | yglukhov joined #nim |
21:19:02 | * | themagician joined #nim |
21:27:28 | * | gokr quit (Ping timeout: 260 seconds) |
21:28:23 | Araq | skrylar: welcome back. a Unicode champion is highly desired for Nim. :-) |
21:29:25 | * | chemist69 quit (Ping timeout: 246 seconds) |
21:29:48 | * | chemist69 joined #nim |
21:34:22 | FromGitter | <RSDuck> sorry, but are they already plans for nimsuggests future? |
21:34:59 | FromGitter | <RSDuck> it already got much more useable but there are still some nasty bugs which can confuse especially beginner |
21:38:44 | Araq | RSDuck, like what? |
21:39:55 | FromGitter | <RSDuck> like local variables which aren't shown |
21:42:17 | Araq | I can fix that but I fear it might break something else... we need more tests |
21:42:24 | * | gokr joined #nim |
21:43:03 | FromGitter | <RSDuck> ```var f = open("test.txt", fmWrite) ⏎ f.write()``` ⏎ ⏎ or in this case, the signature of f.write isn't suggested, but the of open is [https://gitter.im/nim-lang/Nim?at=591a20e733e9ee771cadda22] |
21:43:17 | FromGitter | <RSDuck> ah, ok |
21:43:56 | Araq | well 'write' should be suggested too |
21:44:11 | Araq | open gets precedence because it's already been used in the current file ... |
21:44:46 | FromGitter | <RSDuck> yes, but in the the paratheses of write, it's signature should be suggested when the con command is used |
21:45:16 | FromGitter | <RSDuck> but it isn't |
21:45:26 | Araq | er ... and open's is suggested instead? |
21:45:43 | FromGitter | <RSDuck> no, nothing is suggested |
21:48:17 | FromGitter | <RSDuck> and that's were atleast I start to stutter |
21:48:38 | FromGitter | <RSDuck> and to think whether I'm wrong or the machine |
21:55:07 | Araq | hmm ok |
21:55:22 | Araq | that should work but 'con' is ambiguous |
22:03:24 | FromGitter | <RSDuck> How can I run the nimsuggest tests? |
22:09:35 | Araq | nim c -r nimsuggest/tester |
22:12:39 | FromGitter | <RSDuck> thanks, but somehow my self written test isn't executed |
22:12:48 | FromGitter | <RSDuck> probably there is another test which fails before it |
22:13:24 | FromGitter | <RSDuck> or my test is faulty and the error message doesn't show that |
22:13:56 | FromGitter | <RSDuck> it's another case, I just didn't read the error message correctly |
22:14:17 | FromGitter | <RSDuck> I need to sleep, my english is also getting worse and worse. Good night |
22:16:39 | enthus1ast | i've just disabled my last "every day use" python script in favour of a nim one. Now everything is nim :) |
22:18:49 | * | nsf quit (Quit: WeeChat 1.7.1) |
22:19:20 | Araq | enthus1ast: yay!!! :D |
22:21:31 | enthus1ast | now i can also disable redis, mongo, postgres ;) |
22:27:46 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:38:13 | * | themagician quit () |
22:39:05 | * | yglukhov quit (Remote host closed the connection) |
22:54:37 | * | skrylar quit (Quit: Leaving) |
22:58:22 | * | sz0 quit (Quit: Connection closed for inactivity) |
23:04:02 | * | adeohluwa joined #nim |
23:31:21 | * | gokr quit (Quit: Leaving.) |
23:31:45 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:33:13 | * | chemist69 quit (Ping timeout: 255 seconds) |
23:37:48 | * | chemist69 joined #nim |
23:44:45 | PMunch | Added many more collisions to SDLGamelib now: https://github.com/PMunch/SDLGamelib |
23:45:19 | PMunch | Rectangles, circles, triangles, and polygons are all supported with within, collides (boolean), and collision (rectangle of the collision). |
23:47:48 | PMunch | Guess the next thing is to write some simple examples of how to use it all :) |
23:48:30 | * | PMunch quit (Quit: leaving) |
23:49:14 | * | Trioxin quit (Read error: Connection reset by peer) |