<< 18-01-2017 >>

00:02:30TheManiacthis time the error went away when removing `{closure}` from an iterator, but I think stand little chance of creating a minimal example
00:03:20*ftsf joined #nim
00:05:35TheManiacgoodnight to you too - thanks for your help!
00:05:44*fredrik92 joined #nim
00:06:19ftsfmorning! o/
00:07:37*couven92 quit (Disconnected by services)
00:07:42*fredrik92 is now known as couven92
00:08:50*devted quit (Quit: Sleeping.)
00:14:40*gokr joined #nim
00:15:40*chemist69 joined #nim
00:23:11*yglukhov joined #nim
00:23:36*Ven quit (Ping timeout: 240 seconds)
00:25:49*Ven joined #nim
00:27:43*yglukhov quit (Ping timeout: 255 seconds)
00:37:32*xet7 quit (Quit: Leaving)
00:38:09*Ven quit (Ping timeout: 245 seconds)
00:40:44*Ven joined #nim
00:42:53*synshroud quit (Ping timeout: 248 seconds)
00:43:30*synshroud joined #nim
00:50:09*gokr quit (Ping timeout: 252 seconds)
01:11:07*dddddd quit (Quit: Hasta otra..)
01:25:51*benwbooth joined #nim
01:26:11FromGitter<Varriount> @GrundleTrundle You could also try using converters
01:27:39*huonw quit (*.net *.split)
01:27:39*MyMind quit (*.net *.split)
01:27:39*Guest73656[m] quit (*.net *.split)
01:27:39*M-Quora quit (*.net *.split)
01:27:39*pafmaf quit (*.net *.split)
01:29:14*huonw joined #nim
01:29:14*MyMind joined #nim
01:29:14*Guest73656[m] joined #nim
01:29:14*M-Quora joined #nim
01:29:14*pafmaf joined #nim
01:29:52*MyMind quit (Max SendQ exceeded)
01:31:18*MyMind joined #nim
01:38:06*handlex quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:52:44*chemist69 quit (Ping timeout: 245 seconds)
01:57:32*chemist69 joined #nim
02:14:26*devted joined #nim
02:15:23*devted quit (Client Quit)
02:25:14*yglukhov joined #nim
02:26:50*fredrik92 joined #nim
02:26:51*fredrik92 quit (Client Quit)
02:29:47*yglukhov quit (Ping timeout: 256 seconds)
02:30:39*couven92 quit (Ping timeout: 245 seconds)
02:34:25*vlad1777d quit (Remote host closed the connection)
02:41:49*chemist69 quit (Ping timeout: 255 seconds)
02:49:13*krux02 quit (Quit: Leaving)
02:54:13*chemist69 joined #nim
03:00:21*MyMind quit (Excess Flood)
03:01:29*MyMind joined #nim
03:09:23*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:25:20*ftsf_ quit (Remote host closed the connection)
04:13:09*Jesin joined #nim
04:27:19*yglukhov joined #nim
04:31:41*yglukhov quit (Ping timeout: 240 seconds)
04:35:00*brson quit (Quit: leaving)
04:39:26*Ven quit (Ping timeout: 258 seconds)
04:40:45*Ven joined #nim
04:42:25*chemist69 quit (Ping timeout: 255 seconds)
04:45:42*chemist69 joined #nim
05:08:15*Ven quit (Ping timeout: 260 seconds)
05:10:28*Ven joined #nim
05:38:30*byte512 quit (Ping timeout: 256 seconds)
06:16:34*nsf joined #nim
06:29:22*yglukhov joined #nim
06:31:19*bjz joined #nim
06:34:02*yglukhov quit (Ping timeout: 258 seconds)
06:49:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:02:16*ftsf quit (Quit: :q!)
07:02:55*bjz joined #nim
07:12:41*rokups joined #nim
07:19:16*kulelu88 quit (Quit: Leaving)
07:31:34*yglukhov joined #nim
07:35:38*yglukhov quit (Ping timeout: 240 seconds)
08:09:05*Ven quit (Ping timeout: 260 seconds)
08:10:44*irrequietus joined #nim
08:10:46*irrequietus quit (Changing host)
08:10:46*irrequietus joined #nim
08:11:49*Arrrr joined #nim
08:12:11*Ven joined #nim
08:14:57*gokr joined #nim
08:25:49*filcuc joined #nim
08:39:51*Ven quit (Ping timeout: 252 seconds)
08:40:17*Andris_zbx joined #nim
08:42:11*Ven joined #nim
09:01:05*Pisuke joined #nim
09:07:10*Vladar joined #nim
09:10:02*Kingsquee joined #nim
09:19:28FromGitter<dom96> We could really use an implementation of this for Nim: http://langserver.org/
09:23:58federico3sound like ctags
09:26:03*PMunch joined #nim
09:31:33*bjz_ joined #nim
09:31:41*bjz quit (Ping timeout: 240 seconds)
09:38:47*chemist69 quit (Ping timeout: 264 seconds)
09:39:46*sz0 quit (Quit: Connection closed for inactivity)
09:42:53*chemist69 joined #nim
09:46:36*vlad1777d joined #nim
09:51:53*stisa joined #nim
09:59:57*gokr quit (Ping timeout: 276 seconds)
10:10:23*gokr joined #nim
10:16:47*yglukhov joined #nim
10:17:47*yglukhov quit (Client Quit)
10:19:08*yglukhov joined #nim
10:34:20*couven92 joined #nim
10:55:11*yglukhov quit (Remote host closed the connection)
10:55:40*yglukhov joined #nim
10:55:57*Ven quit (Ping timeout: 240 seconds)
10:57:16*Ven joined #nim
11:01:05*gokr quit (Read error: Connection reset by peer)
11:15:17*yglukhov quit (Remote host closed the connection)
11:18:11FromGitter<moigagoo> Doesn't the Nim VSCode extension already implement it to provide intellisense?
11:24:40*gokr joined #nim
11:26:02*yglukhov joined #nim
11:27:14*yglukhov quit (Remote host closed the connection)
11:30:47*Gilga quit (Quit: WeeChat 1.5)
11:31:08stisamoigagoo : I think it's similar but the api/protocollo is different
11:33:48*ftsf joined #nim
11:42:35PMunchAccording to couven92 it sorta works
11:42:39*yglukhov joined #nim
11:42:45PMunchBut there are some small issues
11:46:04*chemist69 quit (Ping timeout: 245 seconds)
11:48:44*chemist69 joined #nim
11:51:34*unlaudable joined #nim
11:52:15yglukhovAraq: hi, there's a funny issue. Nim raises exception in debug mode, when compiling nakefile of nimx: https://gist.github.com/yglukhov/d3f860c70ee5944090aeacfb1535626d
11:52:26yglukhovit compiles fine in nim release
11:52:51yglukhovshould i file that?
11:53:02Araqthat's just a secret corruption in release mode then
11:53:11yglukhovmight be
11:53:36Araqsurely report it. and rollback the JS field stuff
11:54:04yglukhovand rollback the JS field stuff - what does it mean?
11:54:24*Ven quit (Ping timeout: 245 seconds)
11:55:31Araqthat JS produces dots again
11:55:37Araqthe JS codegen.
11:55:44Araqthat your project minifies etc
11:56:16Araqthough it's hilarious how bad the JS ecosystem is if it cannot minify a["field"]
11:56:36yglukhovwell its already done in #5240. what should i do exactly?
11:57:48*Ven joined #nim
11:58:46Araqnever mind then
12:02:37*Snircle joined #nim
12:03:39yglukhovAraq: regarding the JS ecosystem. as much as i don't like JS, i think minifiers dont do that intentionally. its very unusual to see bracket notation in hand-written code, unless its semantics mean exactly indexing some hash map or json or smth. and in such cases minifiers can't decide to minify string literals.
12:04:52Araqyeah it occured the same to me after I wrote that
12:04:56Araq:P
12:06:33FromGitter<endragor> turns out in JS (ES6) you can make `a["field"]` invoke a function. didn't know that
12:07:27flyxso they had a look at Lua?
12:10:58*Ven quit (Ping timeout: 258 seconds)
12:11:36*bjz joined #nim
12:11:52FromGitter<endragor> but it's the same as doing `a.field` anyway, so I'm still not sure what the problem is with minimizers. i.e. what's the case when `a["field"]` does something different from `a.field`?
12:12:59*Ven joined #nim
12:13:06*bjz_ quit (Ping timeout: 240 seconds)
12:18:32*yglukhov quit (Remote host closed the connection)
12:20:13*yglukhov joined #nim
12:21:50*PMunch quit (Quit: leaving)
12:24:10*PMunch joined #nim
12:24:33couven92moigagoo, sometime in the future I'm also thinking about writing and completing NimStudio, to get full language support and project system for Visual Studio! :P
12:26:18*Ven quit (Ping timeout: 240 seconds)
12:27:29*Ven joined #nim
12:45:10*Arrrr quit (Quit: WeeChat 1.5)
13:05:01*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:21:40Vladaris there a standard procedure to check is two sequences intersect, i.e. have one or more identical elements?
13:21:43*yglukhov quit (Remote host closed the connection)
13:21:55Vladars/is/if
13:21:56*rupil joined #nim
13:22:37*yglukhov joined #nim
13:26:22PMunchAraq, is wxnim usable?
13:27:17*handlex joined #nim
13:31:09*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
13:33:31flyxVladar: no, but you could use `any` from sequtils: `any(s1, proc (i: int): bool = i in s2)`
13:34:08flyxVladar: but big O would be smaller if you sort both seqs and then walk them cleverly
13:36:29Vladarthanks
13:38:35*handlex quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:42:50*yglukhov quit (Remote host closed the connection)
13:43:13*krux02 joined #nim
13:48:16*handlex joined #nim
13:54:31*Ven quit (Ping timeout: 240 seconds)
13:57:58*Ven joined #nim
13:58:51*akiradeveloper joined #nim
13:58:54*akiradeveloper left #nim (#nim)
14:00:28*yglukhov joined #nim
14:25:08PMunchOkay, after a bit of frustration I managed to get it to work
14:26:21*gokr quit (Ping timeout: 252 seconds)
14:28:08PMunchNow just to try and see if I can get it to work with the newest version of wxWidgets..
14:36:12*PMunch quit (Ping timeout: 276 seconds)
14:41:17*beaumonta joined #nim
14:44:35*abeaumont quit (Ping timeout: 260 seconds)
14:58:19*handlex quit (Quit: handlex)
15:00:12*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
15:00:15*PMunch joined #nim
15:15:09*devted joined #nim
15:15:41PMunchHey Araq, I'm having a look at wxnim as I was thinking about porting it to the latest version
15:16:00PMunchI see that you have a subset of all the .h files in the headers folder. Why only a subset?
15:17:22Araqthe rest was unnecessary iirc
15:17:22Araqit covers pretty much every widget
15:17:32AraqwxWidgets is a very dirty codebase
15:17:36PMunchHmm
15:17:47*unlaudable quit (Ping timeout: 255 seconds)
15:17:50PMunchBut how did you figure that out?
15:19:22*benoliver999 quit (*.net *.split)
15:19:22*zxtx quit (*.net *.split)
15:19:22*flyx quit (*.net *.split)
15:19:22*askatasuna quit (*.net *.split)
15:19:22*EastByte quit (*.net *.split)
15:19:22*jh32 quit (*.net *.split)
15:19:22*zielmicha_ quit (*.net *.split)
15:19:22*dom96 quit (*.net *.split)
15:19:23*CcxWrk quit (*.net *.split)
15:19:23*JStoker quit (*.net *.split)
15:19:29*askatasuna joined #nim
15:19:35*flyx joined #nim
15:19:37*JStoker joined #nim
15:20:33*benoliver999 joined #nim
15:22:47*zxtx joined #nim
15:22:47*EastByte joined #nim
15:22:47*jh32 joined #nim
15:22:47*dom96 joined #nim
15:23:02*CcxWrk joined #nim
15:23:02AraqPMunch: I read the code. maybe something is missing, but *shrug*
15:23:09Araqyou can add this on demand then
15:23:14PMunchFair enough
15:31:06krux02Araq: Are you interested to fix some VM ref type bugs?
15:31:39*zielmicha_ joined #nim
15:31:58*irrequietus quit (Remote host closed the connection)
15:32:36krux02I have two syntex trees that are indistinctable by treeRepr, but they behave differently on assignments
15:33:01Araq"interested to fix", lol
15:33:12AraqI'm interested in teaching you VM internals.
15:33:16Araqgood enough?
15:33:25*irrequietus joined #nim
15:33:34krux02I really want to get it fixed, so yes
15:33:44krux02but I have no idea how it works
15:34:02krux02and basically no understanding of the code base
15:34:09Araqcompiler/vmdef.nim
15:34:14Araqread this first
15:35:35Araqvm.nim, type TFullReg represents the register contents at runtime
15:36:42Araqa register has a 'node' field that represents a Nim AST
15:37:39Araqunfortunately this node is also used for other things like strings
15:37:57*Jesin quit (Ping timeout: 258 seconds)
15:38:02Araqor seqs or objects ...
15:38:14Araqsome of these things need copy semantics, others don't
15:38:21*Jesin joined #nim
15:39:00Araqfor example (1, 2) as a tuple would be the nkPar node
15:39:14Araqbut tuples need deep copies for correct semantics
15:40:35Araq'ref T' is also represented as reg.node
15:40:52Araqand so there is a field nfIsRef for nodes which are references
15:41:38Araqwhat's the bug?
15:42:05krux02https://gist.github.com/krux02/595417f0fca7ca93eb5f014477708dce
15:42:42Araqthat's too long
15:42:48Araqfor pair debugging
15:42:54Araqgot a shorter bug?
15:43:04krux02the NimNode has reference type semantics and sometimes copy semantics
15:43:21Araqsurprise ;-)
15:43:29Araqthat's what I wrote about
15:45:27krux02static:
15:45:27krux02 stmtList = quote do:
15:45:27krux02 discard
15:45:27krux02 let arr = [stmtList]
15:45:27krux02 stmtList.add newCall(ident"echo", newLit("Hello World"))
15:45:28krux02 assert arr[0].lispRepr == stmtList.lispRepr
15:46:36krux02In the example I constructed two syntax trees that are identical, at first. But one has copy semantics and the other has reference semantics.
15:47:21krux02when I look into the source code, NimNode is a ref type, so I would expect reference semantics everywhere
15:48:39krux02when I need an AST to be copied somewhere, I need to do that manually everything else is a very big surprise
15:49:22AraqNimNode is specialized in the codegen
15:49:38Araqcannot draw any conclusions from its declaration in this case
15:50:27krux02How do you think, that I wouldn't assume that this is a bug?
15:50:28Araqand yes, NimNodes should have reference semantics
15:51:30krux02is there any good reason this this behaves sometimes differently?
15:52:34Araq"good reason", it's a pita to implement
15:53:32Araqbut yes, these are bugs
15:53:43krux02so I can fix them?
15:54:09Araqyes
15:54:28krux02the only thing I am a bit scared of, is the that there might be code that expects NimNode to have copy semantics, when it actually should not.
15:54:40AraqI'm trying to teach you how to fix these
15:54:51Araqbut apparently you are misunderstanding me
15:54:54krux02ok, I am listening, or better said reading
15:55:10Araqwell this code needs to be patched then.
15:55:40Araqwe could have some switch to mitigate migration costs
15:55:53Araqbut code that depends on the copy behaviour is broken
15:56:48krux02ok
16:09:37krux02So I am reading the files.
16:11:35krux02When I read what you told me it all seems so easy. All I need to do is to make sure is that nfIsRef is always true when the field is a NimNode
16:12:27*irrequietus quit (Remote host closed the connection)
16:13:46*gokr joined #nim
16:13:57*handlex joined #nim
16:14:11Araqkrux02: brtw ': void' is not idiomatic Nim
16:14:17*irrequietus joined #nim
16:14:18Araqyou just leave it out instead
16:15:01yglukhovAraq: import foo / [bar, baz] works, but import foo.[bar, baz] doesnt. is there a reason?
16:15:08yglukhov. vs /
16:15:21AraqI wanna get rid of the dot syntax
16:15:27yglukhovouch
16:15:42yglukhovwhy?
16:15:52Araqbut the real reason is that foo.[bar, baz] would have been a grammar change
16:16:16Araqit's not valid Nim and I don't want special cases for the import statement
16:16:37Araqand dom96 disagrees so the dot syntax is safe for the time being
16:17:03Araqwhy? because it gives the illusion of nested namespaces but there is no such thing in Nim.
16:18:17krux02You want to get rid of the dot syntax? you main proc foo(a: A): void = ... ; a.foo ?
16:18:34Araqonly in import path.here.module
16:18:51yglukhovhrm. why would anyone make such an assumption. java doesnt have namespaces.
16:18:55krux02ah, ok I was scared for a second
16:19:53Araqyglukhov: it should be package.module but the dot is not available for this now -.-
16:20:04Araqand then I can tell Nim where to find package
16:20:35Araqbut maybe this package vs path decision is too subtle in practice
16:20:51krux02btw, I think I keep my explicit void. I like it. I think it is because of too much scala, where the default is auto
16:22:27*PMunch quit (Quit: leaving)
16:22:47krux02but anyway what do I need to do, to fix the reference type bug
16:23:36*pregressive joined #nim
16:23:52krux02I made this example where I have these two minimal, visually indistinctable, but different ast values.
16:24:39krux02Now I would like to see the value when I debug the VM.
16:24:58krux02I would like to see where the difference is
16:26:46Araqkrux02: compiler/vmgen line 1944
16:26:58smtis "addQuitProc(ref file.close)" the correct way to make sure a file closes before quitting?
16:27:22Araqsmt: it's not even valid Nim code
16:27:36smti thought it was weird, but just doing quitproc for file.close doesn't work either
16:28:04AraqaddQuitProc do(): file.close
16:28:38Araqbut if file is local this produces a closure and addQuitProc doesn't support closures and at that point you swear and long for Go's defer statement
16:28:52Araqbut before swtiching to Go you notice Nim has 'defer' too
16:29:02smtyeah Go's defer is what i was looking for basically
16:30:02Araqkrux02: enable these lines like so:
16:30:10Araq if s.name.s == "checkNode":
16:30:11*sz0 joined #nim
16:30:12Araq echo renderTree(body)
16:30:13Araq c.echoCode(result)
16:30:20Araqthen do 'koch temp c example.nim'
16:30:28Araqand look at the produced VM instructions
16:31:13*filcuc quit (Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/)
16:31:27*rusua joined #nim
16:33:10Araq84 LdGlobalAddr r10, 1 #temp3:21
16:33:11Araq85 WrDeref r10, r0, r1 #temp3:21
16:33:21Araqis produced for
16:33:26Araq node = arg
16:33:35krux02it tells me echoCode is deprecated
16:33:39Araqwhy? because 'node' is a static variable
16:33:51Araqkrux02: that's just to remind you later to remove the debugging code
16:34:00Araqit's not deprecated at all :P
16:34:05krux02ok
16:34:46Araqr1 has the 'arg' parameter
16:35:31Araqso we load the address of 'node' to register 10
16:36:27Araqand we write r1 to this location
16:37:32Araqwe look at the implementatoin of WrDeref
16:37:42Araqvm.nim line 557
16:37:50Araqand pretty much see the bug, I think
16:38:04Araqregs[ra] is still rkNode
16:38:09Araqso we do
16:38:18AraqputIntoNode(regs[ra].node, regs[rc])
16:38:23*Trustable joined #nim
16:38:51krux02ok, minor notice: neither echoCode node render tree print the """ of the triple string literals, only normal " of normal string literals are printed
16:39:06Araqhmmm no. still looks correct
16:39:20*rusua quit ()
16:40:02*yglukhov quit (Remote host closed the connection)
16:41:02krux02the bug is not in checkNode
16:41:26Araqoh?
16:41:29krux02the bug is somehow in the value of the argument
16:41:32Araqcould have told me earlier :P
16:42:01krux02check node works for the first two calls
16:42:06krux02it only fails on the third
16:42:22krux02even though the argument is virtually the same
16:42:51krux02and since it is the same function that gets called, the function is implemented correctly
16:44:17krux02by the way it did take some time for me to realize that this is only printing the implementation of checkNode
16:45:03krux02I tried to write an example that shows as good as possible what the problem is, when you execute it
16:47:20Araqit's just the 'quote do'
16:47:27Araqthat doesn't produce a nfIsRef node
16:47:36Araqvm.nim line 933
16:47:42Araqincl a.flags, nfIsRef
16:47:46*nsf quit (Quit: WeeChat 1.6)
16:47:47Araqtada, it works.
16:48:49nivdom96: <3
16:49:15dom96:)
16:50:09krux02wow cool
16:50:24krux02now I also need to test it with getAst
16:50:36dom96why isn't 'quote do' dead yet? :P
16:50:52Araqkrux02: sure but I don't think it's necessary
16:50:57krux02dom96: I use it heavily, and I do not have a better replacement
16:51:00Araqquote is mapped to template+getAst
16:51:20dom96we need a better replacement
16:51:23krux02ah, ok, that is nice to know that it has a shared implementation
16:51:23Araqand getAst gets turned into a strange do nothing opcode
16:51:26dom96I'm fine with quote
16:51:29dom96I just dislike the do notation
16:51:50krux02I also don't really like the do notation, but I can live with it
16:53:02krux02normally for macros or templates I can bass a stmtList without a _do_, but when I want to assign the result of that call, for some reason I need to do notation
16:54:17*irrequietus quit (Remote host closed the connection)
16:55:09*irrequietus joined #nim
16:56:19*brson joined #nim
16:56:50krux02Araq: can you push your commit? I am still not 100% sure what you did, I also guess my lines are a bit different. Then you can probably also close this issue from me: https://github.com/nim-lang/Nim/issues/4821
16:57:15*Ven quit (Ping timeout: 276 seconds)
16:57:28krux02how do we celebrate the 10.000th commit?
16:58:31dom96Party at Araq's house
16:59:25*Ven joined #nim
17:11:11*Ven quit (Ping timeout: 264 seconds)
17:13:08*Ven joined #nim
17:18:59dom96In all seriousness, I might tweet about this "achievement" :)
17:28:40*pregress_ joined #nim
17:29:48*pregressive quit (Read error: Connection reset by peer)
17:37:12*gangstaguy joined #nim
17:37:49*Andris_zbx quit (Remote host closed the connection)
17:38:32krux02Araq: The bug is not entirely fixed, we celebrated too early.
17:41:01*Ven quit (Ping timeout: 256 seconds)
17:42:15Araqkrux02: I'd like you to push the commit as a PR
17:42:21Araqso the tester runs over it etc
17:42:32krux02ah, ok that is fair
17:43:07Araqand ofc add your example as a test case in your PR
17:43:12*Ven joined #nim
17:43:18krux02yes I do it
17:46:03krux02It seem like that I have to set this flag recursively, because when I am not editing on the root node, the ast still has value semantics
17:50:15krux02is the discard statement in the tests a requirement?
17:56:11*Ven quit (Ping timeout: 255 seconds)
17:59:28*Ven joined #nim
18:02:12*yglukhov joined #nim
18:04:49*Pisuke quit (Ping timeout: 256 seconds)
18:10:23krux02I created the pull request for now, even though it is not yet finished. I will work on that later this evening after dinner. By for now
18:11:02*krux02 quit (Quit: Leaving)
18:14:23*handlex quit (Quit: handlex)
18:14:30*brson quit (Quit: leaving)
18:14:47*brson joined #nim
18:24:53*Ven quit (Read error: Connection reset by peer)
18:24:54*Ven_ joined #nim
18:24:59*yglukhov quit (Remote host closed the connection)
18:28:48euantorAny idea why this fails? https://www.irccloud.com/pastebin/sYQo4DvS/ -- Error message: https://www.irccloud.com/pastebin/doDQ4U7A/
18:28:52euantorBut this works: https://www.irccloud.com/pastebin/JsPVF5Sn/
18:34:14dom96because all macro arguments are actually NimNode's
18:34:21*handlex joined #nim
18:34:26dom96you should use a compiletime proc in that case
18:34:27*dddddd joined #nim
18:34:43dom96proc createStringConstNimNode(constName: string, constVal: string): NimNode {.compilerTime.} =
18:35:21Araqdom96: .compiletime is inferred for these since quite some time
18:35:36dom96I like to be explicit :)
18:35:46dom96but good to know
18:35:47euantorAh, that would do it. Thanks!
18:36:21euantorI'm probably going to end up writing some kind of blog post about this given this is my first attempt at using templates or macros and I've had quite a few questions about it
18:36:39dom96please do
18:41:09*PMunch joined #nim
18:51:27*Trustable quit (Remote host closed the connection)
18:55:57*nsf joined #nim
18:57:47*yglukhov joined #nim
18:59:12*yglukhov quit (Remote host closed the connection)
19:04:21FromGitter<Varriount> euantor: Then submit the post to hacker news and reddit. :3
19:04:55euantorI'd post here first to catch my dodgy spelling mistakes, then yeah I'd probably submit them there
19:17:48*couven92 quit (Quit: Client disconnecting)
19:21:12*yglukhov joined #nim
19:28:35*kulelu88 joined #nim
19:36:37*brson quit (Ping timeout: 256 seconds)
19:45:51*gangstaguy quit (Quit: Connection closed for inactivity)
19:49:52*GustavoLapasta joined #nim
19:52:17*handlex quit (Quit: handlex)
19:59:09*brson joined #nim
20:00:19*couven92 joined #nim
20:05:10*yglukhov quit (Remote host closed the connection)
20:07:52*bjz joined #nim
20:12:54*yglukhov joined #nim
20:30:32stisahuh, nim is at 9999 commits
20:30:34*handlex joined #nim
20:32:01dom96yeah, time to tweet :)
20:32:04*rokups quit (Quit: Connection closed for inactivity)
20:36:15dom96https://twitter.com/nim_lang/status/821818298664943616
20:36:47euantorNice!
20:51:05PMunchIs Alexander Rødseth anyone in here?
20:53:39*yglukhov quit (Remote host closed the connection)
20:57:17*handlex quit (Quit: handlex)
21:03:05*yglukhov joined #nim
21:03:14PMunchHmm, I'm getting an error installing c2nim from nimble
21:03:51*yglukhov quit (Remote host closed the connection)
21:03:53PMunchhttp://pastebin.com/Rq3T4Bej
21:04:48*Trustable joined #nim
21:04:51dom96PMunch: --verbose would help :)
21:05:15*yglukhov joined #nim
21:05:53*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:13:09PMunchNot really
21:13:46PMunchhttp://pastebin.com/W3gSXcp1
21:13:54PMunchIt's pretty much exactly the same output..
21:14:33PMunchWithout the hint to turn on verbose of course :P
21:15:23*Matthias247 joined #nim
21:16:53PMunchAny ideas?
21:17:31*Matthias247 quit (Read error: Connection reset by peer)
21:18:31AraqPMunch: I just recently build c2nim with 'nimble install c2nim' without problems
21:18:47*Matthias247 joined #nim
21:19:00PMunchSo did I earlier today..
21:19:07PMunchBut somehow it fails now
21:19:48PMunchBut as you can see I have both nim 0.16.0 and nimble 0.8.3
21:19:55PMunchCompiled just minutes ago
21:20:06PMunchFrom the 0.16.0 tag
21:20:24kulelu88hey guys, what does the 'T' do: proc lcm[T](x, y: T): T ? specifically, the [T] after lcm
21:20:42kulelu88is that my own type?
21:21:59PMunchkulelu88, http://nim-lang.org/docs/tut2.html#generics
21:22:12Araqit is a type varaiable
21:22:13PMunch[T] is for generics
21:25:04PMunchSo basically where it fails is on the doCmd where it tries to actually build c2nim
21:25:39*dom96 commented here https://news.ycombinator.com/item?id=13430108
21:26:09PMunchCan I actually get the error from nimble?
21:26:23PMunchRight now it only gives me a traceback which isn't very helpful..
21:26:57rupilcan you add an echo statement before line 308?
21:26:58dom96oh, sorry. Use --debug
21:27:33dom96Nimble should be smart enough to show the output if the build fails.
21:27:45dom96So please also file a bug about this.
21:27:53PMunchAha
21:27:57PMunchOkay
21:28:13PMunchHmm, apparently I don't have /usr/lib/nim..
21:31:07dom96huh, how did that happen?
21:31:16dom96And why do you need to have that?
21:31:51dom96You're just asking for trouble if you're install Nim into /usr/bin.
21:31:53PMunchError: cannot open '/usr/lib/nim/system.nim'
21:31:55kulelu88is there a chart that maps each Nim equivalent of Python lists, dictionaries, etc. ?
21:32:18dom96I wish that wasn't the case, but it is. We mainly keep Nim in ~/projects/nim.
21:32:57PMunchdom96, then where am I supposed to put it?
21:33:10PMunchHow am I supposed to install after I compile it?
21:33:22dom96Add nim/bin to your PATH and you're done
21:33:29dom96place it wherever you want
21:35:00kulelu88add the PATH to .profile is what the docs say
21:35:18PMunchWell, the path is currently in /tmp
21:35:26PMunchSo that's not a very good idea :P
21:35:47stisakulelu88 : something like https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers ?
21:37:52kulelu88stisa: thank you sir
21:39:24*bjz joined #nim
21:39:44PMunchThere, finally
21:40:28*Jesin quit (Quit: Leaving)
21:44:51*Jesin joined #nim
21:53:40*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:58:34*rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
22:00:09*chemist69 quit (Ping timeout: 276 seconds)
22:17:01euantordom96: "Nimble should be smart enough to show the output if the build fails." - I've noticed this too, but haven't had a chance to create an issue yet. if you have a syntax error or anything, nimble fails to report it at all. It certainly used to, but 0.8.2 doesn't
22:22:53*Snircle joined #nim
22:23:03PMunchhttps://github.com/nim-lang/nimble/issues/321
22:23:09PMunchCreated an issue for it
22:24:19dom96Thanks
22:26:26*chemist69 joined #nim
22:26:36*yglukhov quit (Remote host closed the connection)
22:28:06*brson quit (Ping timeout: 258 seconds)
22:32:37PMunchHmm, Araq it the wxnim wrapper you should replace the nim.cfg file with:
22:33:10PMunch--passC:"`../../wxWidgets-3.0.2/wx-config --cppflags`"
22:33:16PMunch--passL:"`../../wxWidgets-3.0.2/wx-config --libs`"
22:33:27PMunchThe current version doesn't work with Linux at all
22:33:34kulelu88in the math lib, can `sum` accept multiple variables?
22:33:38*cheatfate quit (Ping timeout: 240 seconds)
22:33:45PMunchSince you hardcoded the stuff that Windows needs..
22:34:21*brson joined #nim
22:35:39Araqpossible. :-)
22:35:57PMunchOther than that it works fine
22:36:20PMunchBut it should be updated to 3.1.0 at some point..
22:36:30PMunchBut that's probably a pain..
22:36:42Araqit shouldn't
22:36:45Araqdiff the headers
22:36:54Araqand apply the resulting patches again
22:37:05PMunchWait
22:37:34Araqthat was this wrapper's purpose anyway
22:37:36PMunchDiff the 3.0.2 headers to the 3.1.0 headers so you get the patch to go 3.0.2 -> 3.1.0 and then apply that to the modified ones?
22:38:02Araqdiff *my* 3.0.2 headers to the 3.1.0 headers
22:38:07PMunchOr diff the 3.0.2 headers to the wrapper headers and apply that to the 3.1.0 headers
22:39:01PMunchWait, diffing your 3.0.2 headers to the 3.1.0 headers would just make a patch to go from your 3.0.2 headers to the actual 3.1.0 headers. That wouldn't work..
22:39:38Araqwhy not?
22:39:59PMunchWhat would you apply that to?
22:40:02PMunchOh wait
22:40:09PMunchno..
22:40:18PMunchHow would that work?
22:41:22*Guest99092 joined #nim
22:41:30Guest99092hey guys
22:41:31AraqI modified the 3.0.2 headers for c2nim. quite heavily.
22:41:35Guest99092Allah is doing
22:41:39PMunchYeah, I noticed
22:41:54Guest99092sun is not doing is doing
22:41:57Guest99092to accept Islam say that i bear witness that there is no deity worthy of worship except Allah and Muhammad peace be upon him is his slave and messenger
22:42:01*cheatfate joined #nim
22:42:51PMunchJust checking if I'm still op
22:43:11PMunchBut dom96 beat me to the kicking :P
22:43:25Araqnice work, both of you
22:43:42dom96I think I need to add some commands to NimBot
22:43:48dom96to make it easier to ban people
22:43:59dom96I can never remember what to send to ChanServ
22:44:07Araqlol
22:44:11AraqI thought it was me
22:44:15PMunchDitto, when he started I went straight to the IRC guidelines :P
22:44:33Araqyeah these guidelines are lifesavers
22:45:00dom96Yeah, but they're difficult to find https://github.com/nim-lang/Nim/wiki/IRC-guidelines#ban-using-chanserv
22:45:09dom96Although now they're in my browser history at least
22:45:30PMunchYeah, I just type IRC into my search bar and find it from there :P
22:45:33PMunchBut back to business
22:45:35dom96-ChanServ- AKICK on *!*@*ip.138.197.205.71 was successfully added to the AKICK list for #nim.
22:45:38dom96Done
22:47:48AraqPMunch: I modified the headers for c2nim
22:48:10Araqthe same kind of modifications need to be applied to 3.10 headers
22:48:14PMunchYeah
22:48:36AraqI suppose you can diff the original header against mine
22:48:38PMunchSo you need to make a diff from official 3.0.2 to your 3.0.2 and apply that to the official 3.1.0
22:48:46Araqyeah or that.
22:48:53Araqthat sounds more workable
22:49:12PMunchBut I'm not sure if that works
22:49:23PMunchSince patch assumes the original file
22:49:37PMunchSo I think it just does it by line number
22:52:53*Trustable quit (Remote host closed the connection)
22:53:25Araqyou can use git's diff algorithm somehow
22:53:40*nsf quit (Quit: WeeChat 1.6)
22:53:41Araqbut the patch tool is also smarter than that iirc
22:55:16PMunchHmm, I'll try
22:59:32*Kingsquee joined #nim
23:08:36*vlad1777d quit (Ping timeout: 240 seconds)
23:12:49*Matthias247 quit (Read error: Connection reset by peer)
23:16:21*libman joined #nim
23:18:27*devted quit (Quit: Sleeping.)
23:24:36*Snircle quit (*.net *.split)
23:24:36*Jesin quit (*.net *.split)
23:24:36*huonw quit (*.net *.split)
23:24:36*Guest73656[m] quit (*.net *.split)
23:24:36*M-Quora quit (*.net *.split)
23:24:36*pafmaf quit (*.net *.split)
23:24:56*Snircle joined #nim
23:24:56*Jesin joined #nim
23:24:56*huonw joined #nim
23:24:56*Guest73656[m] joined #nim
23:24:56*M-Quora joined #nim
23:24:56*pafmaf joined #nim
23:25:35*vlad1777d joined #nim
23:26:36PMunchIt doesn't quite seem to work
23:26:50PMunchI tried it on any.h, a fairly heavily modified file
23:27:06PMunchAnd patch fails on 10/48 hunks
23:27:33*Vladar quit (Quit: Leaving)
23:27:33PMunchBetter than nothing, but still a bit tedious
23:28:56kulelu88Araq: is compiling Nim without C as efficient as the "with C" option ?
23:31:21*GustavoLapasta quit (Quit: Leaving)
23:34:20Araqwhat does that mean?
23:35:17kulelu88Araq: it says you can compile Nim without the C dependencies
23:35:36kulelu88(or generated C output)
23:36:03kulelu88Does that mean, it compiles directly from Nim to machine code?
23:36:34*arnetheduck quit (Ping timeout: 260 seconds)
23:37:03Araqthere is no such "without C" option
23:37:25Araqthere is a variant of the compiler that uses LLVM as the backend
23:37:37*pregress_ quit (Remote host closed the connection)
23:38:03Araqgood night
23:38:10*pregressive joined #nim
23:39:16kulelu88maybe that is it
23:41:35*libman2 joined #nim
23:41:35*libman quit (Read error: Connection reset by peer)
23:42:41*pregressive quit (Ping timeout: 255 seconds)