00:01:17 | * | vendethiel quit (Ping timeout: 265 seconds) |
00:07:42 | * | apense quit (Ping timeout: 248 seconds) |
00:25:24 | * | vendethiel joined #nim |
00:27:24 | * | X67r quit (Quit: leaving) |
00:34:29 | * | vasher_ joined #nim |
00:46:28 | * | vendethiel quit (Ping timeout: 244 seconds) |
00:57:37 | * | jaco60 quit (Ping timeout: 246 seconds) |
01:54:31 | * | skroll2 quit (Ping timeout: 256 seconds) |
01:54:47 | * | skroll2 joined #nim |
01:57:56 | * | yglukhov___ joined #nim |
02:02:48 | * | yglukhov___ quit (Ping timeout: 264 seconds) |
02:04:21 | * | pregressive quit (Remote host closed the connection) |
02:04:39 | * | pregressive joined #nim |
02:06:09 | renesac | I'm trying to create a wrapper around a c library, but I get "Error: expression has no address", even after putting "var" before the parameter type |
02:06:18 | * | pregressive quit (Remote host closed the connection) |
02:06:35 | * | pregressive joined #nim |
02:06:39 | renesac | (and ideally I would not put that var, because it is a read-only parameter) |
02:06:48 | renesac | here the gist: |
02:06:49 | renesac | https://gist.github.com/ReneSac/a6e4e1f6125ec554d0f3 |
02:07:03 | renesac | what one should do in those circunstances? |
02:07:25 | EXetoC | not use openarray I think |
02:08:01 | EXetoC | we will get the equivalent of addr for immutable variables at some point |
02:09:26 | renesac | hum, and I can't do one proc that accepts both seq[T] and string... |
02:09:42 | renesac | it complains that "cannot instantiate: 'T'" |
02:10:17 | EXetoC | but just "seq" works, right? |
02:10:30 | * | vendethiel joined #nim |
02:12:04 | renesac | I got it working |
02:12:06 | Varriount | renesac: The answer to that might be to create two procs with the same name, with one accepthing a seq[T] and one accepting a string, then have them call a templated implementation |
02:12:30 | renesac | if I add just a "var seq" it spits the error: "Error: expression has no address" |
02:12:35 | Varriount | That's what I had to do when implementing a new version of walkDirRec |
02:13:19 | renesac | Varriount: yeah, it seems I will have to do it |
02:14:21 | renesac | by the way, in http://nim-lang.org/docs/tut2.html#templates |
02:14:28 | renesac | templates still use expr |
02:14:32 | renesac | wasn't it deprecated? |
02:14:41 | EXetoC | and "var" twice in the parameter is wrong |
02:14:45 | Varriount | No? |
02:15:18 | renesac | oh |
02:15:23 | renesac | immediate templates were |
02:15:37 | EXetoC | or does it actually work? but then the second one would be a no-op |
02:15:50 | renesac | system.untyped and system.typed have been introduced as aliases for expr and stmt. The new names capture the semantics much better and most likely expr and stmt will be deprecated in favor of the new names. |
02:16:02 | renesac | from the 0.11.2 news |
02:16:20 | Varriount | Ah. |
02:17:20 | renesac | EXetoC: both ways it gives me the same error |
02:17:26 | EXetoC | this is wrong too "addr result[0]", but it doesn't matter if it is indeed the previous line that's causing problems? |
02:17:48 | renesac | is it wrong? |
02:17:51 | renesac | it is working now |
02:18:53 | EXetoC | it's result[0] rather than result.s[0]. is there related code that hasn't been included? |
02:19:16 | renesac | https://gist.github.com/ReneSac/a6e4e1f6125ec554d0f3 <-- updated gist |
02:19:30 | renesac | where you read result.s]? |
02:19:44 | renesac | ah |
02:19:48 | renesac | ok, sorry |
02:19:52 | renesac | I changed that |
02:20:11 | EXetoC | ok |
02:20:19 | EXetoC | cya later |
02:20:23 | renesac | thanks |
02:20:51 | Varriount | Hm. What is the difference between typed and untyped? |
02:20:54 | EXetoC | d(:O)|< |
02:21:08 | * | strcmp1 quit (Quit: Leaving) |
02:21:25 | EXetoC | Varriount: they are the new names for expr and stmt IIRC |
02:21:44 | renesac | so, typed = expr and untyped= stmt? |
02:21:49 | Varriount | Yeah, but what is the functional difference between a expr and a stmt |
02:21:53 | EXetoC | so, untyped would be expr, yeah?.... ok maybe not :p |
02:22:18 | Varriount | Also, that message should have a 'respectively' at the end, for accuracy's sake. |
02:22:21 | renesac | it would be good a tutorial explaining the template usage with them (*wink* *wink*) |
02:23:18 | EXetoC | typed = expr. of course |
02:23:49 | EXetoC | cus it has a type. logic :-P |
02:24:19 | renesac | I have a feeling it is more complicated than that |
02:26:02 | renesac | "Note that untyped is simply a new alias for expr which reflects reality much better." |
02:26:11 | renesac | http://forum.nim-lang.org/t/1100/5 <-- from araq's first post here |
02:27:50 | Varriount | "Templates are complicate" <- Yes |
02:28:03 | Varriount | However It's either that, or restrict their usage. |
02:28:37 | renesac | well, it seems that those "typed" and "untyped" are an attempt on simplifying them |
02:28:37 | EXetoC | stop confusing me :p |
02:28:48 | renesac | and we need a tutorial |
02:29:04 | * | strcmp1 joined #nim |
02:29:21 | Varriount | renesac: I guess 'typed' means that the expression has a definite type that can be resolved on invocation... whereas 'untyped' doesn't? |
02:29:43 | renesac | it seems that "typed" can participate on the overload resolution |
02:29:53 | renesac | I'm not sure |
02:30:06 | Varriount | renesac: That 'nim by example' project really needs contributions. |
02:30:53 | renesac | hum, yeah... but the tut2 shouldn't be abandoned either |
02:32:19 | renesac | and is it normal c2nim generate invalid nim files? |
02:32:36 | Varriount | renesac: Yes. |
02:32:50 | renesac | like empty "when x:" blocks? |
02:33:10 | Varriount | renesac: May I see the corresponding C file? |
02:33:19 | * | EXetoC quit (Ping timeout: 256 seconds) |
02:35:06 | renesac | https://gist.github.com/ReneSac/006a1b44edbeeaff6663 |
02:35:09 | renesac | here the list |
02:35:21 | renesac | of issues I got with c2nim today |
02:35:45 | Varriount | renesac: Yeah, that's normal, although it could be improved. |
02:36:00 | Varriount | Essentially, it's debatable whether that's a bug or not. |
02:36:00 | renesac | I have no idea what that pragma does, just deleted it |
02:36:29 | Varriount | I guess you could have a pass in c2nim to remove constructs like that. |
02:37:24 | renesac | that space before {.deadCodeElim: on.} is annoying though |
02:37:36 | renesac | it seems clearly a bug |
02:37:39 | Varriount | renesac: You could try fixing it. :P |
02:38:05 | renesac | ugh... |
02:38:32 | renesac | well, if it has that bug in every .h file someone will fix it |
02:38:43 | Varriount | renesac: Tsk tsk. |
02:38:50 | renesac | ^^" |
02:39:18 | def- | renesac: i reported that already, is caused by nim/compiler/renderer.nim iirc |
02:39:37 | Varriount | renesac: There's a postprocessor here -> https://github.com/nim-lang/c2nim/blob/master/postprocessor.nim |
02:39:55 | Varriount | Seems trivial to remove empty 'when' blocks. |
02:47:59 | Varriount | renesac: What is #out ? |
02:48:16 | renesac | well, the command line has the --out:outfile.nim option |
02:48:50 | * | vasher_ quit (Quit: Connection closed for inactivity) |
02:48:50 | renesac | I tried to pass this argument through the file like the others |
02:49:06 | renesac | but it seems it is not supported |
02:56:21 | * | arnetheduck joined #nim |
02:58:21 | * | lokulin quit (Changing host) |
02:58:21 | * | lokulin joined #nim |
03:06:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
03:10:10 | * | darkf joined #nim |
03:12:08 | * | gyeates quit (Ping timeout: 250 seconds) |
03:16:28 | * | BitPuffin|osx quit (Ping timeout: 250 seconds) |
03:18:40 | * | pregressive quit (Ping timeout: 246 seconds) |
03:23:58 | * | vendethiel quit (Ping timeout: 246 seconds) |
03:28:56 | * | strcmp1 quit (Quit: Leaving) |
03:30:20 | Varriount | renesac: Ok, I think I added the correct code to the postprocessor. |
03:30:36 | Varriount | renesac: No longer shall bare when statements show themselves to you! |
03:31:24 | * | pregressive joined #nim |
03:43:20 | * | pregressive quit (Ping timeout: 250 seconds) |
03:51:52 | * | vendethiel joined #nim |
04:33:46 | * | wirbi joined #nim |
04:44:28 | * | vendethiel quit (Ping timeout: 246 seconds) |
04:53:53 | * | vendethiel joined #nim |
05:11:25 | * | dalarmmst joined #nim |
05:17:34 | * | vendethiel quit (Ping timeout: 248 seconds) |
05:31:32 | * | vasher_ joined #nim |
05:42:11 | * | xcombelle joined #nim |
06:03:17 | * | vendethiel joined #nim |
06:05:08 | * | wb joined #nim |
06:24:31 | * | vendethiel quit (Ping timeout: 246 seconds) |
06:28:45 | * | Demon_Fox quit (Quit: Leaving) |
06:28:50 | * | vendethiel joined #nim |
06:32:53 | * | minus left #nim ("WeeChat 1.2-dev") |
06:51:15 | * | Miko___ joined #nim |
07:15:16 | * | vendethiel quit (Ping timeout: 246 seconds) |
07:22:20 | * | vendethiel joined #nim |
07:27:58 | * | elbow quit (Remote host closed the connection) |
07:46:15 | * | vendethiel quit (Ping timeout: 265 seconds) |
07:51:31 | * | wb_ joined #nim |
07:51:31 | * | wb quit (Ping timeout: 256 seconds) |
07:56:45 | * | vendethiel joined #nim |
08:01:47 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
08:04:26 | * | wirbi quit (Quit: Page closed) |
08:13:16 | * | unclechu joined #nim |
08:18:22 | * | vendethiel quit (Ping timeout: 248 seconds) |
08:27:40 | fowl | god |
08:27:54 | fowl | this distro is garbage |
08:32:55 | Varriount | fowl: ? |
08:35:05 | * | jszymanski joined #nim |
08:36:48 | * | EXetoC joined #nim |
08:37:13 | * | Matthias247 joined #nim |
08:38:48 | * | jaco60 joined #nim |
08:39:00 | * | vendethiel joined #nim |
08:43:00 | * | xcombelle quit (Ping timeout: 255 seconds) |
08:46:44 | * | huonw quit (K-Lined) |
09:02:12 | * | vendethiel quit (Ping timeout: 264 seconds) |
09:08:21 | * | xcombelle joined #nim |
09:08:50 | * | vasher_ quit (Quit: Connection closed for inactivity) |
09:19:48 | dgellow | In this snippet (from the manual), what is result ? The returned type of the proc ? `proc newLit(x: int): Literal = new(result); result.x = x` |
09:20:40 | Araq | dgellow: each proc that has a non-void return type has an implicitly declared 'result' variable that reflects the return value |
09:20:53 | * | vendethiel joined #nim |
09:21:40 | * | Kingsquee joined #nim |
09:23:54 | dgellow | hmm okay |
09:37:20 | * | darkf_ joined #nim |
09:38:05 | * | darkf quit (Disconnected by services) |
09:38:06 | * | darkf_ is now known as darkf |
09:41:17 | Varriount | dgellow: It's actually pretty elegant. |
09:49:02 | * | vendethiel quit (Ping timeout: 248 seconds) |
09:50:00 | * | EXetoC quit (Ping timeout: 244 seconds) |
09:51:06 | * | jszymanski quit (Quit: computer sleeps...) |
09:59:48 | * | xcombelle quit (Ping timeout: 264 seconds) |
10:02:25 | * | X67r joined #nim |
10:02:42 | * | EXetoC joined #nim |
10:17:56 | * | X67r_ joined #nim |
10:19:50 | * | X67r quit (Ping timeout: 250 seconds) |
10:25:13 | wuehlmaus | like filterIt with the it variable, i like that, too |
10:25:45 | * | X67r joined #nim |
10:26:49 | * | X67r_ quit (Read error: Connection reset by peer) |
10:55:18 | * | Miko___ quit (Ping timeout: 255 seconds) |
10:59:53 | * | vendethiel joined #nim |
11:03:09 | * | vasher_ joined #nim |
11:04:57 | * | Miko___ joined #nim |
11:05:07 | federico3 | how can I generate a base-10 unsigned representation of a 128-bit value? The value is in a seq[int8] |
11:10:33 | * | Miko_____ joined #nim |
11:13:58 | * | Miko___ quit (Ping timeout: 246 seconds) |
11:20:56 | * | vendethiel quit (Ping timeout: 244 seconds) |
11:24:52 | * | EXetoC quit (Ping timeout: 246 seconds) |
11:34:22 | * | wb_ quit (Read error: Connection reset by peer) |
11:34:52 | * | yglukhov___ joined #nim |
11:35:20 | * | wb_ joined #nim |
11:40:00 | * | Miko_____ quit (Ping timeout: 264 seconds) |
11:40:01 | * | X67r quit (Read error: Connection reset by peer) |
11:42:59 | * | Miko_____ joined #nim |
11:44:27 | * | X67r joined #nim |
11:47:27 | * | vendethiel joined #nim |
11:55:01 | federico3 | any way to extend the json module to handle BigInts? |
11:55:27 | Araq | not without touching the json module |
11:55:38 | Araq | also: json doesn't support bigints |
11:57:51 | * | X67r_ joined #nim |
11:58:47 | * | X67r quit (Ping timeout: 240 seconds) |
12:07:01 | * | yglukhov___ quit (Quit: Be back later ...) |
12:08:40 | * | yglukhov___ joined #nim |
12:12:56 | * | yglukhov___ quit (Ping timeout: 250 seconds) |
12:13:00 | federico3 | Araq: the json specs do not have a maximum value for ints |
12:13:19 | Araq | JavaScript only supports 64bit floats though |
12:13:28 | fowl | i've been adding parens when i could have been replacing defined\W(\w+) with defined($1) |
12:14:26 | Araq | that we distinguish between float and int is already questionable JSON |
12:15:48 | Araq | fowl: yeah I liked to add pattern based transformations to c2nim but it's too much work |
12:25:38 | Araq | fowl: let f = curry((proc(c:char; num:int):string)repeat, 'h') |
12:25:51 | Araq | can't you disambiguate in the 'curry' macro? |
12:26:14 | Araq | the macro gets a symchoice and you should be able to iterate over it |
12:26:25 | Araq | and get the individual types via getType() |
12:26:37 | Araq | if not, we can make that work :-) |
12:30:17 | fowl | need a typeRel() or something to check for compatibility |
12:30:42 | Araq | devel has macros.sameType |
12:33:54 | fowl | what about curry(map, "hello")((c:char)->char => c.toUpper) |
12:34:11 | * | EXetoC joined #nim |
12:34:12 | fowl | openarray[T] != string |
12:34:44 | * | vendethiel quit (Ping timeout: 264 seconds) |
12:35:29 | * | yglukhov___ joined #nim |
12:36:40 | Araq | well I told OnO we need to support the full type relationships |
12:36:52 | Araq | but he started with sameType :P |
12:53:29 | * | BitPuffin|osx joined #nim |
12:54:52 | EXetoC | it'd be nice to ensure that glfwMakeContextCurrent was last called in the current thread |
12:55:04 | EXetoC | it's a little overkill though and probably difficult to do :p |
12:56:00 | EXetoC | what about thread callbacks though? |
12:56:35 | Araq | onThreadCreate, onThreadTerminate ? |
12:56:59 | Araq | any JavaScripts experts around? I need a "copy listing to clipboard" feature |
12:59:51 | dgellow | Araq: you mean, copy selection to clipboard ? |
13:00:07 | Araq | yeah |
13:00:25 | Araq | but I don't want to select anything |
13:00:40 | Araq | I want a "copy" button under a code listing |
13:01:34 | Araq | "The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface." |
13:01:57 | Araq | looks difficult |
13:02:07 | * | Kingsquee quit (Quit: Konversation terminated!) |
13:02:11 | Araq | "Directly copying to the clipboard via javascript is not permitted by any modern browser for security reasons. " oh fuck you security |
13:02:44 | EXetoC | Araq: maybe. but of course, all that's necessary in this case is to compare thread ID's |
13:02:47 | EXetoC | duh |
13:03:31 | Araq | what has security to do with anything here? copy a limited bunch of bytes around into an OS specific buffer |
13:08:20 | * | dalarmmst quit (Ping timeout: 264 seconds) |
13:08:50 | * | vasher_ quit (Quit: Connection closed for inactivity) |
13:11:11 | * | wirbi joined #nim |
13:11:21 | wirbi | Hello! |
13:11:46 | wirbi | https://gist.github.com/wirbi7/b127f0aba414cbffea1c |
13:12:53 | wirbi | I try to use moustachu module. But then I compile it with --threads:on I receive error: lib/pure/asyncdispatch.nim(1196, 8) Error: 'cb' is not GC-safe as it accesses 'nameIterVar' which is a global using GC'ed memory |
13:12:56 | * | huonw joined #nim |
13:13:32 | * | jszymanski joined #nim |
13:13:45 | wirbi | If replace render call to string all compiled good. |
13:13:54 | Araq | yeah yeah yeah yeah, we know |
13:14:11 | Araq | don't mix async with threads |
13:14:18 | dgellow | Github is using zeroclipboard. It works in my browser (chromium 43) with the flash plugin disabled. |
13:17:37 | dgellow | ah … zeroclipboard is by github … I didn't realize. |
13:17:52 | wirbi | Hm... Ok, I'll try to find another way, because my websocket module have async and don't work properly without threads on. |
13:18:30 | EXetoC | Araq: temporary limitation? |
13:20:22 | Araq | EXetoC: dunno. sounds more like yet another case of: "we don't understand security and/or have a definition of security that has little to do with reality" |
13:22:26 | Varriount | Araq: I think EXetoC meant the "no threads with async" thing |
13:23:01 | Araq | ah lol, yeah, i started to make async work with threading |
13:25:50 | Araq | dgellow: found some snippet that works with Chrome. Good enough for me. |
13:31:59 | * | ChrisMAN joined #nim |
13:42:56 | * | X67r_ quit (Read error: Connection reset by peer) |
13:43:12 | * | X67r joined #nim |
13:44:13 | * | cryzed_ is now known as cryzed |
13:58:00 | * | wirbi quit (Ping timeout: 246 seconds) |
13:59:01 | r-ku | Araq: whenever you feel bored please skim the changes and comment: https://github.com/nim-lang/Nim/compare/devel...r-ku:coroutines |
14:01:40 | * | aziz joined #nim |
14:05:04 | * | yglukhov___ quit (Quit: Be back later ...) |
14:05:18 | Araq | proc setjmp*(ctx: JmpBuf): int {.importc: "narch_$1".} # make this 'var JmpBuf' |
14:05:25 | Araq | don't lie to the compiler :P |
14:05:46 | arnetheduck | trivial line breaking: https://github.com/nim-lang/Nim/pull/3108 |
14:06:54 | Araq | r-ku: also you need to implement ${MODULE_DIR} differently |
14:07:38 | Araq | it should be a magic constant |
14:07:49 | Araq | so that it doesn't only work within passL |
14:07:50 | r-ku | err i dont even know wth that is |
14:08:05 | Araq | system.CompileTime |
14:08:27 | Araq | not hard to figure out how it's implemented |
14:08:46 | r-ku | better question is what "magic constant" actually does? |
14:08:49 | r-ku | and how it works? |
14:09:06 | Araq | it works by compiler magic |
14:09:53 | r-ku | will it be replacing some placeholder with module path in argument of passL? |
14:09:56 | Araq | just look at compiler/semfold.nim |
14:10:04 | Araq | oh that's what you mean |
14:10:12 | Araq | in the end it will look like: |
14:10:56 | Araq | {.passL: ModuleDir / ABI & "_" & hostCPU & objExt} |
14:11:00 | fowl | oo |
14:11:05 | fowl | moduledir is useful |
14:11:15 | fowl | coroutines are useful |
14:11:22 | fowl | r-ku, keep up the good work |
14:11:36 | r-ku | ah now it makes sense. thanks |
14:11:39 | r-ku | thanks fowl ;) |
14:11:49 | r-ku | awesome things are done when need arises |
14:12:33 | r-ku | also thank Araq too for trying to use me for implementing this. hes good at avoiding work and making others do it |
14:15:13 | Araq | so it looks like we need a new "meta" module that contains: CurrentModule, CurrentFile, CurrentModuleDir |
14:17:01 | * | kungfooman joined #nim |
14:17:42 | r-ku | cant those constants go to system.nim |
14:17:43 | r-ku | ? |
14:17:57 | Araq | I don't want system.CurrentModule etc. |
14:18:08 | r-ku | also - lib/arch/* path/module name good? |
14:18:32 | Araq | haven't thought about it, looks good for now |
14:19:13 | r-ku | why is system.CurrentModule bad? |
14:20:02 | Araq | system is too big already |
14:20:19 | Araq | plus we still cannot do: import system except CurrentModule |
14:20:44 | Araq | but eventually we need explicit system import statements |
14:20:50 | kungfooman | is there a lib to read .o files? e.g. get .text segment offset |
14:21:15 | Araq | kungfooman: dunno if the GNU binutils stuff has been wrapped |
14:21:33 | Araq | if not, c2nim is really good these days, just fixed a couple of bugs |
14:22:00 | kungfooman | hm sounds good, but i just installed nim some minutes ago and no clue yet :> |
14:22:11 | r-ku | to me it sounds like CurrentModule should be part of current module. ofc it cant be but adding it so system sort of emulates this making it transparent to programmer |
14:26:57 | Araq | r-ku: hrm good point |
14:27:22 | Araq | but I can imagine we need ever more of those Current* magics |
14:27:40 | fowl | current.Module |
14:27:54 | Araq | fowl: eh too obvious :P |
14:28:04 | Araq | but yeah, a "current" module perhaps |
14:28:09 | r-ku | if you want more organization of code it can always go to system/constants.nim and included into system.nim |
14:28:13 | fowl | just make system.current some kind of compile time magic that has `.` defined? |
14:28:19 | fowl | it can read properties from a table |
14:28:20 | fowl | :p |
14:28:39 | Araq | fowl: or implement my old 'submodule' idea |
14:28:51 | Araq | but then dom96 will leave us :-( |
14:29:07 | r-ku | whats that? |
14:29:21 | Araq | submodule current: |
14:29:37 | fowl | namespaces would be nice |
14:29:39 | Araq | const module {.magic: "module".} = "" |
14:29:53 | fowl | esp generic namespaces |
14:29:54 | r-ku | fowl: modules are namespaces |
14:30:12 | kungfooman | httpserver2 cannot accept requests lol "failed to accept client request" |
14:30:47 | r-ku | Araq: i still dont quite get what submodule is and how it would solve my problem |
14:31:10 | Araq | r-ku: it's just an additional "namespace" |
14:31:26 | r-ku | oh that |
14:31:28 | Araq | so you're forced to write current.module and cannot write module |
14:31:48 | Araq | but *shrug* underscores do the same |
14:31:59 | Araq | current_module |
14:32:37 | fowl | i have a wrapper for this sexy vector graphics ui stuff now https://github.com/memononen/nanovg |
14:33:51 | r-ku | fowl: can it render svg? |
14:34:42 | kungfooman | fowl: 45fps for some 2d? |
14:35:13 | fowl | r-ku, the author has a project that renders svg with it |
14:35:31 | r-ku | if it was more abstracted could be great small GUI lib |
14:35:36 | r-ku | esp for games |
14:35:54 | fowl | kungfooman, yes you dont typically run things at 1000FPS just because you can |
14:36:31 | kungfooman | so you hardcode it to 45fps? games usually got 60 |
14:37:31 | r-ku | Araq: how do i get PContext in proc getConstExpr*(m: PSym, n: PNode)? |
14:37:34 | fowl | 60 is too high for GUI |
14:37:55 | Araq | r-ku: you cannot, you either have the context or you're doomed |
14:37:57 | fowl | if its animated, you want the animations to be smooth, if its not animated, 0 fps is fine |
14:38:33 | kungfooman | well just wondering about general performance |
14:38:35 | r-ku | Araq: so then isnt it not really possible to make those magics? |
14:39:18 | Araq | m: PSym is the module, so not impossible |
14:39:35 | r-ku | k, ill check it out |
14:39:41 | fowl | kungfooman, uncapped the example runs at 1000+FPS for me, the slowest running were the GLES versions that ran at 800FPS |
14:40:08 | kungfooman | fowl: nice, then its interesting for games :) |
14:40:11 | Araq | ugh |
14:40:19 | Araq | my "copy" button doesn't work at all |
14:40:34 | Araq | now what? how do I debug this shit? |
14:40:53 | Araq | works in trivial example, fails afterwards |
14:41:02 | Araq | webdev is always like that ... |
14:49:58 | * | infinity0 quit (Ping timeout: 246 seconds) |
14:52:44 | * | infinity0 joined #nim |
14:56:36 | * | gyeates joined #nim |
15:07:18 | r-ku | uh Araq PSym.annex is nil in getConstExpr().. and only it seems to lead to info required |
15:07:32 | * | yglukhov___ joined #nim |
15:10:41 | * | vendethiel joined #nim |
15:13:27 | * | yglukhov___ quit (Quit: Be back later ...) |
15:14:23 | * | yglukhov___ joined #nim |
15:32:01 | Araq | r-ku: I can do it later, for now it's not that important |
15:35:37 | * | Varriount_ joined #nim |
15:38:34 | * | darkf quit (Quit: Leaving) |
15:38:48 | * | Varriount quit (Ping timeout: 264 seconds) |
15:40:02 | r-ku | alright, thanks |
15:42:27 | fowl | Araq, whats the workaround people use for currentModule.path not existing? |
15:59:55 | * | X67r quit (Read error: Connection reset by peer) |
16:01:23 | * | vendethiel quit (Ping timeout: 256 seconds) |
16:01:27 | fowl | template currentSourcePath(): string may work |
16:04:38 | fowl | currentSourcePath().splitPath.head |
16:05:05 | fowl | done and done |
16:11:36 | * | vendethiel joined #nim |
16:15:30 | * | elbow joined #nim |
16:21:06 | * | vasher_ joined #nim |
16:58:44 | * | X67r joined #nim |
17:06:51 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:07:17 | * | arnetheduck quit (Ping timeout: 240 seconds) |
17:18:41 | * | wirbi joined #nim |
17:19:49 | * | xcombelle joined #nim |
17:20:39 | wirbi | phew, I do it. nim is awesome. :) |
17:25:18 | * | Miko_____ quit (Ping timeout: 246 seconds) |
17:26:16 | * | Miko_____ joined #nim |
17:32:03 | * | xcombelle quit (Ping timeout: 265 seconds) |
17:39:17 | * | Trustable joined #nim |
17:39:57 | * | X67r quit (Read error: Connection reset by peer) |
17:40:39 | * | X67r joined #nim |
17:42:34 | * | bogen joined #nim |
17:43:00 | r-ku | Araq: i want compiler/lists.nim in stdlib for internal use. can something be done about it? |
17:43:02 | bogen | hi |
17:43:10 | r-ku | hello |
17:44:08 | bogen | well, I'm back to Nim, after about a year. Using the JS back end for some stuff at work now. |
17:44:55 | r-ku | awesome. it gets better weekly so you missed a lot in a year ;) |
17:45:26 | bogen | Looks like there are a few issues with the JS back end that I'll likely need to dig into. |
17:45:56 | bogen | mssing a lot of improvement? or growing pains? :) |
17:45:59 | * | [CBR]Unspoken joined #nim |
17:46:19 | r-ku | Araq: also i propose moving error/hint/warning to system. reason is that compile time errors are useful in much more situations than when dealing with macros. and hiding them in there is misleading at least.. |
17:46:35 | r-ku | bogen: both i guess :) |
17:50:03 | * | wirbi quit (Ping timeout: 246 seconds) |
17:52:12 | * | dalarmmst joined #nim |
17:55:13 | * | xcombelle joined #nim |
18:04:08 | * | jszymanski quit (Ping timeout: 264 seconds) |
18:04:47 | * | yglukhov___ quit (Quit: Be back later ...) |
18:08:38 | * | jszymanski joined #nim |
18:09:24 | * | Miko_____ quit (Ping timeout: 264 seconds) |
18:13:44 | * | Miko_____ joined #nim |
18:21:35 | * | yglukhov___ joined #nim |
18:30:45 | * | xificurC quit (Ping timeout: 246 seconds) |
18:35:12 | * | Miko_____ quit (Ping timeout: 255 seconds) |
18:38:15 | * | xificurC joined #nim |
18:38:48 | * | X67r_ joined #nim |
18:39:17 | * | zaquest quit (Ping timeout: 252 seconds) |
18:39:28 | Araq | hi bogen. welcome back. :-) The JS backend is in good shape thanks to yglukhov___ :-) |
18:40:55 | * | X67r quit (Ping timeout: 246 seconds) |
18:41:34 | * | Miko_____ joined #nim |
18:46:27 | * | rgv151 joined #nim |
18:46:31 | bogen | hi Araq, thanks. Good on JS backend. Way to go yglukhov___ :) |
18:49:18 | * | X67r_ quit (Ping timeout: 248 seconds) |
18:50:14 | rgv151 | Araq: why export stmt does not export `+` and `==` operators? |
18:50:43 | yglukhov___ | meh, there's still a lot to fix there. |
18:51:10 | * | X67r joined #nim |
18:51:38 | * | miglo joined #nim |
18:51:53 | Araq | rgv151: export exports everything, there are no special cases in the compiler. not sure what your problem is. |
18:52:20 | rgv151 | hmm, I get `[]` exported but `+` and `==` dont |
18:53:35 | * | xificurC quit (Ping timeout: 246 seconds) |
18:54:09 | * | MyMind joined #nim |
18:56:13 | miglo | Dear nim'lers, I'm fighting with the regular expressions module 're' and trying to get a group of captured strings with the find proc, but the sequence I'm passing to 'find' never contains any strings. Am I right that the openArray that is passed to 'find' should have the captured strings from a regex group? |
18:56:43 | * | Demon_Fox joined #nim |
18:56:48 | * | Sembei quit (Ping timeout: 250 seconds) |
18:57:28 | Araq | miglo: please use nre |
18:57:41 | miglo | My regex: r = re"""abc(\d+)def""" ; My string: s = "abc123def" ; My seq: b: seq[string] = @[] |
18:57:54 | miglo | then: m = find(s, r, b) |
18:58:19 | miglo | where m equals to zero, so I've got a match |
18:58:19 | Araq | find takes an openArray of the "right" size |
18:58:45 | Araq | use var b = newSeq[string](1) |
18:59:13 | miglo | the openArray is in my opinion not very well described in the tutorial |
18:59:24 | Araq | find doesn't allocate room in the seq for you. It cannot, openArrays are not growable |
18:59:25 | miglo | ok, will try it out |
18:59:41 | Araq | miglo: fair enough, can you make a PR? |
19:02:35 | rgv151 | Araq: here is my code: https://github.com/rgv151/rethinkdb.nim/blob/master/rql.nim#L332 |
19:03:01 | rgv151 | if I move that operator to rethinkdb.nim, it works |
19:03:08 | miglo | thanks for the hint Araq ; 're' is deprecated? |
19:03:12 | rgv151 | here is the test code: https://gist.github.com/rgv151/dba6f25eb22bb070e354 |
19:03:36 | Araq | miglo: yeah, "nre" is the new module which is much easier to use and without the bugs |
19:05:34 | Araq | rgv151: sounds more like a problem with 'waitFor' |
19:06:30 | rgv151 | how is that? |
19:08:50 | * | vasher_ quit (Quit: Connection closed for inactivity) |
19:11:13 | rgv151 | I tried it w/o waitFor, still not found |
19:11:36 | Araq | yeah waitFor is fine, maybe your 'expr' confuses the compiler? |
19:11:48 | Araq | rename it and see what happens please |
19:12:29 | Araq | what's the error message btw? |
19:12:59 | rgv151 | renamed to expr1, till not works |
19:13:05 | rgv151 | the error is: type mismatch: got (RqlQuery, int literal(2)) |
19:14:52 | * | X67r quit (Read error: Connection reset by peer) |
19:15:05 | * | X67r joined #nim |
19:16:14 | Araq | rgv151: hrm so you have 2 modules? rql and rethinkdb? |
19:17:28 | rgv151 | yes, I dont want to import indiviual modules so I exported them w/ rethinkdb |
19:17:58 | Araq | well you have a binary zero after 'echo r.firstVar' |
19:18:18 | Araq | and so everything after your proc [] isn't even parsed by the compiler |
19:18:23 | Araq | -.- |
19:19:19 | Araq | how did you manage to do that? I've never seen this before |
19:20:02 | rgv151 | that's my bad, thank you |
19:20:14 | rgv151 | do what? |
19:20:15 | Araq | well the compiler could have told you too |
19:20:33 | Araq | how did you produce a binary zero in your source code? |
19:21:24 | rgv151 | idk, maybe emacs `auto trim` function did that |
19:21:30 | * | ChrisMAN quit (Ping timeout: 250 seconds) |
19:21:41 | * | zaquest joined #nim |
19:21:43 | EXetoC | good old null termination |
19:22:26 | * | X67r_ joined #nim |
19:23:10 | rgv151 | it would be dangerous |
19:23:32 | rgv151 | it working now, thank you! |
19:23:47 | * | Matthias247 joined #nim |
19:23:58 | Araq | thank Notepad++ |
19:24:18 | * | X67r quit (Ping timeout: 246 seconds) |
19:24:41 | Araq | could have been nasty to see otherwise |
19:24:56 | rgv151 | lol, it looks like `^@` on emacs |
19:25:10 | rgv151 | but I didn't notice it |
19:25:48 | Araq | Aporia refused to open the file ... |
19:26:29 | Araq | which is ok, but how can you then look for the problem? |
19:26:31 | * | zaquest quit (Ping timeout: 256 seconds) |
19:28:17 | rgv151 | i'm sory but I don't understand your question, what problem? |
19:28:26 | rgv151 | my english is very bad :( |
19:28:35 | Araq | never mind, it's not important |
19:28:47 | * | zaquest joined #nim |
19:33:32 | * | zaquest quit (Ping timeout: 264 seconds) |
19:33:36 | * | X67r_ quit (Read error: Connection reset by peer) |
19:34:47 | miglo | how to install module 'nre' or how to integrate it properly into the nim installation that I have right now? |
19:36:02 | * | zaquest joined #nim |
19:36:04 | Araq | miglo: nimble install nre |
19:37:46 | * | X67r joined #nim |
19:38:29 | * | thotypous quit (Quit: WeeChat 1.2) |
19:39:07 | rgv151 | miglo: i find pegs is better than any re related modules |
19:40:44 | * | zaquest quit (Ping timeout: 264 seconds) |
19:45:25 | * | zaquest joined #nim |
19:45:32 | miglo | what is pegs? another regular expressions module? |
19:45:54 | rgv151 | http://nim-lang.org/docs/pegs.html |
19:47:04 | miglo | oh, very interesting...thanks a lot for this hint |
19:47:26 | rgv151 | you are welcome |
19:50:17 | * | zaquest quit (Ping timeout: 265 seconds) |
19:54:06 | * | zaquest joined #nim |
19:58:59 | * | zaquest quit (Ping timeout: 265 seconds) |
20:00:45 | * | zaquest joined #nim |
20:05:12 | * | zaquest quit (Ping timeout: 255 seconds) |
20:06:34 | * | gokr joined #nim |
20:09:08 | * | zaquest joined #nim |
20:12:40 | * | rgv151 quit (Quit: rcirc on GNU Emacs 24.5.1) |
20:13:34 | * | zaquest quit (Ping timeout: 248 seconds) |
20:14:43 | * | filcuc joined #nim |
20:17:18 | * | zaquest joined #nim |
20:22:03 | * | zaquest quit (Ping timeout: 256 seconds) |
20:24:23 | * | zaquest joined #nim |
20:25:27 | * | Miko_____ quit (Ping timeout: 255 seconds) |
20:29:02 | * | zaquest quit (Ping timeout: 248 seconds) |
20:30:32 | * | zaquest joined #nim |
20:33:03 | * | yglukhov___ quit (Quit: Be back later ...) |
20:35:20 | * | zaquest quit (Ping timeout: 264 seconds) |
20:36:37 | * | zaquest joined #nim |
20:36:59 | * | Miko_____ joined #nim |
20:39:37 | * | filcuc_ joined #nim |
20:39:38 | * | filcuc quit (Read error: Connection reset by peer) |
20:40:57 | * | zaquest quit (Ping timeout: 246 seconds) |
20:42:47 | * | zaquest joined #nim |
20:44:25 | * | jszymanski quit (Quit: computer sleeps...) |
20:47:18 | * | zaquest quit (Ping timeout: 250 seconds) |
20:50:08 | * | xcombelle quit (Quit: Leaving) |
20:53:37 | * | zaquest joined #nim |
20:57:32 | * | dalarmmst quit (Ping timeout: 264 seconds) |
20:58:26 | * | zaquest quit (Ping timeout: 265 seconds) |
20:58:46 | * | kungfooman quit (Ping timeout: 256 seconds) |
21:00:14 | * | aziz quit (Remote host closed the connection) |
21:01:21 | * | EXetoC quit (Ping timeout: 252 seconds) |
21:02:15 | * | zaquest joined #nim |
21:06:26 | * | vasher_ joined #nim |
21:06:30 | * | zaquest quit (Ping timeout: 246 seconds) |
21:08:26 | * | zaquest joined #nim |
21:12:39 | * | EXetoC joined #nim |
21:12:43 | * | zaquest quit (Ping timeout: 252 seconds) |
21:16:07 | * | zaquest joined #nim |
21:20:40 | * | zaquest quit (Ping timeout: 265 seconds) |
21:23:59 | * | brson joined #nim |
21:24:51 | * | zaquest joined #nim |
21:29:22 | * | zaquest quit (Ping timeout: 256 seconds) |
21:30:03 | * | filcuc_ quit (Quit: Konversation terminated!) |
21:30:57 | * | zaquest joined #nim |
21:35:27 | * | zaquest quit (Ping timeout: 252 seconds) |
21:39:00 | * | Miko_____ quit (Ping timeout: 256 seconds) |
21:39:20 | * | zaquest joined #nim |
21:42:49 | * | kungfooman joined #nim |
21:43:42 | * | zaquest quit (Ping timeout: 248 seconds) |
21:47:28 | * | zaquest joined #nim |
21:51:39 | * | zaquest quit (Ping timeout: 246 seconds) |
21:59:25 | * | zaquest joined #nim |
22:02:26 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:04:03 | * | zaquest quit (Ping timeout: 256 seconds) |
22:10:25 | * | zaquest joined #nim |
22:10:54 | * | miglo left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
22:14:50 | * | zaquest quit (Ping timeout: 250 seconds) |
22:16:27 | * | wuehlmaus quit (Quit: Lost terminal) |
22:19:14 | * | zaquest joined #nim |
22:20:46 | * | brson quit (Quit: leaving) |
22:23:30 | * | zaquest quit (Ping timeout: 246 seconds) |
22:26:28 | * | zaquest joined #nim |
22:31:08 | * | zaquest quit (Ping timeout: 264 seconds) |
22:31:37 | * | ChrisMAN joined #nim |
22:33:45 | * | zaquest joined #nim |
22:37:55 | * | zaquest quit (Ping timeout: 246 seconds) |
22:40:48 | * | zaquest joined #nim |
22:45:32 | * | zaquest quit (Ping timeout: 264 seconds) |
22:50:09 | * | zaquest joined #nim |
22:54:55 | * | zaquest quit (Ping timeout: 265 seconds) |
22:58:49 | * | zaquest joined #nim |
23:03:05 | * | zaquest quit (Ping timeout: 252 seconds) |
23:06:12 | dgellow | I have a noob question. What is a the correct way to return a nil from a `proc(): TObjectWithProperties` ? cf this snippet https://gist.github.com/dgellow/c0d7a1a172ebe6ddbeff |
23:08:20 | dgellow | I could throw an exception |
23:09:18 | fowl | Use Optional[T] |
23:10:31 | * | zaquest joined #nim |
23:11:18 | dgellow | mmm … it's not in system ? |
23:11:21 | Araq | throw an exception |
23:11:52 | fowl | Or define a "nil state" for your obj by defining isNil() for it and commiting to checking it before use like you would a pointer obj that null is ok value for |
23:12:21 | * | gokr quit (Ping timeout: 256 seconds) |
23:12:22 | fowl | Optional [t] is in options module, or optionals or smthing |
23:15:13 | * | zaquest quit (Ping timeout: 265 seconds) |
23:21:09 | * | zaquest joined #nim |
23:25:27 | * | zaquest quit (Ping timeout: 255 seconds) |
23:26:56 | * | OmIkRoNiXz quit (Ping timeout: 252 seconds) |
23:27:23 | * | OmIkRoNiXz joined #nim |
23:29:28 | * | zaquest joined #nim |
23:33:02 | * | wb_ quit (Ping timeout: 248 seconds) |
23:33:53 | * | zaquest quit (Ping timeout: 252 seconds) |
23:37:12 | * | zaquest joined #nim |
23:41:17 | * | zaquest quit (Ping timeout: 240 seconds) |
23:44:12 | * | zaquest joined #nim |
23:46:05 | * | kfm2 joined #nim |
23:48:19 | * | kungfooman quit (Ping timeout: 256 seconds) |
23:48:46 | * | zaquest quit (Ping timeout: 256 seconds) |
23:51:35 | * | zaquest joined #nim |
23:52:27 | * | Trustable quit (Remote host closed the connection) |
23:55:54 | * | zaquest quit (Ping timeout: 246 seconds) |