<< 13-05-2015 >>

00:09:05*Jesin quit (Quit: Leaving)
00:09:41*JoshuaT quit (Quit: My Mac has gone to sleep. ZZZzzz…)
00:10:03*arnetheduck joined #nim
00:12:53filwitso nimsuggest is now separate from the compiler repo?
00:14:32filwitno nevermind, looks like the the nim-lang repo is dated
00:29:29*wb quit (Ping timeout: 250 seconds)
00:31:54ddsaaaaaaaafcant wait for visual studio code to get nim language support, to replace sublime text
00:35:14*jholland quit (Quit: Connection closed for inactivity)
00:47:11*Jesin joined #nim
01:06:45*datanoise quit (Ping timeout: 272 seconds)
01:08:46*ddsaaaaaaaaf quit (Quit: Page closed)
01:18:07*fffffff joined #nim
01:18:38*fffffff quit (Client Quit)
01:18:57*ZZZZZZZZZ joined #nim
01:19:09*filwit quit (Quit: Leaving)
01:19:51renesacZZZZZZZZZ: you are following this project: http://forum.nim-lang.org/t/1107/1
01:19:51renesac?
01:20:33ZZZZZZZZZnope, but it looks like its for visual studio
01:20:49ZZZZZZZZZand not for visual studio code
01:21:11ZZZZZZZZZvisual studio code still doesnt support plugin etc
01:21:57ZZZZZZZZZhttps://code.visualstudio.com/ if you havent seen it
01:23:28renesacoh, didn't know about it
01:23:41ZZZZZZZZZits basically sublime text but by microsoft :D
01:49:32*filwit joined #nim
01:53:03*darkf joined #nim
01:53:42*datanoise joined #nim
01:58:46*flaviu quit (Remote host closed the connection)
02:07:15*gsingh93 joined #nim
03:00:57*dddddd quit (Ping timeout: 240 seconds)
03:05:46*zahary quit (Read error: Connection reset by peer)
03:06:05*zahary joined #nim
03:07:44*kz joined #nim
03:08:29kzHi. I am trying to play with asyncnet and asyncdispatch and the 'await' keyword is not recognized
03:08:33kzError: undeclared identifier: 'await'
03:08:49kzNim version is 0.11.2
03:09:08kzany idea ?
03:11:06notfowl-Await doesn't exist, its scanned for in {.async} procs
03:15:48*TEttinger quit (Ping timeout: 272 seconds)
03:16:50kzdo I need to explicitly mark these proc async ?
03:17:07kzok I guessed I missed that point
03:17:15kz*I guess
03:17:23kzthanks !
03:19:30*wepy joined #nim
03:19:49wepyhow do i fix the error: "cannot open '/usr/lib/nim/system.lib'" problem?
03:20:24wepyone github issue page said it's about search paths..
03:20:34wepybut addint -p:..Nim-build-dir.. din't fix it
03:21:14wepyah.. i added the lib dir
03:25:21wepyactually.. weird
03:25:34wepythe compile works from the command line, but not from a Makefile
03:25:36wepy:\
03:26:16*MyMind joined #nim
03:26:36*Sembei quit (Ping timeout: 252 seconds)
03:27:02*endragor joined #nim
03:27:54*endragor quit (Remote host closed the connection)
03:28:28*BitPuffin|osx quit (Ping timeout: 272 seconds)
03:30:57*endragor joined #nim
03:33:19wepyif i add --lib:/home/X/Nim/lib.. then instead of a system.nim error, i get errors for imported libs
03:38:35*Jesin quit (Read error: Connection reset by peer)
03:39:34*Jesin joined #nim
03:44:13*gsingh93 quit (Ping timeout: 264 seconds)
03:45:08wepywhy would "nim dump" have different output in a Makefile vs from terminal?
03:57:11*JoshuaT joined #nim
04:03:25*MyMind quit (Ping timeout: 264 seconds)
04:07:32*wepy quit (Quit: Lost terminal)
04:08:42*Pisuke joined #nim
04:08:50*kz quit (Quit: Page closed)
04:22:19*Perelandric quit (Ping timeout: 246 seconds)
04:37:36*Sembei joined #nim
04:38:13*yglukhov___ joined #nim
04:40:25*Pisuke quit (Ping timeout: 265 seconds)
04:42:33*yglukhov___ quit (Ping timeout: 250 seconds)
05:10:12*ddl_smurf quit (Quit: ddl_smurf)
05:16:14*boop joined #nim
05:16:58*amaur joined #nim
05:18:26*cazov_ joined #nim
05:18:29*mal``` joined #nim
05:20:18*pigmej_ joined #nim
05:21:29*milosn joined #nim
05:25:22*dhasenan_ joined #nim
05:26:56*mal`` quit (*.net *.split)
05:26:56*pigmej quit (*.net *.split)
05:26:57*buupisaway quit (*.net *.split)
05:26:57*dhasenan quit (*.net *.split)
05:26:57*ir2ivps10 quit (*.net *.split)
05:26:57*mtj__ quit (*.net *.split)
05:26:57*cazov quit (*.net *.split)
05:26:57*Araq quit (*.net *.split)
05:26:57*amaurea quit (*.net *.split)
05:26:57*pigmej_ is now known as pigmej
05:29:23*Araq joined #nim
05:30:56*mtj_ joined #nim
05:38:02*ir2ivps10 joined #nim
05:41:00*notfowl- quit (Excess Flood)
05:42:06*notfowl joined #nim
05:54:52*dalarmmst joined #nim
06:25:17*OnO joined #nim
06:25:49*Jesin quit (Quit: Leaving)
06:28:03*yglukhov___ joined #nim
06:42:41*cazov_ is now known as cazov
06:42:48*filwit quit (Quit: Leaving)
06:48:46*Jesin joined #nim
07:05:01*endragor_ joined #nim
07:06:20*Kingsquee quit (Quit: Konversation terminated!)
07:07:27dalarmmstHow can I print an int has a hex value without having to specify a length (as with strutils.toHex), or easily calculate the length?
07:08:48*endragor quit (Ping timeout: 256 seconds)
07:09:27*notfowl quit (Excess Flood)
07:09:37*notfowl joined #nim
07:09:37*notfowl quit (Excess Flood)
07:10:06*notfowl joined #nim
07:12:55*Ven joined #nim
07:14:21*BlaXpirit joined #nim
07:16:28*datanoise quit (Ping timeout: 272 seconds)
07:17:01*endragor_ quit (Remote host closed the connection)
07:17:33*endragor joined #nim
07:18:31*endragor quit (Remote host closed the connection)
07:18:50*Andris_zbx joined #nim
07:22:20*Kingsquee joined #nim
07:34:12*Trustable joined #nim
07:36:12*Ven quit (Ping timeout: 276 seconds)
07:43:40*kashyap_ joined #nim
07:44:40notfowldalarmmst, sizeof(num) * 2
07:48:49kashyap_c2nim does not seem to parse array initialization where index is specified - as shown here https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Designated-Inits.html ... any workarounds for this/
07:50:33BlaXpiritdoes C really have this syntax?
07:50:42BlaXpiritthis is so inelegant, geez
07:53:07dtscodeWho uses that?
07:57:13*davidhq joined #nim
07:58:15kashyap_:) ... apparently its valid syntax..I've seen it in some kernel code
08:00:25*johnsoft quit (Ping timeout: 264 seconds)
08:00:29dtscodeEw.
08:01:24*johnsoft joined #nim
08:02:14notfowllol struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 };
08:06:05*dtscode shudders
08:09:17*Ven joined #nim
08:09:29*coffeepot joined #nim
08:13:39*gokr left #nim (#nim)
08:13:42*datanoise joined #nim
08:23:50*bluenote joined #nim
08:35:38*datanoise quit (Ping timeout: 272 seconds)
08:38:30*notfowl quit (Excess Flood)
08:39:06*notfowl joined #nim
08:42:20*endragor joined #nim
08:42:55*borko joined #nim
08:43:34borkohello, an absolute beginner with a (silly) question
08:44:11*endragor quit (Read error: Connection reset by peer)
08:44:20borkoin the standard `math` library, there is the `gcd` proc
08:44:23*endragor joined #nim
08:45:08borkoand it will happily let me use it with say floats as arguments, because this is how it is implemented
08:45:14borkois that intended?
08:45:36dtscodeIs what intended?
08:46:13borkoThat I can find the greatest common divisor of non-integers?
08:47:03*davidhq_ joined #nim
08:47:26dtscodeYes.
08:47:41dtscodeReading the documentation can tell you that though.
08:49:29bluenotedtscode: the math module documentation?
08:49:37dtscodehttp://nim-lang.org/docs/math.html#gcd,T,T
08:49:49*davidhq quit (Ping timeout: 265 seconds)
08:50:13borkoWell, the documentation says only "Computes the greatest common divisor of x and y.", and when I looked at the code it looked like you can give it anything that has `mod` and `abs`
08:50:47dtscodeThe documentation shows you what type(s) its meant to work with
08:50:49borkoand this is indeed so: echo gcd(2.34, 3.12) --> 8.881784197001252e-16
08:52:10borkoIndeed; I was just wondering what is the use-case for such a computation. I am not claiming this is somehow not perfectly correct, just trying to understand the rationale
08:52:11bluenotewhat is also strange: `mod` itself should not work for float in the first place
08:52:58*endragor quit (Read error: Connection reset by peer)
08:53:10dtscodebluenote: Sure it should, considering it explicitly takes float types.
08:53:21borkoit does, though, this is something else I noticed but there is a defined meaning of that at least
08:53:34bluenoteyes, sorry, I was missing the import before
08:53:53borkoI mean there is a defined meaning of mod for floats. See for example `fmod` from C
08:54:25dtscodeborko: I understand what you asking now. That is different than what you are asking before.
08:54:26bluenoteyes, I only tested without "import math" <- that is where it is defined...
08:54:28*endragor joined #nim
08:55:38bluenotewhereas the regular `mod` for int is in the general scope...
08:55:47borkoThe question is: "What is the intended use of finding the greatest common divisor of types that are not ordinal (in the mathematical sense of the word)
08:55:49*davidhq joined #nim
08:56:26dtscodeborko: Yes. Thats not the same as "Is gcd intended to work with floats?"
08:56:37borkodtscode: correct
08:56:53dtscodeWhich is why I was confused.
08:57:01*ingsoc joined #nim
08:57:09dtscodeBut unfortunately, I don't have an answer for your actual question
08:57:12borkodtscode: thank you for helping me refine my question
08:57:52*davidhq_ quit (Ping timeout: 255 seconds)
08:58:46notfowlPythons gcd works on floats
08:59:21dtscodenotfowl: Hes asking what the point in using it on floats is
08:59:32dtscodeOr rather, when would one need to use it on floats.
09:00:41*TEttinger joined #nim
09:01:00*endragor quit (Ping timeout: 256 seconds)
09:02:29*endragor joined #nim
09:02:51borkonotfowl: yes. as in, greatest common divisor as a concept is only defined for ordinal types.
09:03:42notfowlDunno I'm not a mathematician
09:04:39borkonotfowl: neither am I. What would be a good place to ask this question?
09:06:48bluenoteit would make sense to me if e.g. gcd(1.0, 1.2) == 0.2, i.e., the largest floating point number x which satisfies a == N*x and b == M*x with N,M integers
09:07:36bluenotebut I get gcd(1.0, 1.2) = 2.220446049250313e-16 (btw, also in python)
09:07:39borkobluenote: indeed. I would expect, for example, gcd(2.34, 3.12) --> 0.78
09:08:27bluenotemaybe the algorithm used is only approriate for integers
09:08:37borkobluenote: but this would imply that either A) the numbers are say decimals or rationals or B) we convert them to the closest rational before moving on
09:09:27borkobluenote: not _integers_ necessarily, but definitely an _ordinal_ type
09:10:09Araqthe algorithm is generic so that it can work on bignums out of the box, I think
09:10:09*endragor quit (Remote host closed the connection)
09:10:28Araqthat float is allowed too is coincidence
09:10:33bluenotehm, are floating point number always rationals (being multiples of some machine epsilon)?
09:10:39*endragor joined #nim
09:10:50Araqof course they are
09:11:05Araqcannot compute with math's "real" numbers
09:11:18Araqthat's how "real" they are ;-)
09:11:38borkobluenote: you can find a rational that exactly represents any float, but this rational is not always exactly equal to the decimal representation of the float
09:12:41*iamd3vil joined #nim
09:12:48Araqthe decimal representation is ... well ... optimized for humans
09:13:57bluenoteyes, that is probably why we get things like 2.220446049250313e-16
09:14:18borkoAraq: indeed. But either way: it is a coincidence that `gcd` works with floats; should that be "allowed"? It would rather never be intended in actual code?
09:14:57Araqwell if the algorithm requires 'mod' and floats provide a 'mod' I cannot see why it shouldn't be allowed
09:16:20borkoWell, the results are definitely not something useful. One could argue that interpreting "2.34" as a decimal and using that makes sense, but then there would be quite a bit of magic going on
09:16:21flyxbecause in math theory, you need a neutral element to be able to define gcd
09:16:29flyx1 is a neutral element for natural numbers
09:16:40flyxwith floating point numbers, you don't have a neutral element
09:16:47borkoflyx: yes
09:17:24Araqflyx: 1.0 is a neutral element for multiplication for float. I think.
09:17:38flyxa yes, stupid wording
09:18:04Araqmaybe it's not because of NaN though
09:18:08flyxgcd on natural numbers can always return at least 1
09:18:15Araqbut this shouldn't matter here
09:18:40Araqno, wait NaN * 1.0 == NaN
09:18:40bluenoteflyx: and the machine epsilon for floats
09:18:41flyxon floating points, I think it's a problem that you cannot at least return the neutral element
09:18:48Araqso still neutral
09:18:54flyxhmm
09:19:04flyxperhaps it's possible
09:19:43flyxbut is the float epsilon really a common divisor for all floats?
09:19:57bluenoteif not, it is some fraction of it :)
09:19:57flyxI think not, because the distance between two floats varies
09:20:16bluenotethat is what I was wondering before, but you can divide it further
09:20:39bluenoteokay, you cannot represt that number ;)
09:20:42flyxit's an interesting mathematical question
09:20:44bluenoterepresent*
09:22:05flyxhttp://stackoverflow.com/questions/14297515/calculating-greatest-common-divisor
09:22:17flyxthe answer shows the issue, I think
09:22:36bluenotebtw: I get "reasonable" results for some values, probably such values which can be encoded precisely as IEEE float
09:22:38flyx1.0 is actually 1.0 in exact representation, but 1.2 is not exactly 1.2
09:22:53flyxso you wouldn't get 0.2 as gcd if you calculate it
09:23:10*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:23:32bluenoteyes that what I think as well
09:24:01Araqdoes it work for 1.0 and 0.25 ?
09:24:19bluenoteAraq: yes
09:24:22flyxyes
09:24:30borkothere is an algorithm for finding a rational that is equal to the decimal representation of a float, for any float.
09:24:33bluenoteprobably any mutliple of 2 is okay
09:24:45Araqyup
09:25:09borkothat would be one way to get somewhat meaningful results I guess
09:26:00flyxany two numbers work as long as the mantisse is 1.
09:26:25flyxor one mantisse is a fraction of the other
09:26:52flyxor the gcd of the two mantissa can be represented as mantisse exactly
09:29:30borkoso, say, "rationalize(5.1) --> 51/10"
09:29:34bluenoteI even see use cases for the current gcd implementation: if gcd(f1, f2) >> epsilon you know that f1, f2 have a "compatible representation" and you may reorder certain computations in a way to maximize numerical stability -- I admin, very fancy, but still "useful" :)
09:31:02borkoShould it at least be documented in some way, or is the current documentation enough?
09:31:45Araqborko: feel free to improve the docs
09:32:23borkoAraq: I might do it if I knew what to write there :) I came here with my queston _exactly_ because I was confused
09:32:24Araqrationalize("5.1") --> 51 / 10 can work easily, with floating point it's much harder
09:34:23borkoAraq: there is an established way to do it though; see for example the SWI-Prolog implementation of "rationalize" https://github.com/SWI-Prolog/swipl-devel/blob/master/src/pl-arith.c#L2056
09:35:15borkoAraq: the nice thing about this is that it cites its references :)
09:38:04borkoAraq: this is a bit too far off topic though; back to the original issue: should I A) forget about it; B) improve the documentation by pointing out it works with floats; C) open an issue on github to discuss how to deal with it? D) None of the above
09:38:53Araqthere are real costs associated with ~460 open issues
09:39:17Araqso not yet another minor issue we ignore for years please
09:39:25Araqmake a PR or do (A)
09:41:35borkoAraq: pull request with the updated docs? forcing the gcd to only work with ordinals? implementing `rationalize` and using it if an argument is float?
09:41:56Araqpull request with updated docs
09:42:04borkoAraq: good
09:57:54*Beluki joined #nim
09:58:45BelukiHi. Is there anything in the stdlib to read a keypress from the terminal without displaying it?
10:02:00AraqBeluki: terminal.nim has some support for that iirc
10:02:38BelukiI found most of what I was looking for in that module (writing text at arbitrary cursor positions) but nothing for reading.
10:03:27BelukiMmm, actually, maybe styleHidden can help.
10:04:16Araqthere is also rdstdin.readPasswordFromStdin
10:05:24Araqbtw this "let's display *nothing* " is a usability pita
10:05:59BelukiUnfortunately, I need to read a single character.
10:06:13BelukiMy use case is a simple sokoban terminal game.
10:06:45BelukiI don't need anything beyond reading without echo and printing at arbitrary positions, which terminal does provide.
10:06:50Araqwhen not defined(windows):
10:06:51*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:06:52Araq proc getch*(): char =
10:06:53Araq ## Read a single character from the terminal, blocking until it is entered.
10:06:55Araq ## The character is not printed to the terminal. This is not available for
10:06:57Araq ## Windows.
10:06:57*borko quit (Quit: Leaving)
10:07:25Araqso terminal.nim has it
10:08:10BelukiOh, so it wasn't in the doc then. I'll have a look at the source.
10:08:20Araqyeah, fixing it
10:08:34*JoshuaT quit (Quit: My Mac has gone to sleep. ZZZzzz…)
10:11:05*banister joined #nim
10:12:22*dddddd joined #nim
10:18:00*iamd3vil quit (Quit: Page closed)
10:18:43*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:19:03*datanoise joined #nim
10:22:19bluenoteany macro guru around? I have the following problem: https://gist.github.com/bluenote10/3787977625e6bf63e6af
10:22:43bluenotein a macro I have a string, which I want to parse and determine the type of this expression
10:23:22bluenotebut either parseExpr(s).getType and parseStmt(s).getType result in "node has no type"
10:23:43Araquse macro m(x: typed)
10:24:05Araqoh hrm
10:24:22Araqwell yes, parseExpr nor parseStmt do the semchecking for you
10:24:24bluenotebut what if I really have a string, not the original expression
10:24:29Araqso these indeed have no type
10:24:59bluenoteI though parseStmt would be the correct way, since stmt == typed and expr == untyped
10:25:19Araqwell good idea but that's not how it works
10:25:20BelukiAraq: given the getch() definition for non-windows systems in terminal.nim, should this suffice to support windows: proc getch*(): WINBOOL {.stdcall, dynlib: "msvcrt", importc: "_getch".} ?
10:25:45*mahlon_ quit (Read error: Connection reset by peer)
10:25:46AraqBeluki: if it were that easy we would have done it
10:26:05*CARAM__ quit (Ping timeout: 252 seconds)
10:26:30BelukiWhat could be the potential problems? it seems to be working (at least for some definition of "working")
10:26:31*Quora quit (Remote host closed the connection)
10:26:33Araqbluenote: you can do it with some nested macro application
10:26:43*thotypous quit (Ping timeout: 256 seconds)
10:27:06*dalarmmst quit (Ping timeout: 272 seconds)
10:27:06*JStoker quit (Ping timeout: 272 seconds)
10:27:06*Roin quit (Ping timeout: 272 seconds)
10:27:08AraqBeluki: msvcrt might not have it iirc
10:27:16Araqbbl
10:27:17*banister quit (Ping timeout: 256 seconds)
10:27:19*mahlon_ joined #nim
10:27:20bluenoteyou mean some sort of nested `macro m(x: typed)`
10:27:29bluenotek, cya
10:27:42*someplace quit (Ping timeout: 256 seconds)
10:27:56*fold quit (Ping timeout: 265 seconds)
10:28:50*EastByte quit (Ping timeout: 256 seconds)
10:29:00*Amrykid quit (Ping timeout: 272 seconds)
10:29:46*JStoker joined #nim
10:29:50*Roin joined #nim
10:29:53*thotypous joined #nim
10:30:11*Amrykid joined #nim
10:30:26*CARAM__ joined #nim
10:30:32*Heartmender joined #nim
10:30:53*Heartmender is now known as Guest67556
10:31:42*someplace joined #nim
10:32:46*delian66 quit (Ping timeout: 265 seconds)
10:32:46*datanoise quit (Ping timeout: 258 seconds)
10:33:44*ekarlso quit (Ping timeout: 265 seconds)
10:34:05*delian66 joined #nim
10:34:07coffeepotI want to process a simple ini file in windows - parsecfg the tool for the job?
10:34:21coffeepotor is there something more specific to ini's
10:36:31Belukicoffeepot: parsecfg should be fine (in fact, it's what nimble uses to read ini files).
10:37:49coffeepot:) ace
10:37:52coffeepotthanks
10:38:59*Ven joined #nim
10:41:52*ekarlso joined #nim
10:45:16*ekarlso quit (Changing host)
10:45:16*ekarlso joined #nim
10:47:37*Jehan_ joined #nim
10:53:51*bjz joined #nim
10:55:29*EastByte joined #nim
10:58:59*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:59:24*bjz quit (Ping timeout: 246 seconds)
10:59:47*ddl_smurf joined #nim
11:07:09*Demon_Fox quit (Quit: Leaving)
11:08:34*wb joined #nim
11:10:26bluenoteAraq: I tried a few things with nesting macros (e.g. passing the result of parseStmt to a macro which takes a `typed` parameter) but I could not get it to work
11:10:59*Ven joined #nim
11:10:59bluenoteI also saw that filwit had exactly the same question before on IRC, so I though it is a good idea to ask this in the forum instead
11:11:30*davidhq joined #nim
11:23:53*bjz joined #nim
11:26:01*bjz quit (Read error: Connection reset by peer)
11:26:40*bjz joined #nim
11:32:00*Kingsquee quit (Quit: Konversation terminated!)
11:38:39*davidhq_ joined #nim
11:40:14*davidhq quit (Ping timeout: 245 seconds)
11:55:52*Beluki quit (Quit: Beluki)
11:58:59*datanoise joined #nim
12:04:07*datanoise quit (Ping timeout: 265 seconds)
12:07:47OnOhow to raise compile time error on: when not declared(XXXX)
12:08:09OnOif I use error "msg" I get Error: 'error' can only be used in compile-time context
12:08:19OnObut isn't where: compile time context?
12:09:57*HakanD joined #nim
12:11:11Jehan_Use {.error: "....".}
12:11:26bluenoteproc checkDef(s: string): bool {.compiletime.} =
12:11:34bluenotewhen checkDef("test"):
12:11:49bluenotewould also work
12:12:06bluenoteand place an error in the checkDef proc
12:17:02*Jehan_ quit (Quit: Leaving)
12:21:06OnOokay, thanks {.error...} works, yet it is pretty weird... okay wouldn't be simplier to make error "..." work same as {.error "...".}
12:22:52coffeepotregarding tables, Is it correct to use initTable to clear a table that's already full of data?
12:24:53coffeepotbtw is there a #nim-noobhelp or something, hope I'm not crapping up the IRC channel with my noobian queries :D
12:25:09*fold joined #nim
12:56:23*HakanD_ joined #nim
12:56:24*HakanD quit (Read error: Connection reset by peer)
12:56:47OnOis there any other way to bind proc to the class type (not instance) than use 1st arg of typedesc[Class] ?
12:58:05OnOI am having blocking issue of https://github.com/Araq/Nim/issues/2662
12:58:21OnOcalling: iterator it(T: typedesc[Base]) with any subtype of Base crashes compiler
13:01:08r-kuOnO: you cant do it any other way
13:03:45*mrkishi joined #nim
13:06:57AraqOnO: fix it ;-)
13:08:14OnOAraq: I have absolutely no clue what happens there, there no description of purpose of getUniqueType
13:08:47OnOneither clear description of the error, it is just "internal error"
13:09:00Araqit doesn't matter, getUniqueType doesn't like tyTypeDesc so you need to ensure it's not passed to that
13:09:35Araqthe problem is that your typedesc[Class] ends up in the codegen for some reason
13:09:45*jfchevrette joined #nim
13:09:47Araqbut since it's irrelevant for codegen, this fails
13:11:10*kashyap_ quit (Ping timeout: 246 seconds)
13:13:34*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:17:02Araqbtw getUniqueType ensures that type((1, 2)) and tuple[x, y: int] produce the same C struct since these need to be compatible
13:17:20Araqand structs in C use nominal typing, not structural typing
13:17:23*HakanD_ quit (Quit: Be back later ...)
13:18:00OnOwell.. okay, so the hint is that for some reason it is triggered for iterator but not for regular proc
13:19:19reactormonkAraq, could you take a look at https://github.com/Araq/Nim/pull/2680 again? nimsuggest is still broken for non-main files, but that's another issue
13:19:26OnOoh soo sweet, it even crashes on methods :)
13:19:46OnOmethod me(T: typedesc[Base]) = echo "method call from " & T.name; Child.me -> Error: internal error: expr: param not init T_91093
13:21:29*Guest67556 quit (Changing host)
13:21:29*Guest67556 joined #nim
13:21:29*Guest67556 quit (Changing host)
13:21:29*Guest67556 joined #nim
13:21:34*Guest67556 is now known as Quora
13:23:00Araqreactormonk: I see you fixed your import mess
13:25:15Araqresult.symkind = parseEnum[TSymKind](renderTree(...) wtf?
13:25:34*HakanD_ joined #nim
13:25:38reactormonkthat's copypasta.
13:26:00reactormonklemme pull out the old version
13:28:22pigmejAraq: nimsuggest seems broken even in 'mainline version'
13:28:45Quorait'd be nice to have a compiler flag that fails compile on unused imports
13:28:46reactormonkpigmej, that's a different fix with not enough resetting / too much caching I would believe
13:29:11pigmejprobably
13:29:51AraqQuora: true but it doesn't bloat your exe anyway
13:29:52reactormonkQuora, we already have a warning for unused symbols, maybe you can extend it to imports
13:31:58QuoraAraq: yeah, it's more of a personal style thing
13:37:03reactormonkAraq, ok, removed your WTFs. I just copied them over from the old nimsuggest
13:38:02Araqreactormonk: that's reassuring. so I take from that you don't test anything?
13:38:23dom96I think reactormonk should implement this on top of nimsuggest
13:38:32dom96as a separate package
13:38:51Araqno it's fine in nimsuggest
13:38:55Araqif it works
13:39:48dom96It just adds to the things we need to maintain though.
13:40:13dom96NimSuggest needs to at least be moved out of the Nim repo already.
13:40:26reactormonkAraq, I tested this one hell of a lot. Although only from the emacs side, so no automated tests.
13:40:42reactormonk... that's also how I found https://github.com/Araq/Nim/issues/2694
13:40:54reactormonkalso, I was like "works, don't touch it", because that's how the old nimsuggest did it
13:41:41Araqdom96: nimsuggest uses the compiler
13:41:51Araqit's a variant of the compiler
13:42:02Araqcannot be a separate package
13:42:04reactormonkAraq, that's what we should have the compiler nimble package for... but it's kinda not working IIRC
13:42:41reactormonkI ran the ./koch tests c caas and checked testresults.html, but no errors reported, so I hope it works
13:42:52dom96Araq: Yes, it can.
13:42:56dom96Araq: The compiler is a package.
13:43:31dom96You told me to create this https://github.com/nim-lang/nimsuggest
13:43:32pigmejAraq: it crashes in aporia in the same way
13:43:33dom96IIRC
13:43:40pigmejso emacs ir really no issue there
13:43:41dom96and then I could never get it to work
13:44:47Araqreactormonk: 'tests c caas' doesn't do anything, we have no tests for nimsuggest yet
13:45:04*vikaton joined #nim
13:45:07reactormonkAraq, ah fuck.
13:45:57Araqpigmej: well yes
13:46:21Araqworked for me when I tested it, not sure what happens here
13:46:36pigmejAraq: have you seen my aporia description ?
13:46:41pigmejthe case with aporia
13:48:03dom96pigmej: what is the description?
13:49:43reactormonkdom96, https://github.com/Araq/Nim/issues/2694
13:49:55pigmejyeah exactly this:)
13:55:45*Perelandric joined #nim
13:55:58Quorais there a way to have nimble build multiple binaries?
13:56:10Quoraor have multiple source directories
13:56:36AraqI don't think so
13:56:42*Ven_ joined #nim
13:59:17dom96there is
13:59:26dom96just specify multiple bin = "foo"
13:59:30dom96or separate by commas
13:59:37dom96you can't have multiple source dirs though
13:59:48dom96bbl
14:04:08*JoshuaT joined #nim
14:04:43OnOAraq: I give up, there is nkHiddenSubConv when I pass subclass to Base to typedesc[Base], there is some magic then in transformFor that triggers newSymNode and newAsgnStmt, and finally leads to getUniqueType with tyTypeDesc that causes internal error
14:07:32AraqOnO: well why "give up"?
14:07:52Araqas you noticed there are several solutions to fix this bug
14:08:23Araqone is to not make transf produce a newAsgnStmt when it's a "typeDesc"
14:09:10Araqthere is types.isCompileTime(t) you can use to check for that iirc
14:09:41AraqisCompileTimeOnly
14:10:44OnOactually this is not fault of "for transf" cause it does paDirectMapping on TypeDesc
14:11:04*endragor quit (Ping timeout: 255 seconds)
14:11:06OnObut before overload method wraps the call with HiddenSubConv
14:11:17OnOthis effectively triggers paFastAsgn there
14:12:01OnOmaybe HiddenSubConv should never apply to compile time types?
14:13:55*jfchevrette left #nim ("Textual IRC Client: www.textualapp.com")
14:14:10OnOcalling directly Base we get AST of: ForStmt(Sym(s), Call(Sym(it), Sym(Base)), ....
14:14:26OnOcalling with subclass we get: ForStmt(Sym(s), Call(Sym(it), HiddenSubConv(Empty(), Sym(Child))), ...
14:15:18OnObtw. HiddenSubConv is bugged, not displaying type we are casting to
14:15:42OnOanyway, does casting types (not variable) make sense at all?
14:16:30*vikaton quit ()
14:17:42*BitPuffin joined #nim
14:20:40*vikaton joined #nim
14:26:18*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:26:46AraqOnO: it doesn't
14:29:00OnOso my reasoning is right, it should only apply to instances of the types not types (typedesc) itself?
14:29:15OnOthen I'll try to remove this implict HiddenSubConv on overload
14:31:22Araqgood idea, yeah
14:44:44*darkf quit (Quit: Leaving)
14:47:57*datanoise joined #nim
14:49:27*Andris_zbx quit (Remote host closed the connection)
14:52:54*Xe left #nim (#nim)
14:54:56*Xe joined #nim
14:57:16*Ven_ joined #nim
15:01:26*vikaton quit ()
15:03:07OnOAraq: here you go: https://github.com/Araq/Nim/pull/2708
15:04:01AraqOnO: looks good, please add tests though
15:04:10Araqalso ensure this fixes the 'method' bug too
15:04:15OnOit doesn't
15:04:19Araqdamn
15:04:23OnOmethod thing is something else
15:04:25AraqI hoped it would
15:04:29OnOme too
15:04:54OnOfor method it actually get through compiler and fails at c compiler level
15:05:33OnOokay, need to pick my son from kindergarten, will be back in 30 min
15:09:23*HakanD_ quit (Quit: Be back later ...)
15:12:26*Strikecarl joined #nim
15:14:50QuoraHow do I use source code filters?
15:15:06*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
15:15:34*MightyJoe joined #nim
15:18:13*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:18:42Quoraah
15:18:45Quoravia include
15:19:07*ingsoc quit (Quit: Leaving.)
15:23:01*Jesin quit (Quit: Leaving)
15:25:02*Marethyu joined #nim
15:27:08*ingsoc joined #nim
15:27:23AraqQuora: er no?
15:27:27Araqvia #!
15:27:37Araqah sorry, yeah via include
15:29:37MarethyuHello! I'm new into Nim and I'd like to know how to transform a string into an array or sequence, like .split() in Python. Thanks in advance
15:29:57QuoraMarethyu: import strutils, "foo bar".split(" ")
15:30:59MarethyuVery easy. Thanks !
15:45:52*Marethyu quit (Ping timeout: 246 seconds)
15:48:39*MightyJoe is now known as cyraxjoe
15:52:01*HakanD_ joined #nim
15:52:23Quoradom96: how do I get jester to listen on not 127.0.0.1?
15:54:10*arnetheduck quit (Ping timeout: 244 seconds)
15:57:48*davidhq joined #nim
16:01:06*Ven_ quit (Ping timeout: 246 seconds)
16:01:28*davidhq_ quit (Ping timeout: 256 seconds)
16:07:53*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:09:00*gsingh93 joined #nim
16:20:45*yglukhov___ quit (Ping timeout: 276 seconds)
16:24:51*johnsoft quit (Ping timeout: 256 seconds)
16:25:42*johnsoft joined #nim
16:32:25*bluenote quit (Ping timeout: 246 seconds)
16:38:54*HakanD__ joined #nim
16:42:13*HakanD_ quit (Ping timeout: 244 seconds)
16:46:02reactormonkAraq, what do you want to merge https://github.com/Araq/Nim/pull/2564 ?
16:46:32*jholland joined #nim
16:51:15*banister joined #nim
16:51:50*Jehan_ joined #nim
16:58:21*Demos joined #nim
17:02:14*wb quit (Ping timeout: 258 seconds)
17:02:39*wb joined #nim
17:03:31Araqreactormonk: looks good, should I merge?
17:05:02reactormonkAraq, I've hever actually run it all the way :-/
17:05:07reactormonk... lemme do that first
17:06:03reactormonkah fuck, gotta merge first
17:06:47Jehan_:)
17:11:42OnOAraq: added tests, but not fix for `method` :> it's not a blocker for me, anyways I filled new bug report #2710 for that one
17:11:44OnOhttps://github.com/Araq/Nim/pull/2708
17:15:17*gsingh93 quit (Ping timeout: 256 seconds)
17:18:21*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:20:19*yglukhov____ joined #nim
17:24:01AraqOnO: excellent
17:30:41*BitPuffin quit (Ping timeout: 252 seconds)
17:31:52reactormonkAraq, oh duh, the C test doesn't work.
17:37:30*TEttinger quit (Ping timeout: 244 seconds)
17:38:19reactormonkAraq, What does {.noSideEffect.} do exactly? Does it make a proc not to have side effects or does it actually require all called procs inside that proc not to have side effects?
17:39:59Demosit checks it for you
17:40:12reactormonkok
17:40:25Demosunless it's also marked with {.importc.} afaik
17:47:29*HakanD__ quit (Quit: Be back later ...)
17:51:41*Perelandric quit (Quit: Page closed)
17:52:17Araqthat is correct, importc + noSideEffect changes the meaning from "assure" to "assume"
17:52:27*Perelandric joined #nim
17:54:33*Strikecarl joined #nim
17:54:38StrikecarlWhat lib is "shellExecute" in?
17:54:52dtscodeos?
17:55:06StrikecarlNope.
17:55:14StrikecarlEither nope or i am typing it wrong
17:55:22Strikecarl"shellExecute(stuff here)"
17:55:43*shodan45 joined #nim
17:55:55dtscodeis it execShellCMD?
17:56:12Strikecarlmight be, let me test
17:56:35dtscodeits the closest thing in the stdlib to what you are asking for.
17:56:59StrikecarlWelp, i wanna do "launch Powershell.exe"
17:57:19dtscodehttp://nim-lang.org/docs/theindex.html According to this shellExecute doesn't exist
17:57:21StrikecarlDoesnt work tho, as "powershell.exe" isnt found, do i have to manually make a string to tell it its here?
17:57:54dtscodeUmmmm try making the shell the main process being launched, and pass powershell.exe as an argument.
17:58:22StrikecarlGot it to work tho, ty
17:58:39dtscodenp
18:11:28*HakanD__ joined #nim
18:12:34dom96Quora: Don't think you can currently.
18:13:23*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
18:13:37Quoradom96: it'd be nice if you could
18:14:17Quorathat support not existing is currently a blocker to deployment :<
18:14:18reactormonkAraq, ok, ready to merge
18:15:46*Marethyu joined #nim
18:16:16*iamd3vil joined #nim
18:17:28MarethyuI'd like to know the equivalent in Nim of the Python ":" like in variable[1:] to get the variable without, for example, its first char. Could someone help me, please ?
18:18:12iamd3vilHow can I use to httpclient module to download a file using a SSL connection on windows? Even though I have installed Openssl on windows it's saying that it could not load ssleay32:libss132.dll
18:19:20Quorainstall libssl132.dll?
18:19:48*redwyn_ joined #nim
18:21:42MarethyuMy question isn't difficult for someone experimented. No one ? ;(
18:22:12QuoraMarethyu: foo[1 .. ^1]
18:22:32iamd3vilWhere do I have to keep the dll? Sorry if this is stupid.
18:23:13MarethyuQuora: That's how it works... Thanks a lot!
18:24:09*HakanD__ quit (Quit: Be back later ...)
18:24:36*HakanD__ joined #nim
18:25:24iamd3vilI have the dll's in my System32 folder. Do I have to do something else to make it work?
18:25:50Araqiamd3vil: don't put them in system32. put them next to your .exe instead.
18:29:08*HakanD__ quit (Ping timeout: 264 seconds)
18:33:21iamd3vilEven though I am keeping the dlls next to my exe file, it's saying the same thing. I am compiling with -d:ssl switch by the way.
18:33:37*redwyn_ quit (Quit: leaving)
18:35:10Araqiamd3vil: use the 32 bit Nim compiler please. 64bit DLLs are hard to come by
18:35:31Araqespecially for gnu open source stuff
18:35:45iamd3vilAraq: I have tried with another dll. It's working now.Thanks.
18:36:07Araqyou have a 64bit DLL for SSL?
18:36:12Araqwhere can I find it?
18:36:32AraqI package 32 bit nimble with the 64bit Nim for these reasons
18:36:48Araqwould be cool if we could get a proper 64 bit version
18:37:43iamd3vilI don't think it's a 64 bit dll but I have found the dll from http://indy.fulgan.com/SSL/
18:40:04Araqnice thanks
18:40:15Araqseems to have 64bit DLLs
18:40:23*vinnie quit (Remote host closed the connection)
18:40:42Araqwhich are conveniently called "libeay32.dll" and "ssleay32.dll" ...
18:41:13Araqoh well at least there are vowels in the name
18:41:30OnOany way to iterate through field names of object type in macro?
18:41:47OnOthe problem is that fieldPairs needs istance :(
18:42:51AraqOnO: macros.getType
18:44:47*MyMind joined #nim
18:45:43OnOAraq: but if macro takes T: typedesc, how do I turn it into NimNode of type ?
18:45:57*fizzbooze joined #nim
18:46:25Araqthe macro's parameter types lie
18:46:39Araqwithin the macro every parameter is of type NimNode
18:46:49*iamd3vil quit (Ping timeout: 246 seconds)
18:49:00OnOhmm... I am confused look: macro ma(T: typedesc[Model]): stmt = getType(T)
18:49:09OnOcauses: test.nim:9:45: Error: type mismatch: got (typedesc[Model]) but expected one of: macros.getType(n: NimNode)
18:49:27OnOso T is not NimNode
18:51:00*vinnie joined #nim
18:53:15Araqinteresting. maybe zahary special cased typeDesc[] for macros for reasons that escape me
18:53:15*pluizer joined #nim
18:54:25pluizerHello I'm new to Nim; I get a refence error to HEX2EHEX2E_14015 from code compled to js. Google can't help me, Am I doing something wrong?
18:54:33pluizerhttp://pastebin.com/xWuS1E5B
18:54:46OnOokay I think I can circumvent it via extra compile time proc...
18:54:55OnONim metaprogramming is hard but fun
18:56:15*gyeates joined #nim
18:57:01*Marethyu quit (Quit: Page closed)
18:58:13Araqpluizer: the Nim code that produces this result woudl be helpful too
19:02:18pluizerone moment
19:04:51pluizerAraq: Is was just a little example I tried: http://pastebin.com/J4BbSVuc
19:06:29*brson joined #nim
19:06:55*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
19:13:18OnOhmmm... why te heck bindSym does not work with string in macro
19:13:19*mnemonikk quit (Ping timeout: 265 seconds)
19:13:28OnOit just accepts string literal
19:13:34*gyeates quit (Ping timeout: 256 seconds)
19:14:09Araqpluizer: seems like the JS codegen cannot handle '..'
19:14:51AraqOnO: because the point is to lookup the symbol in the macro's scope/context
19:15:19Araqand not in some ill-specified scope
19:15:24OnOokay, I thought I nailed it but still cannot convert typedesc macro parameter to NimNode of type
19:16:46AraqOnO: fix it. semtypes.nim, line 691
19:16:58Araqjust remove that special case
19:17:10*heinrich5991 quit (Quit: quit.)
19:17:19*gsingh93 joined #nim
19:17:24Araqand IMO the special case for static[T] needs to go too
19:18:09*mrkishi quit ()
19:20:13*HakanD__ joined #nim
19:23:35*filcuc joined #nim
19:24:00OnOAraq: here is the commit that introduced that in 2012! badb6c0f665e22bff77d91bb2f64f195110b9887
19:24:06OnOdid a little blame investigation
19:24:16*strcmp1 quit (Ping timeout: 255 seconds)
19:24:44OnOanyway I believe passing typedesc to macro directly non as NimNode is completely useless
19:25:14*jholland quit (Quit: Connection closed for inactivity)
19:28:27*heinrich5991 joined #nim
19:30:52pluizerAraq: thx
19:39:34*gyeates joined #nim
19:40:55*MyMind quit (Ping timeout: 256 seconds)
19:44:53*pluizer quit (Ping timeout: 256 seconds)
19:46:12notfowlThat's not the issue
19:46:39notfowlIf the param was " typed" you can pass in a typedesc fine
19:47:06notfowlO I see
19:53:56*fizzbooze quit (Ping timeout: 272 seconds)
19:54:31OnOor we should expose some function that turns typedesc into NimNode
19:54:38OnOmaybe via NGetType
19:56:02notfowlNo make the fix Araq said, typedesc isn't useful inside a macro
19:57:35OnOactually declaring proc getType*(t: typedesc): NimNode works, huh
20:00:11*d3m1gd quit (Ping timeout: 256 seconds)
20:07:52*xificurC quit (Remote host closed the connection)
20:13:43OnOactually it works by pure luck returning BracketExpr(Sym(typeDesc), Sym(User))
20:14:04OnOso I think we need proper way to cast typedesc to NimNode
20:14:13OnOthat would be best solution
20:17:07*xificurC joined #nim
20:17:25OnOhmmm.. or maybe bracketExpr(Sym(typeDesc), Sym(User)) is actually valid result
20:19:04*notfowl quit (Excess Flood)
20:19:12*notfowl joined #nim
20:19:12*notfowl quit (Changing host)
20:19:12*notfowl joined #nim
20:24:32*banister joined #nim
20:28:14*Jehan_ quit (Quit: Leaving)
20:38:36OnOmade new PR introducing typeNode(t: typedesc): NimNode helper
20:42:40*pregressive joined #nim
20:47:22*strcmp1 joined #nim
20:48:51*redwyn joined #nim
20:51:34*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:53:42notfowlOnO: ? Yes that is rigjt
20:54:42*Jehan_ joined #nim
20:55:44notfowlTypedesc[type] is how it comes through
20:57:02notfowlOnO: examples how to use Gettype. https://gist.github.com/fowlmouth/3c74409c30533bb0a5b4
20:58:18OnOI know how to use it, problem was it was expecting NimNode
20:58:29OnObut macro was getting typedesc instead
20:58:53notfowlAnd instead of fixing the broken behavior you leave it for another person to stumble on
20:58:54OnOall parameters to macro except static and typedesc are implicitly converted to NimNode
20:59:09OnOthis is not broken behavior
20:59:18OnOit is okay that typedesc are passed as is
20:59:21OnOto macros
20:59:34notfowlWhy is it OK? How do you use the parameter?
20:59:55OnOmacro where*(T: typedesc[Model], st: untyped): expr =
21:00:07OnOin macro body T is NOT NimNode
21:00:13OnObecause of that exception
21:00:26notfowlRight so how do you *use* it
21:00:31notfowlHow is it useful?
21:00:34*vikaton joined #nim
21:00:37OnOthanks to that I can call other procs that expect typedesc[Model]
21:00:43OnOfrom macro itself
21:00:55notfowl...k
21:01:01notfowlBack to mowing the grass
21:02:07OnOI don't know real reason this exception was introduced in 2012 :) but this is how I use it
21:02:25*ELFrederich_ joined #nim
21:02:42OnOstill it is important to be able to get NimNode out of typedesc :> because you may use it to something else
21:03:16OnOactually I like it because I have the both embodiments of "type" parameter
21:05:36filcuchi all,
21:05:38*jsjoberg_ joined #nim
21:05:47filcuci've started a QtCreator plugin for Nim
21:05:48filcuchttps://github.com/filcuc/QtCreatorNimEditor
21:06:03filcuci don't know how it will end...but let's see :)
21:06:27*JoshuaT_ joined #nim
21:07:11OnOnotfowl: take a look at now working sweet sample of my new ORM: https://github.com/nanoant/nim-orm/blob/master/tests/expr2sql.nim
21:07:28*dhasenan joined #nim
21:08:32*banister joined #nim
21:08:36*banister quit (Max SendQ exceeded)
21:09:41*ekarlso quit (Ping timeout: 250 seconds)
21:09:41*dhasenan_ quit (Ping timeout: 250 seconds)
21:09:41*jsjoberg quit (Ping timeout: 250 seconds)
21:09:41*ChrisMAN quit (Ping timeout: 250 seconds)
21:09:41*egrep quit (Ping timeout: 250 seconds)
21:09:41*JoshuaT quit (Ping timeout: 250 seconds)
21:09:42*ELFrederich quit (Ping timeout: 250 seconds)
21:09:42*TheManiac quit (Ping timeout: 250 seconds)
21:09:42*dewdrop quit (Ping timeout: 250 seconds)
21:09:42*xender quit (Ping timeout: 250 seconds)
21:09:42*TheManiac joined #nim
21:10:54*xender joined #nim
21:11:03*ChrisMAN joined #nim
21:11:17*ekarlso joined #nim
21:15:48notfowlOnO: it is east to fetch the symbol representing the typedesc or the type itself from the result of Gettype
21:16:06notfowlBut maybe you rely on dispatching on the typedesc param. Idm
21:16:12notfowlIdk*
21:17:36OnOexactly, I rely on that
21:18:55*redwyn quit (Quit: leaving)
21:19:32*Demos quit (Read error: Connection reset by peer)
21:19:41*filcuc quit (Read error: Connection reset by peer)
21:20:04*filcuc joined #nim
21:20:36notfowlDid you try calling typenode gettype? It should work as an overload
21:21:19*Siecje joined #nim
21:21:56OnOno it does not, it complains of incorrect argument type, expected NimNode
21:22:15*transfuturist joined #nim
21:22:18OnOso AFAIK there is no implicit conversion to NimNode
21:22:49*filcuc quit (Remote host closed the connection)
21:23:10ZZZZZZZZZbrson: intruder alert!
21:23:57*filcuc joined #nim
21:24:22notfowlOnO: did you try an overload or not
21:25:19OnOwhat overload!? I don't understand, getType proc expect NimNode, it does not accept typedesc
21:25:29notfowlSigh
21:25:42notfowlIf you named typenode "gettype" it would be an overload
21:26:29notfowlThere would be two gettype functions that refer to the same magic function
21:26:53OnOthis is what I did, typeNode points to same magic function as getType
21:27:03notfowlGood lord
21:27:07OnOI confused VM call overloading with function overloading
21:27:10OnOwhat?
21:27:19notfowlThat's not an overload
21:27:24notfowlIts a different function
21:27:36OnOI don't get you, honestly
21:27:44notfowlI'm asking if dispatching can fix this rather than. Having a function just for typedescs
21:29:20transfuturistvarargs doesn't seem to work for macros
21:29:55OnOdeclaring proc with same or different name but with same magic identifier has exactly same effect
21:30:43transfuturistError: type mismatch: got (NimNode) but expected one of: system.items(a: openarray[T]) ...
21:31:33OnOnotfowl: because it emits exactly same VM call... so I don't understand what is has to do with overloading anything
21:31:51transfuturistwhen calling the macro, the only argument that gets passed is the very first
21:31:59transfuturistthis is kind of broken now
21:32:29OnOtransfuturist: show me the macro declaration
21:32:53VarriountHello Nim'sters
21:32:55OnOtransfuturist: I use varargs for macros and they work pretty ok
21:33:00*yglukhov____ quit (Quit: Be back later ...)
21:33:08notfowlVarargs will be bound in brackets
21:33:46transfuturisthttp://pastebin.com/5a3RGD3A
21:33:52notfowlOnO: dude. That's what you do in your pr
21:34:28OnOnotfowl: :)) sorry we are probably lost in translation
21:34:37OnOnotfowl: what was your question again?
21:34:43transfuturistit matches the syntax in http://nim-lang.org/docs/manual.html#macros-expression-macros
21:35:16notfowlOnO: nvm let me see when I'm done with my errands
21:36:11transfuturistvarargs shouldn't have to be bound in brackets; that's the point of varargs sugar
21:37:14*NimrodBot joined #nim
21:37:23*NimrodBot quit (Read error: Connection reset by peer)
21:37:59*NimrodBot joined #nim
21:38:10*NimrodBot quit (Read error: Connection reset by peer)
21:38:29*NimrodBot joined #nim
21:38:32*NimrodBot quit (Read error: Connection reset by peer)
21:41:28notfowltransfuturist: so what node should they be in?
21:42:02transfuturist...
21:42:10transfuturistno
21:42:12transfuturistthe sugar doesn't work
21:42:15transfuturistmodules ([socket, foobar])
21:42:20transfuturistthat's how i have to write it
21:43:27OnOtransfuturist first of all use untyped instead {.immediate.} pragma which is kind of obsolete
21:43:47OnOmacro modules*(i: untyped): stmt
21:44:45transfuturistyeah, that doesn't work.
21:45:31OnOahh... I see... indeed it doesn't work
21:46:12OnOyou neither can have: macro modules(n: varargs[untyped]): stmt
21:46:32transfuturistuntyped doesn't work either, that's not really relevant to varargs
21:46:50OnOduh, but I understand you want to have unevaluated AST
21:46:55OnO?
21:47:13transfuturist{.immediate.} works.
21:48:28dom96Quora: Would the ability to specify the bind address be enough?
21:48:33OnOwell, it doesn't really, coz it is equvalent of: macro modules*(i: untyped): stmt
21:48:41OnOso i argument is just a 1st parameter
21:49:00OnO2nd and rest arguments are ignored
21:49:52OnOmacro modules*(i: varargs[expr]): stmt {.immediate.} = echo i.repr and calling modules(1, 2, 3, 4) -> echoes just 1
21:50:25OnOremoving immediate gives just what you want
21:50:45OnObut all arguments needs to evaluated first
21:51:08transfuturistwhich would be the problem, since i'm calling it on undeclared identifiers
21:51:25OnOthen I am afraid this is no go
21:53:22*gyeates quit (Ping timeout: 256 seconds)
21:53:25transfuturistit works with strings.
21:54:17OnOwhat do you mean?
21:54:34OnOstrings instead undeclared identifiers?
21:54:40transfuturistyes
21:55:13OnOyes, strings are just literals, there is no evaluation there
21:55:58transfuturistand non-vararg untyped works fine
21:58:35*filcuc quit (Quit: Konversation terminated!)
21:58:37Quoradom96: yeah, I'd like to bind on 0.0.0.0 for the deployment tools I use (containers)
21:58:51OnOyeah, this is because mutliple args to varargs is overload, and .immediate. turns off any evalution, but hey what about not using commas
21:59:00OnOmodules(a b c d) works with untyped
21:59:16*notfowl quit (Excess Flood)
21:59:26OnOgives funny AST, but you can pick the names from there: Command(Ident(!"a"), Command(Ident(!"b"), Command(Ident(!"c"), Ident(!"d"))))
21:59:39dom96Quora: I will add that for you.
21:59:48Quora:D
22:01:09*notfowl joined #nim
22:01:29*BlaXpirit quit (Quit: Quit Konversation)
22:01:47*vikaton quit ()
22:03:21transfuturistOnO: that is so hacky Dx
22:03:42notfowltransfuturist: there is another way around it
22:04:15notfowlUse a template that sends the varargs to a macro iirc
22:06:42transfuturisthow so?
22:07:09OnOnotfowl: would need to be immediate, and will bring same problem
22:08:39OnOactually there needs to be some case for macro varargs[untyped] argument
22:09:04*Siecje quit (Read error: Connection reset by peer)
22:09:11OnOcurrently it just checks for untyped, varargs[untyped] fails into "typed" category and gets evaluated :>
22:09:22transfuturistwhere in the code?
22:10:42transfuturistin the todo file: e needs to be some case for macro varargs[untyped] argument
22:11:22transfuturist special case varargs[untyped] and varargs[typed] *
22:12:13Varriountonionhammer: Merged in the new branch
22:12:42OnOtransfuturist: how nice, so you just need to push Araq or try to implement the feature yourself ;)
22:12:53transfuturistgiving it a go
22:12:54transfuturist:P
22:13:49transfuturistit uses magic, though, so i'm not sure where to look
22:14:24*Trustable quit (Quit: Leaving)
22:16:20OnOit's funny because currently "expr" === "untyped"
22:16:23Varriountonionhammer: All that remains is adding documentation for the new settings.
22:16:50OnOuntyped* {.magic: Expr.}
22:17:00OnOsame as expr* {.magic: Expr.}
22:17:07transfuturistha
22:17:23OnOso I presume this is some not yet finished stuff
22:18:44*JoshuaT_ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:19:23*notfowl quit (Excess Flood)
22:20:39*notfowl joined #nim
22:23:28*boop is now known as boopisaway
22:24:52OnOgood night everyone
22:24:54*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
22:25:47renesacone feature request I on't think is on the bug tracker is to allow named parameters after varargs
22:25:54renesac*don't
22:26:11renesaclike the pyhon 3 print function
22:31:44*pregressive quit (Remote host closed the connection)
22:32:05*pregressive joined #nim
22:32:53notfowlPython can do this because there are no overloads
22:34:19notfowlKnow of a language where you can define an accessor like this? `[]=` (obj; idxs: varargs[int]; val)
22:34:23transfuturistsome compiler internals docs sure would be nice
22:34:27*ekarlso quit (Changing host)
22:34:27*ekarlso joined #nim
22:35:55*pregressive quit (Remote host closed the connection)
22:37:56*datanoise quit (Ping timeout: 252 seconds)
22:38:29transfuturisthow could i find where the arguments to macros are evaluated...
22:40:21*cmk_zzz quit (Quit: Lost terminal)
22:40:26transfuturistevaltempl?
22:45:11*egrep joined #nim
22:45:52transfuturistsemexprs, line 2101
22:46:56Araqhey transfuturist
22:47:02transfuturistahoy hoy
22:47:03Araqany luck with DLL reloading
22:47:25transfuturistwell, i mean, it works pretty well by default
22:47:33transfuturisti'm trying to figure out a framework
22:48:33*pregressive joined #nim
22:49:41Araqtransfuturist: there are internals documented here: http://nim-lang.org/docs/intern.html
22:49:50transfuturist;_;
22:49:51Araqin particular: http://nim-lang.org/docs/intern.html#debugging-the-compiler
22:50:21Araqdoes that look mean you're aware of this?
22:50:58transfuturistoh, that has a guide on how to use git bisect
22:51:16transfuturistthat look means i forgot about it >>
22:55:45brsonZZZZZZZZZ: you caught me!
22:56:48Araqtransfuturist: what does that mean "it works pretty well by default"?
22:57:35Araqthe feature is about exposing some reloadDLL("foo.dll") builtin that does the reloading for all the procs which have been dynlib: "foo.dll"'ed
22:58:09*HakanD__ quit (Quit: Be back later ...)
22:58:19*notfowl quit (Excess Flood)
22:58:26transfuturistah, that's not required, though
22:58:41*HakanD__ joined #nim
22:58:44transfuturistinstead you can use symAddr to assign to procvars
22:59:09*notfowl joined #nim
22:59:27transfuturisti decided to do it outside the compiler, since the basic features are all there
23:01:32*gsingh93 quit (Ping timeout: 264 seconds)
23:02:12*amaur left #nim (#nim)
23:03:09*HakanD__ quit (Ping timeout: 245 seconds)
23:04:09Araqtransfuturist: yes but that doesn't help with all the wrappers that already use .dynlib. plus .dynlib is much easier to use anyway
23:04:40*gyeates joined #nim
23:05:05notfowlCan opengl s loading stuff be used
23:05:25transfuturistit would be nicer, but i'm just not good enough yet
23:05:59Araqtransfuturist: well the major problem is that you're in #nim when I'm sleeping
23:06:52transfuturistanyway, what I'm trying now is getting varargs[untyped] to work
23:07:08Araqok, that's nice
23:07:20Araqyou need to patch compiler/sigmatch.nim for that
23:07:34Araqand nothing else, I think
23:07:38transfuturistphew
23:07:41transfuturistthankds
23:08:25Araqnotfowl: I don't think so
23:20:13*brson quit (Quit: leaving)
23:20:21*brson joined #nim
23:21:19*brson quit (Client Quit)
23:21:33*brson joined #nim
23:29:34*pregressive quit (Remote host closed the connection)
23:29:40*Jehan_ quit (Quit: Leaving)
23:32:15onionhammervarriount awesome!
23:33:54*datanoise joined #nim
23:36:22*datanoise quit (Read error: Connection reset by peer)
23:37:10onionhammervarriount did you get the doccontinue stuff working in ST3?
23:42:05*Jesin joined #nim
23:52:22*johnsoft quit (Ping timeout: 256 seconds)
23:53:24*johnsoft joined #nim
23:59:40*transfuturist quit (Ping timeout: 272 seconds)
23:59:55dom96Quora: Done. https://github.com/dom96/jester/commit/47320c6a74f594e337bfe36dbe87e9b66f5f037f