<< 12-07-2015 >>

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:09renesacI'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:39renesac(and ideally I would not put that var, because it is a read-only parameter)
02:06:48renesachere the gist:
02:06:49renesachttps://gist.github.com/ReneSac/a6e4e1f6125ec554d0f3
02:07:03renesacwhat one should do in those circunstances?
02:07:25EXetoCnot use openarray I think
02:08:01EXetoCwe will get the equivalent of addr for immutable variables at some point
02:09:26renesachum, and I can't do one proc that accepts both seq[T] and string...
02:09:42renesacit complains that "cannot instantiate: 'T'"
02:10:17EXetoCbut just "seq" works, right?
02:10:30*vendethiel joined #nim
02:12:04renesacI got it working
02:12:06Varriountrenesac: 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:30renesacif I add just a "var seq" it spits the error: "Error: expression has no address"
02:12:35VarriountThat's what I had to do when implementing a new version of walkDirRec
02:13:19renesacVarriount: yeah, it seems I will have to do it
02:14:21renesacby the way, in http://nim-lang.org/docs/tut2.html#templates
02:14:28renesactemplates still use expr
02:14:32renesacwasn't it deprecated?
02:14:41EXetoCand "var" twice in the parameter is wrong
02:14:45VarriountNo?
02:15:18renesacoh
02:15:23renesacimmediate templates were
02:15:37EXetoCor does it actually work? but then the second one would be a no-op
02:15:50renesacsystem.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:02renesacfrom the 0.11.2 news
02:16:20VarriountAh.
02:17:20renesacEXetoC: both ways it gives me the same error
02:17:26EXetoCthis is wrong too "addr result[0]", but it doesn't matter if it is indeed the previous line that's causing problems?
02:17:48renesacis it wrong?
02:17:51renesacit is working now
02:18:53EXetoCit's result[0] rather than result.s[0]. is there related code that hasn't been included?
02:19:16renesachttps://gist.github.com/ReneSac/a6e4e1f6125ec554d0f3 <-- updated gist
02:19:30renesacwhere you read result.s]?
02:19:44renesacah
02:19:48renesacok, sorry
02:19:52renesacI changed that
02:20:11EXetoCok
02:20:19EXetoCcya later
02:20:23renesacthanks
02:20:51VarriountHm. What is the difference between typed and untyped?
02:20:54EXetoCd(:O)|<
02:21:08*strcmp1 quit (Quit: Leaving)
02:21:25EXetoCVarriount: they are the new names for expr and stmt IIRC
02:21:44renesacso, typed = expr and untyped= stmt?
02:21:49VarriountYeah, but what is the functional difference between a expr and a stmt
02:21:53EXetoCso, untyped would be expr, yeah?.... ok maybe not :p
02:22:18VarriountAlso, that message should have a 'respectively' at the end, for accuracy's sake.
02:22:21renesacit would be good a tutorial explaining the template usage with them (*wink* *wink*)
02:23:18EXetoCtyped = expr. of course
02:23:49EXetoCcus it has a type. logic :-P
02:24:19renesacI have a feeling it is more complicated than that
02:26:02renesac"Note that untyped is simply a new alias for expr which reflects reality much better."
02:26:11renesachttp://forum.nim-lang.org/t/1100/5 <-- from araq's first post here
02:27:50Varriount"Templates are complicate" <- Yes
02:28:03VarriountHowever It's either that, or restrict their usage.
02:28:37renesacwell, it seems that those "typed" and "untyped" are an attempt on simplifying them
02:28:37EXetoCstop confusing me :p
02:28:48renesacand we need a tutorial
02:29:04*strcmp1 joined #nim
02:29:21Varriountrenesac: I guess 'typed' means that the expression has a definite type that can be resolved on invocation... whereas 'untyped' doesn't?
02:29:43renesacit seems that "typed" can participate on the overload resolution
02:29:53renesacI'm not sure
02:30:06Varriountrenesac: That 'nim by example' project really needs contributions.
02:30:53renesachum, yeah... but the tut2 shouldn't be abandoned either
02:32:19renesacand is it normal c2nim generate invalid nim files?
02:32:36Varriountrenesac: Yes.
02:32:50renesaclike empty "when x:" blocks?
02:33:10Varriountrenesac: May I see the corresponding C file?
02:33:19*EXetoC quit (Ping timeout: 256 seconds)
02:35:06renesachttps://gist.github.com/ReneSac/006a1b44edbeeaff6663
02:35:09renesachere the list
02:35:21renesacof issues I got with c2nim today
02:35:45Varriountrenesac: Yeah, that's normal, although it could be improved.
02:36:00VarriountEssentially, it's debatable whether that's a bug or not.
02:36:00renesacI have no idea what that pragma does, just deleted it
02:36:29VarriountI guess you could have a pass in c2nim to remove constructs like that.
02:37:24renesacthat space before {.deadCodeElim: on.} is annoying though
02:37:36renesacit seems clearly a bug
02:37:39Varriountrenesac: You could try fixing it. :P
02:38:05renesacugh...
02:38:32renesacwell, if it has that bug in every .h file someone will fix it
02:38:43Varriountrenesac: Tsk tsk.
02:38:50renesac^^"
02:39:18def-renesac: i reported that already, is caused by nim/compiler/renderer.nim iirc
02:39:37Varriountrenesac: There's a postprocessor here -> https://github.com/nim-lang/c2nim/blob/master/postprocessor.nim
02:39:55VarriountSeems trivial to remove empty 'when' blocks.
02:47:59Varriountrenesac: What is #out ?
02:48:16renesacwell, the command line has the --out:outfile.nim option
02:48:50*vasher_ quit (Quit: Connection closed for inactivity)
02:48:50renesacI tried to pass this argument through the file like the others
02:49:06renesacbut 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:20Varriountrenesac: Ok, I think I added the correct code to the postprocessor.
03:30:36Varriountrenesac: 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:40fowlgod
08:27:54fowlthis distro is garbage
08:32:55Varriountfowl: ?
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:48dgellowIn 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:40Araqdgellow: 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:54dgellowhmm 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:17Varriountdgellow: 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:13wuehlmauslike 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:07federico3how 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:01federico3any way to extend the json module to handle BigInts?
11:55:27Araqnot without touching the json module
11:55:38Araqalso: 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:00federico3Araq: the json specs do not have a maximum value for ints
12:13:19AraqJavaScript only supports 64bit floats though
12:13:28fowli've been adding parens when i could have been replacing defined\W(\w+) with defined($1)
12:14:26Araqthat we distinguish between float and int is already questionable JSON
12:15:48Araqfowl: yeah I liked to add pattern based transformations to c2nim but it's too much work
12:25:38Araqfowl: let f = curry((proc(c:char; num:int):string)repeat, 'h')
12:25:51Araqcan't you disambiguate in the 'curry' macro?
12:26:14Araqthe macro gets a symchoice and you should be able to iterate over it
12:26:25Araqand get the individual types via getType()
12:26:37Araqif not, we can make that work :-)
12:30:17fowlneed a typeRel() or something to check for compatibility
12:30:42Araqdevel has macros.sameType
12:33:54fowlwhat about curry(map, "hello")((c:char)->char => c.toUpper)
12:34:11*EXetoC joined #nim
12:34:12fowlopenarray[T] != string
12:34:44*vendethiel quit (Ping timeout: 264 seconds)
12:35:29*yglukhov___ joined #nim
12:36:40Araqwell I told OnO we need to support the full type relationships
12:36:52Araqbut he started with sameType :P
12:53:29*BitPuffin|osx joined #nim
12:54:52EXetoCit'd be nice to ensure that glfwMakeContextCurrent was last called in the current thread
12:55:04EXetoCit's a little overkill though and probably difficult to do :p
12:56:00EXetoCwhat about thread callbacks though?
12:56:35AraqonThreadCreate, onThreadTerminate ?
12:56:59Araqany JavaScripts experts around? I need a "copy listing to clipboard" feature
12:59:51dgellowAraq: you mean, copy selection to clipboard ?
13:00:07Araqyeah
13:00:25Araqbut I don't want to select anything
13:00:40AraqI want a "copy" button under a code listing
13:01:34Araq"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:57Araqlooks difficult
13:02:07*Kingsquee quit (Quit: Konversation terminated!)
13:02:11Araq"Directly copying to the clipboard via javascript is not permitted by any modern browser for security reasons. " oh fuck you security
13:02:44EXetoCAraq: maybe. but of course, all that's necessary in this case is to compare thread ID's
13:02:47EXetoCduh
13:03:31Araqwhat 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:21wirbiHello!
13:11:46wirbihttps://gist.github.com/wirbi7/b127f0aba414cbffea1c
13:12:53wirbiI 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:45wirbiIf replace render call to string all compiled good.
13:13:54Araqyeah yeah yeah yeah, we know
13:14:11Araqdon't mix async with threads
13:14:18dgellowGithub is using zeroclipboard. It works in my browser (chromium 43) with the flash plugin disabled.
13:17:37dgellowah … zeroclipboard is by github … I didn't realize.
13:17:52wirbiHm... Ok, I'll try to find another way, because my websocket module have async and don't work properly without threads on.
13:18:30EXetoCAraq: temporary limitation?
13:20:22AraqEXetoC: 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:26VarriountAraq: I think EXetoC meant the "no threads with async" thing
13:23:01Araqah lol, yeah, i started to make async work with threading
13:25:50Araqdgellow: 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:01r-kuAraq: 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:18Araqproc setjmp*(ctx: JmpBuf): int {.importc: "narch_$1".} # make this 'var JmpBuf'
14:05:25Araqdon't lie to the compiler :P
14:05:46arnetheducktrivial line breaking: https://github.com/nim-lang/Nim/pull/3108
14:06:54Araqr-ku: also you need to implement ${MODULE_DIR} differently
14:07:38Araqit should be a magic constant
14:07:49Araqso that it doesn't only work within passL
14:07:50r-kuerr i dont even know wth that is
14:08:05Araqsystem.CompileTime
14:08:27Araqnot hard to figure out how it's implemented
14:08:46r-kubetter question is what "magic constant" actually does?
14:08:49r-kuand how it works?
14:09:06Araqit works by compiler magic
14:09:53r-kuwill it be replacing some placeholder with module path in argument of passL?
14:09:56Araqjust look at compiler/semfold.nim
14:10:04Araqoh that's what you mean
14:10:12Araqin the end it will look like:
14:10:56Araq{.passL: ModuleDir / ABI & "_" & hostCPU & objExt}
14:11:00fowloo
14:11:05fowlmoduledir is useful
14:11:15fowlcoroutines are useful
14:11:22fowlr-ku, keep up the good work
14:11:36r-kuah now it makes sense. thanks
14:11:39r-kuthanks fowl ;)
14:11:49r-kuawesome things are done when need arises
14:12:33r-kualso thank Araq too for trying to use me for implementing this. hes good at avoiding work and making others do it
14:15:13Araqso it looks like we need a new "meta" module that contains: CurrentModule, CurrentFile, CurrentModuleDir
14:17:01*kungfooman joined #nim
14:17:42r-kucant those constants go to system.nim
14:17:43r-ku?
14:17:57AraqI don't want system.CurrentModule etc.
14:18:08r-kualso - lib/arch/* path/module name good?
14:18:32Araqhaven't thought about it, looks good for now
14:19:13r-kuwhy is system.CurrentModule bad?
14:20:02Araqsystem is too big already
14:20:19Araqplus we still cannot do: import system except CurrentModule
14:20:44Araqbut eventually we need explicit system import statements
14:20:50kungfoomanis there a lib to read .o files? e.g. get .text segment offset
14:21:15Araqkungfooman: dunno if the GNU binutils stuff has been wrapped
14:21:33Araqif not, c2nim is really good these days, just fixed a couple of bugs
14:22:00kungfoomanhm sounds good, but i just installed nim some minutes ago and no clue yet :>
14:22:11r-kuto 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:57Araqr-ku: hrm good point
14:27:22Araqbut I can imagine we need ever more of those Current* magics
14:27:40fowlcurrent.Module
14:27:54Araqfowl: eh too obvious :P
14:28:04Araqbut yeah, a "current" module perhaps
14:28:09r-kuif you want more organization of code it can always go to system/constants.nim and included into system.nim
14:28:13fowljust make system.current some kind of compile time magic that has `.` defined?
14:28:19fowlit can read properties from a table
14:28:20fowl:p
14:28:39Araqfowl: or implement my old 'submodule' idea
14:28:51Araqbut then dom96 will leave us :-(
14:29:07r-kuwhats that?
14:29:21Araqsubmodule current:
14:29:37fowlnamespaces would be nice
14:29:39Araq const module {.magic: "module".} = ""
14:29:53fowlesp generic namespaces
14:29:54r-kufowl: modules are namespaces
14:30:12kungfoomanhttpserver2 cannot accept requests lol "failed to accept client request"
14:30:47r-kuAraq: i still dont quite get what submodule is and how it would solve my problem
14:31:10Araqr-ku: it's just an additional "namespace"
14:31:26r-kuoh that
14:31:28Araqso you're forced to write current.module and cannot write module
14:31:48Araqbut *shrug* underscores do the same
14:31:59Araqcurrent_module
14:32:37fowli have a wrapper for this sexy vector graphics ui stuff now https://github.com/memononen/nanovg
14:33:51r-kufowl: can it render svg?
14:34:42kungfoomanfowl: 45fps for some 2d?
14:35:13fowlr-ku, the author has a project that renders svg with it
14:35:31r-kuif it was more abstracted could be great small GUI lib
14:35:36r-kuesp for games
14:35:54fowlkungfooman, yes you dont typically run things at 1000FPS just because you can
14:36:31kungfoomanso you hardcode it to 45fps? games usually got 60
14:37:31r-kuAraq: how do i get PContext in proc getConstExpr*(m: PSym, n: PNode)?
14:37:34fowl60 is too high for GUI
14:37:55Araqr-ku: you cannot, you either have the context or you're doomed
14:37:57fowlif its animated, you want the animations to be smooth, if its not animated, 0 fps is fine
14:38:33kungfoomanwell just wondering about general performance
14:38:35r-kuAraq: so then isnt it not really possible to make those magics?
14:39:18Araqm: PSym is the module, so not impossible
14:39:35r-kuk, ill check it out
14:39:41fowlkungfooman, uncapped the example runs at 1000+FPS for me, the slowest running were the GLES versions that ran at 800FPS
14:40:08kungfoomanfowl: nice, then its interesting for games :)
14:40:11Araqugh
14:40:19Araqmy "copy" button doesn't work at all
14:40:34Araqnow what? how do I debug this shit?
14:40:53Araqworks in trivial example, fails afterwards
14:41:02Araqwebdev 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:18r-kuuh 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:01Araqr-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:02r-kualright, thanks
15:42:27fowlAraq, 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:27fowltemplate currentSourcePath(): string may work
16:04:38fowlcurrentSourcePath().splitPath.head
16:05:05fowldone 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:39wirbiphew, 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:00r-kuAraq: i want compiler/lists.nim in stdlib for internal use. can something be done about it?
17:43:02bogenhi
17:43:10r-kuhello
17:44:08bogenwell, I'm back to Nim, after about a year. Using the JS back end for some stuff at work now.
17:44:55r-kuawesome. it gets better weekly so you missed a lot in a year ;)
17:45:26bogenLooks like there are a few issues with the JS back end that I'll likely need to dig into.
17:45:56bogenmssing a lot of improvement? or growing pains? :)
17:45:59*[CBR]Unspoken joined #nim
17:46:19r-kuAraq: 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:35r-kubogen: 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:28Araqhi 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:31bogenhi Araq, thanks. Good on JS backend. Way to go yglukhov___ :)
18:49:18*X67r_ quit (Ping timeout: 248 seconds)
18:50:14rgv151Araq: why export stmt does not export `+` and `==` operators?
18:50:43yglukhov___meh, there's still a lot to fix there.
18:51:10*X67r joined #nim
18:51:38*miglo joined #nim
18:51:53Araqrgv151: export exports everything, there are no special cases in the compiler. not sure what your problem is.
18:52:20rgv151hmm, I get `[]` exported but `+` and `==` dont
18:53:35*xificurC quit (Ping timeout: 246 seconds)
18:54:09*MyMind joined #nim
18:56:13migloDear 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:28Araqmiglo: please use nre
18:57:41migloMy regex: r = re"""abc(\d+)def""" ; My string: s = "abc123def" ; My seq: b: seq[string] = @[]
18:57:54miglothen: m = find(s, r, b)
18:58:19miglowhere m equals to zero, so I've got a match
18:58:19Araqfind takes an openArray of the "right" size
18:58:45Araquse var b = newSeq[string](1)
18:59:13miglothe openArray is in my opinion not very well described in the tutorial
18:59:24Araqfind doesn't allocate room in the seq for you. It cannot, openArrays are not growable
18:59:25miglook, will try it out
18:59:41Araqmiglo: fair enough, can you make a PR?
19:02:35rgv151Araq: here is my code: https://github.com/rgv151/rethinkdb.nim/blob/master/rql.nim#L332
19:03:01rgv151if I move that operator to rethinkdb.nim, it works
19:03:08miglothanks for the hint Araq ; 're' is deprecated?
19:03:12rgv151here is the test code: https://gist.github.com/rgv151/dba6f25eb22bb070e354
19:03:36Araqmiglo: yeah, "nre" is the new module which is much easier to use and without the bugs
19:05:34Araqrgv151: sounds more like a problem with 'waitFor'
19:06:30rgv151how is that?
19:08:50*vasher_ quit (Quit: Connection closed for inactivity)
19:11:13rgv151I tried it w/o waitFor, still not found
19:11:36Araqyeah waitFor is fine, maybe your 'expr' confuses the compiler?
19:11:48Araqrename it and see what happens please
19:12:29Araqwhat's the error message btw?
19:12:59rgv151renamed to expr1, till not works
19:13:05rgv151the 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:14Araqrgv151: hrm so you have 2 modules? rql and rethinkdb?
19:17:28rgv151yes, I dont want to import indiviual modules so I exported them w/ rethinkdb
19:17:58Araqwell you have a binary zero after 'echo r.firstVar'
19:18:18Araqand so everything after your proc [] isn't even parsed by the compiler
19:18:23Araq-.-
19:19:19Araqhow did you manage to do that? I've never seen this before
19:20:02rgv151that's my bad, thank you
19:20:14rgv151do what?
19:20:15Araqwell the compiler could have told you too
19:20:33Araqhow did you produce a binary zero in your source code?
19:21:24rgv151idk, maybe emacs `auto trim` function did that
19:21:30*ChrisMAN quit (Ping timeout: 250 seconds)
19:21:41*zaquest joined #nim
19:21:43EXetoCgood old null termination
19:22:26*X67r_ joined #nim
19:23:10rgv151it would be dangerous
19:23:32rgv151it working now, thank you!
19:23:47*Matthias247 joined #nim
19:23:58Araqthank Notepad++
19:24:18*X67r quit (Ping timeout: 246 seconds)
19:24:41Araqcould have been nasty to see otherwise
19:24:56rgv151lol, it looks like `^@` on emacs
19:25:10rgv151but I didn't notice it
19:25:48AraqAporia refused to open the file ...
19:26:29Araqwhich is ok, but how can you then look for the problem?
19:26:31*zaquest quit (Ping timeout: 256 seconds)
19:28:17rgv151i'm sory but I don't understand your question, what problem?
19:28:26rgv151my english is very bad :(
19:28:35Araqnever 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:47miglohow 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:04Araqmiglo: nimble install nre
19:37:46*X67r joined #nim
19:38:29*thotypous quit (Quit: WeeChat 1.2)
19:39:07rgv151miglo: 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:32miglowhat is pegs? another regular expressions module?
19:45:54rgv151http://nim-lang.org/docs/pegs.html
19:47:04miglooh, very interesting...thanks a lot for this hint
19:47:26rgv151you 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:12dgellowI 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:20dgellowI could throw an exception
23:09:18fowlUse Optional[T]
23:10:31*zaquest joined #nim
23:11:18dgellowmmm … it's not in system ?
23:11:21Araqthrow an exception
23:11:52fowlOr 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:22fowlOptional [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)