<< 31-01-2015 >>

00:05:11*gsingh93 joined #nim
00:05:49*sampwing quit (Ping timeout: 252 seconds)
00:06:17*sampwing joined #nim
00:08:39*dapz joined #nim
00:16:27*Varriount_ joined #nim
00:18:07*Varriount quit (Ping timeout: 255 seconds)
00:38:34*gokr1 joined #nim
00:38:47*gunn joined #nim
00:39:36*gokr quit (Ping timeout: 272 seconds)
00:49:57*irrequietus quit ()
00:53:58*reem joined #nim
00:57:08*threewood quit (Ping timeout: 272 seconds)
00:57:48*jasondotstar joined #nim
00:58:51*reem quit (Ping timeout: 264 seconds)
01:02:14*reem joined #nim
01:09:59*sampwing quit (Ping timeout: 252 seconds)
01:12:30*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:15:06*rational quit (Quit: Lost terminal)
01:31:48*dapz joined #nim
01:31:52*dapz quit (Max SendQ exceeded)
01:41:36*reem quit (Remote host closed the connection)
01:42:11*reem joined #nim
01:45:04*sillesta quit (Ping timeout: 264 seconds)
01:47:28*milosn quit (Ping timeout: 264 seconds)
01:59:46onionhammerAraq | Varriount NimLime now supports nimsuggest (on master)
02:00:22onionhammerwell, just def, not sug|con
02:02:34*milosn joined #nim
02:03:19flaviuI have an ill-behaved program, is there some way to tell gnu parallel to output all the stdouts into a file instead of printing?
02:04:17flaviuoops, wrong channel
02:04:19flaviulol
02:08:47onionhammeraraq re:nimsuggest 'use' doesnt seem to work (if i understand how it's supposed to work)
02:09:30onionhammeraraq I initialize w/ 1 file, then "use" another file, but it just returns empty > lines for subsequent def calls
02:23:56*darkf joined #nim
02:26:16*VinceAddons quit (Read error: Connection reset by peer)
02:27:19flaviu`.. image:: http://i.imgur.com/oCem13Y.png` doesn't seem to work on the form
02:33:09*ehaliewicz quit (Ping timeout: 245 seconds)
02:37:50*EXetoC quit (Ping timeout: 272 seconds)
02:37:56*reem quit (Remote host closed the connection)
02:47:16fowlmouthis that RST?
02:48:31*EXetoC joined #nim
02:49:16*flaviu quit (Read error: Connection reset by peer)
02:49:16*Mimbus quit (Read error: Connection reset by peer)
02:52:38*flaviu joined #nim
02:54:22flaviuyep, for the forum
02:54:55*Mimbus joined #nim
02:58:57*saml_ joined #nim
03:09:14*zahary1 quit (Quit: Leaving.)
03:16:02*noam_ quit (Read error: Connection reset by peer)
03:16:35*noam_ joined #nim
03:19:04*Danjcla quit (Ping timeout: 244 seconds)
03:20:01*sampwing joined #nim
03:22:24*Danjcla joined #nim
03:35:13*vendethiel quit (Ping timeout: 255 seconds)
03:39:35*sampwing quit (Ping timeout: 252 seconds)
03:45:59*vendethiel joined #nim
04:03:09*ehaliewicz joined #nim
04:06:36*vendethiel quit (Ping timeout: 244 seconds)
04:15:50*vendethiel joined #nim
04:26:33*EXetoC quit (Ping timeout: 276 seconds)
04:38:10*vendethiel quit (Ping timeout: 272 seconds)
04:40:28*brson joined #nim
04:43:57*vendethiel joined #nim
04:51:20*kapil__ joined #nim
04:57:30*gsingh93 quit (Quit: Connection closed for inactivity)
05:07:00*vendethiel quit (Ping timeout: 246 seconds)
05:09:30*saml_ quit (Quit: Leaving)
05:39:30*vendethiel joined #nim
06:24:14*Fusion_Gaming joined #nim
06:26:03*Boscop__ joined #nim
06:27:08*nande quit (Remote host closed the connection)
06:27:11*stonecolddevin quit (Ping timeout: 255 seconds)
06:27:22*stonecolddevin joined #nim
06:27:26*betawaffle quit (Excess Flood)
06:27:34*FusionGaming quit (Ping timeout: 255 seconds)
06:28:44*betawaffle joined #nim
06:29:49*Boscop_ quit (Ping timeout: 255 seconds)
06:36:57*vendethiel quit (Ping timeout: 246 seconds)
06:39:30*vendethiel joined #nim
06:59:32Araqping onionhammer
07:00:12*vendethiel quit (Ping timeout: 244 seconds)
07:02:15*vendethiel joined #nim
07:15:05Araq"I initialize w/ 1 file, then "use" another file, but it just returns empty > lines for subsequent def calls" <-- I don't understand this
07:25:36*SplinterOfChaos quit (Ping timeout: 246 seconds)
07:27:24dtscodei dont understand either
07:27:36dtscodei dont understand why my code wont compile for that matter
07:38:04*SplinterOfChaos joined #nim
07:54:32*reem joined #nim
07:58:41*mytrile joined #nim
08:12:58*BlaXpirit joined #nim
08:26:17*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:28:52*BitPuffin quit (Ping timeout: 265 seconds)
08:37:00*Demon_Fox quit (Ping timeout: 246 seconds)
08:37:03*brson quit (Quit: leaving)
08:43:25*bjz joined #nim
08:56:54*VinceAddons joined #nim
09:16:52*vendethiel quit (Ping timeout: 264 seconds)
09:17:44*dumdum joined #nim
09:23:10*vendethiel joined #nim
09:41:53*gunn_ joined #nim
09:43:22*gunn quit (Ping timeout: 240 seconds)
09:45:42*Matthias247 joined #nim
10:44:10*akiradeveloper joined #nim
10:44:31*eigenlicht quit (Ping timeout: 255 seconds)
10:45:33akiradevelopernim's resolving cycling dependency of modules is not easy to use. Have some plans to improve?
10:49:18def-akiradeveloper: don't have cyclic dependencies?
10:50:03akiradevelopersplit a module into two modules in natural way for human often cause cyclic dependencies
10:51:35akiradeveloperanother problem is Nim doesn't refer to symbol that's defined afterward. this makes it hard to write program in natural way too
10:53:02akiradeveloperit's ok if nim inherits C in this point. How can I write prototypes for proc and type?
11:00:14def-you can declare a proc and define it later
11:00:34def-haven't tried on types
11:01:08Araqyou cannot do it for types, you can only have cyclic dependencies for types within a single 'type' section
11:04:28BlaXpiritC++ and Python both have nice solutions for cyclic dependencies
11:04:34BlaXpiritin Nim you're pretty much screwed
11:07:17Araqoh yeah, C++'s solution is really nice. "er, that's some incomplete struct then, you can only have pointers to it"
11:07:30BlaXpiritis really nice
11:07:31*kuzy000_ joined #nim
11:08:05*dumdum quit (Ping timeout: 256 seconds)
11:08:18Araqyeah, I am having fun with such a system right now. the scene has a camera the camera knows about the scene, etc etc etc
11:08:18BlaXpirithaving non-pointers doesn't make sense
11:09:03Araqthere is no lose coupling whatsoever in the system, but it's spreat out over hundreds of files, so it's "nice"
11:09:14BlaXpirithowever messy my project's structure might be, I was able to implement it in Python and C++, not in Nim.
11:09:26Araqawww
11:09:29akiradevelopersame here ... A request have session, session handles a request...
11:10:16akiradeveloperdefine a proc later and nim can't find the symbol
11:11:19akiradeveloperI merged session and request module into one and resolved but I want them to be split for maintenance. include can't be the solution
11:11:50BlaXpiritwell i've started thinking that it may be the only solution
11:12:38BlaXpiritcan't find a reason why C++'s approach would not work
11:26:05*rational joined #nim
11:26:43*rational quit (Read error: Connection reset by peer)
11:27:00*rational joined #nim
11:27:14*rational quit (Client Quit)
11:35:24akiradeveloperis cstring is null terminated?
11:37:12*EXetoC joined #nim
11:38:13BlaXpiritakiradeveloper, cstring is a pointer to a sequence of bytes which should be null-terminated
11:38:28akiradeveloperthanks
11:38:39BlaXpiritakiradeveloper, string has a length and is also null-terminated for easy conversion to cstring
11:38:57akiradeveloperhow can I make a cstring from a sequence of byte?
11:39:10BlaXpiritI can guess
11:39:22BlaXpiritcstring(add some_seq[0])
11:39:26BlaXpiritcstring(addr some_seq[0])
11:39:52akiradeveloperoh? that's great if it's possible. I will try
11:43:09*ehaliewicz quit (Ping timeout: 245 seconds)
11:43:18akiradeveloperit works! thanks
11:44:45*dumdum joined #nim
12:00:29ekarlsoAraq: was there a query builder you said for nim sql ?
12:05:57*Mimbus quit (Remote host closed the connection)
12:05:57*flaviu quit (Remote host closed the connection)
12:06:39BlaXpiritakiradeveloper, wait a sec
12:06:47BlaXpiritthat sequence of bytes must be 0 terminated
12:11:09akiradeveloperyes
12:11:15akiradeveloperfor example
12:11:37akiradeveloper@['a', 'b', chr(0), 'c'] will be "ab" and the lenght is 2
12:11:59akiradeveloperbecause of null-termination, the last 'c' is not counted in
12:12:33akiradeveloperhow I can convert cstring to string?
12:13:12EXetoCwith $
12:18:12akiradeveloperoh...
12:24:24*saml_ joined #nim
12:36:37*gunn_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:41:11*eigenlicht joined #nim
12:43:48*milosn quit (Ping timeout: 276 seconds)
12:47:26*reem quit (Remote host closed the connection)
12:48:53*BlaXpirit quit (Read error: Connection reset by peer)
12:49:58*BlaXpirit joined #nim
12:53:17*gunn joined #nim
13:11:22*akiradeveloper quit ()
13:13:13*BitPuffin joined #nim
13:17:07Araqakiradeveloper, BlaXpirit there is another workaround btw
13:17:08*zahary joined #nim
13:17:09Araqtype
13:17:26Araq AbstractFoo = object of RootObj
13:17:39Araq SomethingThatWantsConcrete = object
13:17:49Araq a: ref AbstractFoo
13:17:56Araq... # some other module
13:18:06Araqtype Concrete = object of AbstractFoo
13:31:01dom96or you could just put your types in a file called types.nim?
13:32:46*milosn joined #nim
13:41:54BlaXpiriteven that didn't give all the needed freedo
13:41:55BlaXpiritm
13:54:53gtrundleAraq: thanks for 2039 fix.
13:54:55*akiradeveloper joined #nim
13:55:49Araqgtrundle: strange that I missed that when I introduced regionized pointers
13:56:07Araqand even stranger that it wasn't triggered before even though the stdlib uses them
13:56:30Araqwell actually
13:56:53AraqI think before the codegen used a different way to access the type so it remained hidden for some time
14:06:43*milosn quit (Ping timeout: 265 seconds)
14:14:34dumdumif I have two 'ref' variables a,b pointing to two heap objects, on a = b , b's content gets copied over to a's content?
14:16:56BlaXpiritno
14:20:45dumdumthanks
14:22:04*akiradeveloper quit ()
14:29:50*kashyap___ joined #nim
14:30:22kashyap___What's a good way to deal with addresses in the kernel. I just realized that arithmatic is not defined for unsigned integers
14:30:36def-import unsigned
14:30:46dumdumI have a bunch of color (r,g,b,a; int) values, any suggestion on easiest way(nim lib) to write an image file?
14:30:56kashyap___thanks def-
14:31:29*renesac joined #nim
14:31:32def-dumdum: https://github.com/def-/nim-unsorted/blob/master/bitmap.nim#L64-L70
14:31:55dumdumthanks!
14:32:10ekarlsomeh, someone build me a query thing for sql :(
14:32:32*threewood joined #nim
14:32:53Araqekarlso: I said there is an SQL parser in the stdlib, not a query builder
14:33:27ekarlsoAraq: yeah and that makes making more advanced filtered queries a pain :|
14:35:09BlaXpiritkashyap___, there is also this http://blaxpirit.github.io/nim-csfml/csfml_graphics.html#newImage,cint,cint,ptr.uint8 http://blaxpirit.github.io/nim-csfml/csfml_graphics.html#saveToFile,Image,cstring
14:36:00kashyap___BlaXpirit - you meant it for someone else I suppose
14:36:10BlaXpirityes... sorry
14:36:19ekarlsoi guess it's one of the missing things ;P
14:36:37*dumdum quit (Ping timeout: 256 seconds)
14:36:38BlaXpiritdumdum, ^ [:35:09]
14:36:41kashyap___def- unsigned worked for arithmetic .. is there another import for boolean operations?
14:37:02BlaXpiritwhat do you mean
14:37:03kashyap___or I just have to cast?
14:37:21BlaXpiritif i understand the question correctly, yes
14:37:56*darkf quit (Quit: Leaving)
14:39:12dom96Araq: Do we want to apply for GSoC this year?
14:40:25EXetoCkashyap___: operations for signed integers, bools and so on are in the system module, so they are imported implicitly
14:41:54*mal`` joined #nim
14:43:20EXetoCkashyap___: the types and operations are exposed as procs, as you can see in the documentation for that module
14:44:00kashyap___EXetC looks like system was getting processed even without me importing
14:44:30kashyap___importing system caused lib/system.nim(1, 1) Error: redefinition of 'system'
14:44:44EXetoCit's always imported, so don't do that
14:45:37kashyap___oops I misread your message .. okay, I am looking for boolean operations on unsigned integers
14:46:38*noam__ joined #nim
14:46:38Araquse uint(x) or bool(x) type conversions
14:48:18*noam_ quit (Ping timeout: 244 seconds)
14:49:27*Sphax_ joined #nim
14:49:33*Sphax_ quit (Client Quit)
14:53:14EXetoCI was being a little vague though
14:54:44dom96Araq: GSoC Y/N?
14:58:07AraqY
14:59:34dom96You will probably need to be the org admin then.
15:06:20Araqwhat's the deadline?
15:06:48*milosn joined #nim
15:09:01def-Araq: February 20
15:10:50Araqare we allowed to ... er ... reuse everything from 2014?
15:11:49def-I've seen other projects reuse ideas every year too
15:12:02dom96sure
15:12:08*mal`` quit (Quit: ERC Version 5.3 (IRC client for Emacs))
15:12:45dom96We need to improve our ideas though.
15:13:42dom96http://forum.nim-lang.org/t/814
15:16:31*mal`` joined #nim
15:16:42*dumdum joined #nim
15:30:26*threewood quit ()
15:32:38*mytrile left #nim (#nim)
15:35:51dom96Do we have any Googler's here?
15:36:26EXetoCI'm quite good at googling
15:36:59dom96*Google employees :P
15:37:42*sillesta joined #nim
15:40:08renesacdom96: do you still have that irc log on the reasons why nimrod wasn't selected?
15:40:14renesacfor gsoc
15:40:34dom96I thought I saved it but I can't find it :\
15:40:52renesacsearch nimrod irc logs for the link
15:40:56renesacand hope it didn't rot
15:43:55dom96https://gist.github.com/dom96/9273843
15:43:56dom96Found it
15:44:19EXetoC*Nim :-)
15:46:08renesacEXetoC: it was nimrod at the time
15:46:11renesac;)
15:46:52renesachttps://github.com/Araq/Nim/issues/936#issuecomment-72322488 <-- is the first overload supposed to work and have higher priority than (a:int, b:int)?
15:47:03*mal`` quit (Ping timeout: 252 seconds)
15:50:43BlaXpiritrenesac, https://github.com/Araq/Nim/issues/1890?
15:52:48renesachum, yeah, probably
15:53:50BlaXpiritu may want to add reference to issue
15:55:33renesacI'm not really sure it is the same issue
15:56:41BlaXpiritok
15:56:49BlaXpiriti don't really understand
15:57:10BlaXpiritbut hmm looks very similar
15:57:43renesacyeah, maybe the root cause is the same
16:00:48*kapil__ quit (Quit: Connection closed for inactivity)
16:10:10dumdumThis: https://github.com/def-/nim-unsorted is great addition to nim tutorial :D
16:11:33dtscodeif i have a type Foo* = object, with member bar, and then import the module it an another file, i can use it by creating an instance of Foo (ie var baz: Foo) and then use baz.bar right?
16:12:40dumdumyes if its baz*
16:12:51*kuzy000_ quit (Read error: Connection reset by peer)
16:13:08dumdumsorry
16:13:10dumdumbar*
16:13:21dtscodeoh you have to * all of the members too?
16:13:31dtscodethanks dumdum
16:13:37dumdumyes
16:14:04dtscodeguess that makes sense, to simulate private and public scope
16:14:04dumdum'*' only on public members
16:14:11dtscodeyeah
16:20:53*noam__ quit (Ping timeout: 240 seconds)
16:27:32*sdw_ joined #nim
16:32:47*dumdum quit (Ping timeout: 256 seconds)
16:45:23*dumdum joined #nim
16:46:40*saml_ quit (Remote host closed the connection)
16:48:23*kuzy000 joined #nim
16:52:13*kuzy000 quit (Remote host closed the connection)
16:52:37*clone1018_ quit (Quit: No Ping reply in 180 seconds.)
16:53:03*Triplefox quit (Quit: No Ping reply in 180 seconds.)
16:54:58*clone1018_ joined #nim
16:54:59*Triplefox joined #nim
16:56:33*gunn quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
17:00:13EXetoCdtscode: it seems like the same thing, but without the descriptive names
17:00:40*UberLambda joined #nim
17:01:12*UberLambda quit (Client Quit)
17:01:14*mal`` joined #nim
17:01:55*UberLambda joined #nim
17:05:37*kuzy000 joined #nim
17:14:21*AtomicBool joined #nim
17:14:26AtomicBoolhello
17:15:23UberLambdahi
17:18:41*dumdum quit (Ping timeout: 256 seconds)
17:19:27AtomicBoolwhats gucci
17:19:52EXetoCA posh brand
17:20:28EXetoCsup
17:20:35AtomicBoollol
17:24:18AtomicBoolJust studying Atomic types in rust
17:28:04*matkuki joined #nim
17:31:02UberLambda[offtopic] Anyone using LLVM Ocaml here? I'm trying to compile the Kaleidoscope tutorial but it seems outdated
17:33:34matkukiBlaXpirit: Just tried your random module. Good stuff, thanks. Great for porting from Python.
17:38:44BlaXpiritit's not actually porting from python
18:04:13*mytrile joined #nim
18:10:27*Fusion_Gaming is now known as FusionGaming
18:29:29*flaviu joined #nim
18:30:21*scottj joined #nim
18:34:46*Matthias247 quit (Read error: Connection reset by peer)
18:44:57*EXetoC quit (Quit: WeeChat 1.0.1)
18:55:49onionhammerping araq
18:56:01matkukiBlaXpirit: I know. I meant I'm porting some code from Python and all I had to do is a little renaming.
18:56:38onionhammeris 'use' meant to say use this file?
19:03:47onionhammerbasically i cant do lookups from 2 tabs/files without restarting nimsuggest araq
19:11:07AtomicBool.eval echo(0x0539);
19:11:16*renesac quit (Quit: Page closed)
19:11:39AtomicBool#nim-offtopic
19:17:40*Varriount|Mobile joined #nim
19:23:14*Mimbus joined #nim
19:23:57flaviuAtomicBool: sorry about that, fixed.
19:24:11AtomicBool.eval echo(0x0539);
19:24:13AtomicBoolits fine
19:24:16MimbusAtomicBool: 1337
19:24:39AtomicBoolis Mimbus written in Nim?
19:27:06flaviuYep, written by dtscode
19:28:16flaviubtw, semicolons mean different things to the bot as compared to nim:
19:28:17flaviu.eval echo(escape(""";;;;;;"""))
19:28:20Mimbusflaviu: "\x0A\x0A\x0A\x0A\x0A"
19:28:26AtomicBoolyeah ik
19:31:46*Varriount|Laptop joined #nim
19:32:22*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
19:32:51*Demon_Fox joined #nim
19:42:45*alexruf joined #nim
19:43:20*alexruf quit (Max SendQ exceeded)
19:48:05*alexruf joined #nim
19:53:27vendethielreading nim's manual now, I realize that you might have a *lot* of pragmas littered in your, and so I'm wondering: why {. .} ?
19:53:53vendethielat first I thought it was only for c-style, low-level stuff, bindings, etc, that you'd have more inside of a compiler/stdlib that tries to optimize everything, but apparently not
19:57:08*sillesta quit (Ping timeout: 272 seconds)
20:00:18*brson joined #nim
20:01:53matkukivendethiel: You mean why the characters "{. .}" are used, or why so many pragmas?
20:12:57*dapz joined #nim
20:16:43vendethielmatkuki: both :P
20:18:14matkuki"{. .}" looks nice to me, but you should ask Araq about that.
20:18:16matkukiAs to why so many pragmas, I think the first line on Pragmas in the Nim manual says it all.
20:21:30vendethielmatkuki: ha, it looks like a corner case to me, but well :-) to each his own
20:25:08*sillesta joined #nim
20:26:02*dumdum joined #nim
20:28:44*ehaliewicz joined #nim
20:29:22*dapz quit (Ping timeout: 240 seconds)
20:34:21*gtrundle quit (Ping timeout: 265 seconds)
20:36:46*Varriount|Laptop quit (Ping timeout: 246 seconds)
20:39:51*dumdum quit (Ping timeout: 256 seconds)
20:41:30*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805])
20:54:26AtomicBoolhow old is Nim
20:57:47*Varriount|Laptop joined #nim
20:58:48flaviuAtomicBool: The oldest commit is on Sun Jun 22 16:14:11 2008
20:59:16AtomicBooli see
21:06:35ekarlso.eval @["foo", "bar"].join(" ")
21:06:38Mimbusekarlso: eval.nim(3, 15) Error: value of type 'string' has to be discarded
21:22:08*UberLambda quit (Quit: Leaving the Matrix)
21:23:40*AtomicBool left #nim (#nim)
21:26:48ekarlsoso quiet here :|
21:26:53ekarlsoflaviu: any more cool ideas for pkg ?
21:28:33*duncanmv joined #nim
21:28:38*EXetoC joined #nim
21:29:24duncanmvWhat is the equivalent of an interface/trait in nim? If I want a struct to contain something that could be a seq of bytes, but this could be a string, or a mmaped file, or anything implementing some set of methods?
21:29:57def-user defined typeclass
21:30:54duncanmvdoes the standard library uses them already?
21:30:59def-Or maybe do something with streams: http://nim-lang.org/streams.html
21:31:03def-duncanmv: don't think so
21:31:06duncanmv(eg a file and a string having some common interface?)
21:31:47Araqvendethiel: well you got it. at first pragmas where only for C interop so I didn't mind the somewhat ugly syntax. Now it's used for ... everything
21:31:49def-in the case of an mmaped file and a string, a cast would be good enough actually, i think
21:32:21vendethielAraq: would you change it if you could?
21:32:50Araqvendethiel: not really. I've grown to like it
21:32:57vendethielalright, that works as well :-)
21:33:27Araqit could easily be replaced with {} except for a few edge cases, perhaps
21:33:33*alexruf quit (Quit: Textual IRC Client: www.textualapp.com)
21:34:07Araqbut then we have 2 ways of writing the same and the fraction who is confused by everything will be confused and complain
21:35:12flaviuAraq: It would also be ambiguous. what does `{ foo: "asdasda" }` mean?
21:35:39Araqflaviu: yeah that's the edge case I'm talking about ;-)
21:36:05Araqonionhammer: 'use' doesn't do what you think it does
21:36:14*FusionGaming quit (Read error: Connection reset by peer)
21:42:39flaviuI may just not understand C++, but how does it do "no gc" when it has reference counted shared_ptr?
21:43:10reactormonkflaviu, that's no gc, because it's done locally. GC is globally.
21:44:57flaviureactormonk: So replacing Nim's GC with reference counting lets me say Nim doesn't use GC?
21:45:22reactormonkflaviu, I'd say so. Have fun with loops.
21:45:53flaviupfft, who cares about performance ;)
21:46:11reactormonknah, I mean looping structures
21:46:59flaviuOh, I see. Well, C++ has boost::weak_ptr, I assume it uses that to deal with loops.
21:47:26onionhammerAraq what does it do?
21:47:46onionhammerand how do I get definitions in a different file w/o restarting nimsuggest?
21:48:35Araqit's simply "find usages"
21:48:39onionhammerahh
21:48:40onionhammercool
21:48:48Araqand only works properly on definitions, I'm afraid
21:48:48*Jesin joined #nim
21:49:14onionhammercouldnt u go-to-definition on a reference and then find usages from there (seemlessly)?
21:49:38Araqyeah but that requires a restart
21:50:02onionhammerso going back to def;
21:50:06onionhammerhow do i handle multiple tabs?
21:50:40Araqwell you can only query all the modules that the project actually uses
21:51:20Araqbut I can add a "add/compile this module too"
21:51:27onionhammerthat would be nice
21:51:38AraqI'm not sure
21:51:45reactormonkAraq, what does the experimental macro do?
21:52:08Araqreactormonk: it's a pragma that enables all the stuff that's unstable
21:52:17Araqor that we're unsure what to do with
21:53:07Araqonionhammer: well that will be confusing, perhaps.
21:53:40onionhammerAraq so here's the use case.. I have a 'test1.nim' which imports 'test2.nim', which imports 'test3.nim', but when I go-to-def on test1.nim -> test2.nim, no go-to-defs work within test2
21:53:43onionhammerI just get empty lines
21:55:37Araqlet me try this
21:58:41Araqnope. works
21:59:25AraqI'm not sure you understood that it works only on the given *project*
22:00:47Araqand it only recompiles what changed
22:01:46onionhammerright, but i have a "project"
22:01:59onionhammeri.e. kind of an entry module which references other modules
22:02:05onionhammeri'll try again though
22:02:55Araqbut yeah, we need a dirty command
22:03:17onionhammerok, it seems to be working now. I'll re-test on the machine that wasnt workin
22:03:32Araqto tell nimsuggest that a file has been modified
22:03:55Araqcause right now it only dirties the file that you give to it via def|sug|...
22:05:27onionhammerso.. doing an "add" isnt possible?
22:05:41onionhammerlike if I pull up an unreferenced module that isnt in there yet
22:05:59*ehaliewicz quit (Ping timeout: 256 seconds)
22:06:01onionhammerand I want to start doing lookups
22:06:40Araqwell actually I'm wrong, it does a crc checksum check to determine whether it needs recompilations
22:06:58Araqand to 'add' you simply 'import' it somewhere in your project
22:08:04Araqtry it
22:08:08Araqworks for me
22:08:21onionhammeryeah, but im saying if you open a nim file that *isnt* referenced yet
22:08:32onionhammerit'd be nice to still be able to do lookups w/o another nimsuggest instance
22:08:49*Sornaensis joined #nim
22:08:57Araqhi Sornaensis welcome
22:09:09Sornaensishi
22:09:16Araqonionhammer: yeah, as I said, I tried to keep implementation complexity reasonable
22:09:55Araqwe can add this feature, but it might end up confusing since the editor pretends it works on a file basis, when it really does not
22:10:15onionhammerAraq understandable; I dont want to overcomplicate things, but it'd be nice from an end-user perspective if we can make it work how one would expect
22:10:28onionhammeri.e. "I open up a nim file, hit go-to-definition, and it works"
22:10:43Araqwell what about 'include' files?
22:10:54onionhammerhow do you mean?
22:10:58Araqusually these cannot be compiled on their own
22:11:08Araqyou can only compile the module that includes them
22:11:16onionhammerbrb
22:12:04*Pisuke quit (Quit: WeeChat 1.2-dev)
22:13:08*Sembei joined #nim
22:14:43onionhammerback
22:14:44*ehaliewicz joined #nim
22:14:53onionhammeraraq i think it would be perhaps just 'best effort'
22:15:12onionhammerfor example, im not really working within a project, I'm working in a directory of independent utility modules
22:15:25onionhammerbut i cant really switch between them and work on each one as i want to without restarting nimsuggest
22:15:35onionhammerbut they're all in the same directory
22:15:44*Danjcla quit (Ping timeout: 244 seconds)
22:15:48Araqno, you can restart with a different port
22:16:27onionhammerwell, it's stdin
22:16:55Araqif you don't start with --stdin nimsuggest uses sockets
22:17:24onionhammerright
22:17:40*Danjcla joined #nim
22:17:49Araqthing is
22:18:00onionhammeraraq can you perhaps think through this scenario a bit and recommend how you would handle this for ides?
22:18:05onionhammerthat sort of thing should be documented a bit..
22:18:24onionhammerlike do I keep a hashtable of which files came back FROM the tool and which didnt?
22:18:51onionhammerbecause if the module came back from the tool, i dont need to start a new instance when someone calls def on it
22:18:52AraqI'm not sure if my visual studio does autocomplete for files that I just open with it
22:19:10Araqand that are not part of my project/solution
22:19:12Araqlet's see
22:19:14onionhammernot without a csproj (for example)
22:19:25flaviuI have an interesting use of "include": Accessing private procedures for unit testing.
22:19:26onionhammerbut thats because theres no assemblies etc linked in afaik
22:21:07onionhammeraraq what about just allowing you to use the entire directory when you initialize nimsuggest
22:21:19onionhammernimsuggest --stdin .
22:22:07onionhammerbrb
22:22:37Araqjust tested. my visual studio doesn't give a shit about files that are not referenced in my solution
22:24:38Araqer ... do you plan to use --stdin in your editor plugin? o.O
22:28:25Araqflaviu: 'include' is generally useful for code injections into modules
22:31:07*bmaxa joined #nim
22:31:15dom96ldlework: You around?
22:34:16*kuzy000 quit (Ping timeout: 264 seconds)
22:35:48reactormonkAraq, sockets? How are they exposed?
22:40:23*ehaliewicz quit (Remote host closed the connection)
22:41:04Araqreactormonk: well nimsuggest is a server.
22:41:44reactormonkAraq, via ::1 or file socket?
22:42:06Araqvia Nim's net module
22:42:27*kuzy000_ joined #nim
22:44:42reactormonkso localhost
22:45:28AraqI think it works remotely too
22:45:36Araqbut yeah, usually localhost
23:00:31*duncanmv left #nim ("Ex-Chat")
23:05:21*onionhammer quit (Quit: WeeChat 1.0.1)
23:09:16*reem joined #nim
23:12:04*kuzy000_ quit (Ping timeout: 264 seconds)
23:21:47*scottj left #nim (#nim)
23:28:23*vendethiel- joined #nim
23:30:33*vendethiel quit (Ping timeout: 276 seconds)
23:30:42ldlework dom96 hi
23:35:52*matkuki joined #nim
23:36:15matkukiBlaXpirit: You there?
23:36:25BlaXpirithi
23:37:34matkukiI'm compiling with "--deadCodeElim:on" and get this error: random\random.nim(141, 9) Error: internal error: expr: var not init :envP_161514
23:37:59BlaXpirithttps://github.com/BlaXpirit/nim-random/issues/2
23:38:44matkukiThanks.
23:40:19matkukiI'm using "--deadCodeElim:on" to try to get a program to work on Windows XP. It was suggested on the forum. Any other solution for this?
23:41:17*gtrundle joined #nim
23:41:29def-matkuki: ha, just got the exact same error and wanted to report to BlaXpirit
23:41:38BlaXpirit:s
23:41:42BlaXpiritwhat am i supposed to do
23:41:48def-fix the compiler!
23:41:50matkukidef-: Jinx :)
23:42:04def-i get this on linux too though
23:43:15*Grauwolf quit (Ping timeout: 264 seconds)
23:43:37*Varriount__ joined #nim
23:43:51*no_name quit (Ping timeout: 264 seconds)
23:44:37*no_name joined #nim
23:46:44matkukiIs the warning in this code a problem: https://bpaste.net/show/1e3f478dc8d9 ?
23:46:52*Varriount_ quit (Ping timeout: 264 seconds)
23:47:30Araqthat's just https://github.com/Araq/Nim/issues/2023
23:47:39Araqwhich I'm already working on
23:47:52*Varriount|Laptop quit (Ping timeout: 246 seconds)
23:48:28Araqmatkuki: no but your horrible formating is ;-)
23:48:47Araqvar foo: int, not var foo :int
23:49:01Araqthis is not ruby with its sigils
23:49:24BlaXpiritsuch formatting totally makes sense to me
23:49:53BlaXpiritthe only reason it looks weird is it doesn't follow english rules of punctuation
23:51:31matkukiAraq: Sorry, CoDeSys coding side-effect. Coded Beckhoff PLC's and got used to it.
23:51:41*sillesta quit (Ping timeout: 264 seconds)
23:52:02matkukiBut as BlaXpirit says, I find it oddly pleasing :)
23:52:57Araqit annoys me so much I'll change the compiler to disallow it
23:53:07flaviu:O
23:53:08Araq(just kidding)
23:53:15matkukiThank god!
23:53:42flaviuAraq: Wouldn't it be hard to do anyway? You'd have to mess with the tokenizer, I think.
23:54:36Araqthe tokenizer is usually the easiest part in a compiler
23:55:07flaviuYeah, but if you change the emitted tokens, there's a high chance of introducing weird bugs higher up.
23:55:20BlaXpiritpls
23:56:09flaviuAlthough I guess you could do the checks in the tokenization for `:`, and emit an error if the left spacing > 0 and the right spacing = 0; just ignore me.
23:56:39Araqflaviu: you only have to emit an error token instead to tkColon when there is whitespace before the colon
23:57:01Araqit's perhaps 3 lines of code
23:57:08Araqif not one
23:57:50matkukiPlease don't go there! You two are starting to scare me.
23:58:08def-BlaXpirit: so, can't use the random library right now?
23:58:22BlaXpiritwhy not
23:58:29BlaXpiritdon't use deadcodeelim
23:58:29def-BlaXpirit: i wanted to demonstrate that a benchmark of languages using random is useless, because it depends on the rng
23:58:40def-BlaXpirit: i don#t have deadcodeelim activated
23:58:52BlaXpiritdont use release then
23:59:07def-too slow code
23:59:12def-ok, will try^^
23:59:46BlaXpirituse nim 0.9.4 :|
23:59:48def-no, same without -d:release