<< 11-03-2015 >>

00:00:03*bjz joined #nim
00:00:03*bjz quit (Client Quit)
00:00:04AraqI don't think so, it's just not necessary
00:00:57*Aszarsha quit (Remote host closed the connection)
00:01:44shalabhok. in cases where it makes sense - e.g. handing large number of large strings (file contents e.g.) it might work fine.
00:06:03shalabhso based on some code I've been writing - seems like there is not inconsistency I can point to (yet ;)
00:06:03shalabhstrings are value types - it's as simple as that
00:06:03shalabhand so using ref strings when necessary is fine, just like with other value types.
00:09:58Araqwell I picked it for consistency/ease of use. it's the one place where Nim goes for consistency over performance
00:10:27DemosAraq, nim has pretty quick string handling though, correct?
00:10:54Demosalthough I guess "faster than C" in this case is a pretty low bar
00:11:09AraqDemos: afaict it really good, esp with def-'s recent optimizations
00:12:36*jholland joined #nim
00:14:19*^aurora^ quit (Quit: Leaving.)
00:15:39AraqDemos: actually I quite like how C does strings.
00:15:58Araqand performance is unbeatable with c strings, when you handle them properly
00:16:02*fizzbooze joined #nim
00:16:22Araqof course if you use strlen, you're doing it wrong ;-)
00:17:44AraqDemos: btw I came to he conclusion that how Nim does overloading resolution is essentially sane (ignoring bugs) and only needs to be documented
00:18:00shalabhwell having a size prefix would be better.
00:22:25shalabhmaybe I'm biased because I worked a lot with web template rendering stuff
00:22:52shalabhstrings as value types for consistency is probably the right choice
00:23:06shalabhthere are not built in ref types afaik
00:23:53shalabhanyways, g2g ttyl.
00:24:11*shalabh quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
00:24:49*brson quit (Quit: leaving)
00:25:59DemosAraq, I agree with that. Honestly once bugs are fixed I bet nim's is /very/ close to c++'s
00:26:27AraqDemos: no, not even close
00:26:33AraqI looked at how clang does it
00:26:48Araqc++ is MUCH more complex than Nim. MUCH, MUCH. ;-)
00:27:15Demossorry I never really managed to make any headway there, sigmatch is frighteningly huge. And I meant it terms of how disambiguations actually happen. Not the technical implementation
00:27:39Araqclang's implemenation is at 3x as big
00:27:45Araq*at least
00:28:00Araqwith many more special cases
00:28:43DemosWell yeah, it is c++. But Nim is still compiler code with little documentation. And I don't know how compilers work at an intimate level.
00:29:45*a5i joined #nim
00:30:07Araqwell I spend a day recently fixing the most pressing bugs when it comes to overloading resolution
00:31:28Araqit's only hard to modify because it needs to continue to compile thousands of lines of code ;-)
00:35:32*fizzbooze quit (Quit: WeeChat 1.1.1)
00:36:28DemosSpeaking of overload resolution... Is there a technical reason why nobody does disambiguation based on return type? Does it reach out of the calling scope to much or something?
00:36:59AraqAda does do it.
00:37:34Araqand no, there is not much to it, C# requires to "reach out" too for () => () lambdas
00:38:34Demosyeah I always figured it was that people did not want to deal with the behavior when you ignore the return value
00:38:49Demosalthough you could always require explicit type params there
00:38:58Araqthat seems to be the primary reason indeed
00:39:37AraqAda even allows for enum value overloading:
00:39:44Araqtype Foo = enum X
00:39:50Araqtype Bar = enum X
00:39:59Araqproc callme(x: Bar)
00:40:08Araqcallme(X) # uses Bar.X
00:41:13*saml_ joined #nim
00:41:21Demosthat is actually really cool. So enum values can be dumped into parent scope but disambiguated only when needed
00:42:37Araqyeah maybe I should have copied that
00:42:38qwrhaskell typeclass methods actually do resolution based on return type very often
00:43:36DemosHm, Ada and Fortran '08 are two langauges that I really need to learn but that are really quite hard to learn because of lack of resources. No excuse though I could just find something in the university library.
00:43:54Demosand for all the bitching about ada's verbosity it looks much more terse than c++
00:43:59Araqqwr: haskell uses HM typing though
00:44:03Demosand probably compiles faster on modern computers too
00:44:34AraqAda's verbosity is hard to swallow
00:44:46Araqeven when you come from Pascal
00:44:53DemosAraq, talking with my haskeller friends it seems that only real reason to care about HM types and global inference is type holes.
00:45:00Araqand the tooling was never on par
00:45:25AraqI converted thousands of lines from Ada back to Delphi
00:45:55DemosI always got the impression that Ada went overboard and solved some problems multiple times
00:46:16Araqthere simply was no benefit, typing rules are stricter in Ada but compiletimes and debugging was much worse
00:46:23Demosbut it really does not look more verbose than c++
00:46:40Araqit also has the header/implementation split
00:47:00Araqthough it has a proper module system
00:47:30Araqand it has the worst stdlib string implementation in the history of mankind, last time I checked
00:48:08DemosYeah, I have heard stories about compile times. I can not believe that it still compiles slower than C with the memory-CPU perf gap and the fact that it has modules
00:48:09Araqbut then Ada programs usually do little string handling
00:48:30DemosI thought Ada was famously fast at string handling
00:48:58Araqwell if you don't use Unbounded_String, perhaps
00:49:14Araqbut most of the time you don't know the bounds of your strings
00:50:11AraqAda's builtin strings are based on Ada's arrays, which are value based, but can have a runtime size
00:50:28Araqso the implementation uses something like alloca()
00:50:34*reem quit (Remote host closed the connection)
00:50:38Araqthat's all there is to it, really.
00:51:42qwrDemos: c++ can be quite terse, verbosity comes usually from code style and libraries that you use
00:52:16AraqAda confuses verbosity with readability, IMHO
00:53:10Demosqwr, C++ is rarely terse as what you are trying to do grows
00:53:11Araqand what is a "limited" type anyway? fancy metaphors are not readable
00:54:38DemosI know it /can/ be, but it rarely is in my experience. And nim has the nice property of the terse code usually being /more/ readable
00:55:49*sampwing quit (Ping timeout: 252 seconds)
01:01:15*vendethiel quit (Ping timeout: 265 seconds)
01:02:51*reem joined #nim
01:05:16*reem quit (Remote host closed the connection)
01:05:51*reem joined #nim
01:07:29*dhasenan quit (Remote host closed the connection)
01:08:21Araqhrm actually
01:08:57Araqoverloading based on return type could only be applied in the var|let|const foo: SomeType = call() context
01:09:02*smodo joined #nim
01:09:08Araqthat's *very* simple to implement
01:09:31Araqand seems to be the only context where people actually want it
01:10:42Demosby could do you mean one could choose to only implement it in that context? or that it is much harder to implement in all contexts
01:10:57Araqand I like it much better than special magical allocate/init/whatever procs
01:11:18DemosAraq, or that typeinfo.name hack :":
01:12:02AraqDemos: much simpler to implement in the current compiler
01:12:14Araqin theory perhaps not more difficult at all
01:12:30Araqbut with the current compiler a specialized solution makes sense
01:12:57DemosOn one hand it is somewhat of a strange rule exception and rule. However on the other hand it may just feel like "Welp compiler could not infer types here, oh well"
01:13:24Demoswow that first sentence did not go so well
01:14:51Araqbut then we'll get 'init()' everywhere: var foo: Foo = init()
01:15:42Araqwhich is not sexy at all IMO
01:16:14DemosI agree with that. What about a macro in the macros modules that munges the name up?
01:16:26Demosreally not sexy at all implementation wise, but it works today
01:16:29Demosmore or less
01:16:38Araqalso factories are a problem again, since 'newFoo' can lie about the result type, but 'var foo: Foo = init()' cannot
01:16:56Araqor hrm, maybe it can
01:17:15Araqif 'init' returns a specialized subtype and the real Foo has no init
01:17:19Demoshow can newFoo lie?
01:17:29Araqproc newFoo(): ref Bar
01:18:22Demosor right. but the overload resolution we have will let you match with a derived type if you want.
01:18:26Demosor any compatible type
01:19:02VarriountAraq: I agree with the 'must declare the explicit type to get return type overloading' idea.
01:19:52DemosVarriount, I don't think it is an intentional restriction. I also don't think return type overloading can introduce any bugs that overloading by itself can not
01:20:51AraqDemos: well the restriction won't hurt either
01:21:14VarriountDemos: I'm aware of that.
01:21:39DemosAraq, Yeah I doubt anyone will care as long as the resolution works the way it does everywhere else
01:21:52Araqwell no, it works differently
01:22:00Araq1. build the set of overloads
01:22:23Araq2. restrict to the routines which return a T that fits
01:22:30Araq3. apply ordinary overload resolution
01:22:58Araqmaybe ~50 lines of code in the compiler
01:23:07Araqpossibly fewer
01:23:15Demosthat is the same on the outside. Since if the T did not fit things would anyways.
01:23:18DemosBut yeah
01:23:58Araqpoint 2 is problematic with generics though
01:24:31Demoshm how does var f = init[Foo](). I kinda like var f = init(Foo) myself
01:26:43Demosthe second one is proc init[T](t: typedesc[T]): T
01:27:17Araq"So do we care about constructors actually preventing bugs or is this all just about syntactic conveniences?" it's telling that nobody answered this question :P
01:28:54Araqgotta sleep, good night
01:39:44*akiradeveloper joined #nim
01:42:47*darkf joined #nim
01:54:37*coopernurse quit (Ping timeout: 246 seconds)
02:04:43*dhasenan joined #nim
02:08:32onionhammerAraq i care about preventing bugs... :)
02:27:46*teef joined #nim
02:29:42*reem quit (Remote host closed the connection)
02:30:16*reem joined #nim
02:31:46*Varriount quit (Ping timeout: 255 seconds)
02:32:51*Varriount joined #nim
02:33:53*bitcraft_ joined #nim
02:34:28*reem quit (Remote host closed the connection)
02:37:24*reem_ joined #nim
02:38:55*flaviu joined #nim
02:39:33*reem_ quit (Remote host closed the connection)
02:43:50*teef quit (Quit: Page closed)
02:49:42*sampwing joined #nim
02:52:06*madmalik quit (Quit: Connection closed for inactivity)
02:53:01*reem joined #nim
02:53:53*sampwing quit (Ping timeout: 252 seconds)
03:17:02*vendethiel joined #nim
03:25:13*chrisheller quit (Remote host closed the connection)
03:41:11*vendethiel quit (Ping timeout: 252 seconds)
03:46:41*ChrisMAN quit (Ping timeout: 252 seconds)
03:48:58*a5i quit (Quit: Connection closed for inactivity)
03:56:54*johnsoft quit (Ping timeout: 244 seconds)
03:57:10*johnsoft joined #nim
04:17:12*jholland quit (Quit: Connection closed for inactivity)
04:20:42*chrisheller joined #nim
04:22:10*saml_ quit (Quit: Leaving)
04:43:22*Sornaensis quit (Excess Flood)
04:43:58*Sornaensis joined #nim
05:00:22fowlAraq, not sure what you mean, getType(somebool) returns a symbol for bool
05:12:07*Demos quit (Read error: Connection reset by peer)
05:44:02*madmalik joined #nim
05:44:26*reem quit (Remote host closed the connection)
06:02:47akiradeveloperhow can I see the AST of type declaration?
06:03:50akiradeveloperAnd another question, is it possible to define pragma for type declartion? I want to generate proc from type
06:05:02*reem joined #nim
06:06:12*^aurora^ joined #nim
06:09:31akiradeveloper.eval dumpTree(type T = object)
06:15:12*Demon_Fox__ quit (Quit: Leaving)
06:15:54akiradevelopermacros module is buggy!?
06:22:28*reem quit (Remote host closed the connection)
06:24:44*reem joined #nim
06:32:40*ARCADIVS joined #nim
06:54:28*xificurC joined #nim
06:55:54fowlakiradeveloper, you can retrieve it with getType() in devel
06:56:07fowlakiradeveloper, hold on i have an example for you
06:58:24fowlhttps://gist.github.com/fowlmouth/9c40de9a3700868a7419
07:03:19*reem quit (Remote host closed the connection)
07:15:28*reem joined #nim
07:22:35*reem quit (Remote host closed the connection)
07:23:03*gsingh93 quit (Ping timeout: 244 seconds)
07:24:07*untitaker quit (Ping timeout: 250 seconds)
07:30:39*untitaker joined #nim
07:32:48*reem joined #nim
07:35:32*reem quit (Remote host closed the connection)
07:37:15*reem joined #nim
07:42:54*reem quit (Remote host closed the connection)
07:44:05*reem joined #nim
07:49:45*reem quit (Remote host closed the connection)
07:49:46*^aurora^ quit (Quit: Leaving.)
07:52:06akiradeveloperfowl: I see. This would be a great help
07:52:16*reem_ joined #nim
07:53:18fowldid you see the link
07:58:29*chrisheller quit (Remote host closed the connection)
07:59:58gokrMorning!
08:01:55akiradeveloperyes
08:03:19akiradeveloperI am not sure L19 is correct
08:27:40*reem_ quit (Remote host closed the connection)
08:28:13*reem joined #nim
08:29:56*Trustable joined #nim
08:30:05*vendethiel joined #nim
08:42:23fowlakiradeveloper, getType() returns a symbol you can recursively check
08:42:56fowlthat example is only useful for object types though
08:59:01*chrisheller joined #nim
09:00:40novistwould anyone care to comment? https://github.com/novist/Nim/commit/712f31fbd44cb116991440ce0fa8b1f113dc1bae
09:01:09novistim unsure, maybe i overdid it a bit. maybe it would be enough expanding positional arguments only, leaving -l/-L and similar alone?
09:03:29*chrisheller quit (Ping timeout: 252 seconds)
09:05:25*reem quit (Remote host closed the connection)
09:06:55*reem joined #nim
09:07:01*reem quit (Remote host closed the connection)
09:11:24*reem joined #nim
09:16:16*tumult joined #nim
09:35:12*kapil___ joined #nim
09:44:32*reem quit (Remote host closed the connection)
09:45:56*BlaXpirit joined #nim
09:46:54*davidhq joined #nim
09:50:18Araqfowl: I mean that 'true' and 'false' do not resolve to an int literal like they do in the compiler. that was confusing me ;-)
09:50:28Araqnovist: your patch is totally overdone
09:50:45Araqfor a start / works fine in paths on windows you don't need to normalization
09:50:52Araq*to do
09:51:02fowlAraq, i noticed that enums resolve to int literals but when i put them in code it is the enum value
09:52:35novistalright, ill remove normalization. how about -l/-L? they should be ignored too?
09:52:55Araqyes and if defined(gcc) or defined(llvmgcc) or defined(clang) or defined(tcc) or defined(bcc) is completely wrong
09:53:12Araqthat's not how can you do C compiler in the compiler itself
09:53:24Araq*you can detect the C compile
09:53:51novistoh rats. those are for what nim was compiled with.. well it was late yesterday :p
09:54:22Araqpragmas.nim must not depend on posix.nim
09:54:48Araqand IMO full paths should not be supported at all
09:55:46Araqabsolute paths are simply horrible style
09:56:01AraqI see no point in supporting them
09:56:30novistyou mean like line 410?
09:56:55*akiradeveloper quit (Ping timeout: 246 seconds)
09:57:30Araqyeah and speaking of which
09:57:30*epichero_ quit (Remote host closed the connection)
09:57:35novistits making sure so in case of full path its not treated as relative one and thus made invalid
09:57:51AraqpassL should not do anything to its passed string
09:58:08Araq.passL is not the same as the .link pragma
09:58:16Araq.link is for files
09:58:20Araq.passL for options
09:58:39novistso.. urhonimo misuses passL by passing a lib to it?
09:59:04Araqyep
09:59:16novistgreat, entire patch based on wrong assumption :D
09:59:27novistnevertheless it was interesting to do it
10:00:14Araqwell there are still issues with linking orders
10:00:34Araqthat might have been the reason why I had to use passL instead of link
10:01:01novisti see. this one "feature" of gcc always bugged me. idk why crapy vcc can ignore order but gcc not..
10:01:27Araqgcc still produces a.out files
10:01:45Araqtime doesn't pass in unix land
10:03:12novistlike linus said "if people are depending on bug its not a bug, its a feature" :|
10:10:01dv-probably because a thousand books teach people to expect a.out
10:15:25Araqthat must be the same books that failed to grasp for decades now that passing *untyped* streams of bytes around is fundamentally not a good way to compose systems ;-)
10:21:04novistbtw Araq i think this doesnt rly deserve PR so could you maybe whenever you commit next thing also commit chmod +x build.sh? unless there is good reason not to. its tedious to reset that file on every pull and readd +x after.
10:22:06*madmalik quit (Quit: Connection closed for inactivity)
10:26:40fowlyou only need to run build.sh one time
10:26:45fowlwhen bootstrapping
10:27:49novisthmm well guess i did it a bit wrong. still though. tiny convenience thing to not need reset before pulling after first bootstrap
10:30:49dom96you should just run 'sh build.sh'
10:47:43*arnetheduck joined #nim
10:48:28*chrisheller joined #nim
10:48:35*akiradeveloper joined #nim
10:49:29akiradeveloperoh, macros can't be recursive
10:51:01*BlaXpirit quit (Quit: Quit Konversation)
10:52:45*chrisheller quit (Ping timeout: 252 seconds)
10:53:45akiradeveloperbut once it's wrapped by proc, it can be recursive
10:58:18*epichero joined #nim
11:01:26def-akiradeveloper: a recursive macro would be strange, since the macro gets replaced with the resulting AST
11:03:16*epichero quit (Ping timeout: 272 seconds)
11:07:34akiradeveloperI can't accomplish even a very simple macro. what's wrong? https://gist.github.com/akiradeveloper/45d1c5874b29d32e039d
11:08:50novistakiradeveloper: macro has to produce AST, the way you do it you should use template (i think TM)
11:08:51def-it returns nil
11:09:15novistwe can return a code block as expr?
11:11:25def-akiradeveloper: i'm not sure what you're trying to do
11:11:30akiradeveloperI see. returning lambda is ok but I should create some proc node to return right?
11:13:21fowlakiradeveloper, return quote: before your code
11:13:28fowland remove the .intval
11:14:07fowlas it is it could be a template if you remove the .intval
11:15:15def-Or with parseExpr: https://gist.github.com/def-/c3938ed802c810243bd8
11:15:34fowlhttps://gist.github.com/fowlmouth/dc11f21ebd280be7f0b2
11:16:57akiradeveloperit's so free
11:18:25fowlnovist, yes
11:18:48akiradeveloperfowl:Error: `quote` cannot be passed to procvar
11:18:56novistwow this still does not stop to amaze me
11:19:13akiradevelopershould switch to devel?
11:19:26akiradeveloper(I want something like rvm)
11:19:30fowlyou should be on devel its got bug fixes and new features
11:19:36fowlthere is a nim-vm
11:19:47fowlhttps://github.com/ekarlso/nim-vm
11:21:49akiradevelopernim-vm is great! I will try devel. btw, when it would be devel branch is merged into master?
11:23:02def-when 0.10.4 is released
11:23:40ggVGchow can I build the the documentation into the HTML output that is hosted online?
11:23:52def-ggVGc: ./koch web
11:23:57ggVGcthanks
11:24:44fowlakiradeveloper, fixed mac()
11:25:59akiradeveloperfowl: it's working with 0.10.2
11:26:13fowl0.10.2 doesnt have getType
11:26:20fowlso its not useful imo
11:27:48akiradeveloperyes. I didn't catch up with 0.10.3
11:31:50akiradevelopernim-vm is installed and now using devel yeah
11:34:44def-ggVGc: if you're trying to build the doc from devel branch, there's a small problem which prevents it. should be fixed here: https://github.com/Araq/Nim/pull/2310
11:36:04fowldef-, nimdoc usually uses the same code as linux
11:36:13def-fowl: not in the async* stuff
11:36:40fowlwhen define(linux) or define(nimdoc)
11:36:46fowloh how come
11:37:03def-I don't know
11:47:03*akiradeveloper quit (Remote host closed the connection)
11:52:08*filwit joined #nim
11:58:07*akiradeveloper joined #nim
11:59:16*epichero joined #nim
12:00:27akiradeveloperhow can I compile this? https://gist.github.com/akiradeveloper/ad48385fbee3b4fd9a68
12:00:57fowlakiradeveloper, dumptree: code
12:01:03*minus2 joined #nim
12:01:08fowlthe echo is unnecessary
12:01:47akiradeveloperoh!!!
12:02:00akiradeveloperamazing
12:05:04akiradevelopertuple[key: int, val: int] and tuple[key, val: Msg] are different in AST. This is obvious but annoying
12:05:59*a5i joined #nim
12:06:11*jaapz left #nim (#nim)
12:08:33fowl.eval import macros; dumplisp: (tuple[a,b: int], tuple[a:int, b:int])
12:09:02fowli guess the bot isnt working
12:12:34*kapil___ quit (Quit: Connection closed for inactivity)
12:24:42*minus2 quit ()
12:26:39*epichero quit (Read error: Connection reset by peer)
12:27:03*epichero joined #nim
12:30:55*aleron joined #nim
12:44:12*n3vtelen joined #nim
12:45:41*LoneTech joined #nim
12:47:42LoneTechhello. I'm trying to compile the front page example with the spawns, and it produces a different error from the expected one: "cannot prove: i <= len(a) + -1". No matter how constant a is; even with while i<4 it says things like cannot prove: i <= 5
12:49:29LoneTechjust got past that case and get the terribly helpful Error: (i)..(i) not disjoint from (i)..(i)
12:49:45LoneTech(had to make i a subrange type)
12:51:26*wb joined #nim
12:51:30*epichero quit (Remote host closed the connection)
12:52:05Trixar_zaAraq: http://www.xkcd.com/
12:52:38dom96LoneTech: Report it on github please.
12:53:02Trixar_zaNoting the first two has been actually said about Nim. And by programmers.
12:54:34*akiradeveloper quit (Remote host closed the connection)
12:54:51LoneTechI'm at a loss as to what to report. The example isn't even close to compilable, and I'm a newbie.
13:00:52LoneTechhttp://pastebin.com/L4yb9V3g is where I've got so far
13:08:24*mpthrapp_ joined #nim
13:10:24def-LoneTech: really weird. I don't see you doing anything wrong, but then I've never used this parallel stuff
13:10:25def-it goes back to your old error with "const a = [1,2,3,4,5,6]" instead
13:10:25def-this should definitely not be on the front page if it doesn't even work
13:11:05alerondef-: that's a really great line, it should be in a quote bot somewhere
13:12:25ggVGcI hvae to say, I was just about to dive into rust after following it for months, and all of a sudden nim pops into my life from nowhere, and damn it looks pretty ace
13:12:40ggVGcand perfect for what I've currently been using a C/Lua combo for
13:13:18*n3vtelen left #nim (#nim)
13:15:57LoneTechmaybe it's trying to make thread closures that wrap a[i] including the indexing operation, and thus complains about a shared i?
13:19:12LoneTechactually the rules described in http://nim-lang.org/manual.html#spawn-statement seem to make the whole demonstration moot. I'm confused.
13:19:51def-LoneTech: I would say something is just wrong with the disjoint checker
13:20:48def-look 2 sections below for a working parallel-spwan example
13:21:01gokrAraq went out for a sec, he can probably answer when he gets back
13:22:03def-or even 1 section
13:22:23LoneTechright, pi example runs
13:23:46LoneTechhad to increase the iterations quite a lot to demonstrate parallelism, and it spends most of its time in sys showing silly inefficiency, but it does run (time shows real<user+sys)
13:26:58LoneTechalso managed to modify pi example into one that shows a reasonable disjoint complaint
13:27:26def-LoneTech: got it working
13:29:27def-https://gist.github.com/def-/f23b20bc2827f6cfbdc6
13:29:46def-it needs to be inside a proc to work
13:30:55def-and needed the countup
13:31:41LoneTechthank you. I had not found countup
13:32:13*Jehan_ joined #nim
13:35:51LoneTechstill, that means even taken as a snippet the front page example doesn't compile with a different error than expected
13:37:02LoneTechwhen I put it into a proc it sanely complains that it would index out of range with a.high+1
13:38:38LoneTechI really wonder why changing the condition from i<=a.high to i<a.high changes the error from can prove: i + 1 > 5 (true) to can prove: i > 5 (huh?)
13:39:56LoneTechchanging it to i <= a.high-1 works
13:42:55def-LoneTech: I added the example to the issue: https://github.com/Araq/Nim/issues/2287
13:42:55*mpthrapp quit (Remote host closed the connection)
13:43:35*Aszarsha joined #nim
13:44:28LoneTechthanks
13:44:45def-LoneTech: some problem with translating < to <= in the disjoint checker, I'd say
13:45:20LoneTechnim-mode seems to have gone 404
13:49:24def-LoneTech: seems to work for me, where's the link?
13:50:25LoneTechhttp://nim-lang.org/question.html editor support
13:50:59LoneTechthere seem to be three other repos
13:51:17def-I always went with this list: https://github.com/Araq/Nim/wiki/Editor-Support
13:52:24*epichero joined #nim
13:53:50*aleron quit (Quit: leaving)
13:55:06*akiradeveloper joined #nim
13:55:10LoneTechthat linked to yet another repo. it's cute how the only information on actually using elpa is from an unattributed poorly edited comment.
13:56:45*epichero quit (Ping timeout: 244 seconds)
13:57:11*chrisheller joined #nim
13:59:51*akiradeveloper quit (Ping timeout: 256 seconds)
14:11:08*akiradeveloper joined #nim
14:20:09*ChrisMAN joined #nim
14:33:09*jsudlow__ joined #nim
14:33:56*jsudlow quit (Ping timeout: 246 seconds)
14:36:28*pregressive joined #nim
14:39:58*banister joined #nim
14:53:06*epichero joined #nim
14:53:30*jholland joined #nim
14:56:25*aleron joined #nim
14:57:41*epichero quit (Ping timeout: 246 seconds)
14:59:29*BlaXpirit joined #nim
15:11:12*akiradeveloper quit ()
15:22:52*darkf quit (Quit: Leaving)
15:26:40*wb quit (Quit: See y'all around)
15:31:58*nande joined #nim
15:36:25*chrisheller quit (Remote host closed the connection)
15:38:21*pregressive quit (Remote host closed the connection)
15:45:47*madmalik joined #nim
15:47:36*aleron quit (Quit: leaving)
15:48:23*Jesin quit (Quit: Leaving)
15:49:59*chrisheller joined #nim
15:51:49*pregressive joined #nim
15:53:47*gmpreussner|work quit (Read error: Connection reset by peer)
15:54:11*Jesin joined #nim
16:04:20*epichero joined #nim
16:12:50*AckZ quit (Ping timeout: 265 seconds)
16:13:18*mnemonikk quit (Ping timeout: 265 seconds)
16:14:18*tmku quit (Ping timeout: 265 seconds)
16:14:46*Shoozza quit (Ping timeout: 265 seconds)
16:14:58*tmku joined #nim
16:15:51*mnemonikk joined #nim
16:16:52*brson joined #nim
16:17:04*Shoozza joined #nim
16:19:24*a5i quit ()
16:22:14*AckZ joined #nim
16:31:51*TEttinger quit (Ping timeout: 244 seconds)
16:33:33*TEttinger joined #nim
16:43:04*Aszarsha quit (Ping timeout: 252 seconds)
16:43:42*wb joined #nim
16:45:41*ARCADIVS quit (Quit: ARCADIVS)
16:50:29*wb_ joined #nim
16:54:48*wb quit (Ping timeout: 256 seconds)
16:54:55*pregressive quit (Remote host closed the connection)
16:55:17*pregressive joined #nim
16:55:53*gmpreussner|work joined #nim
16:56:41*pregressive quit (Remote host closed the connection)
16:57:10*pregressive joined #nim
16:58:43*pregressive quit (Read error: Connection reset by peer)
17:08:07*enquora joined #nim
17:09:31*nimnoob123 joined #nim
17:15:07*tumult quit (Ping timeout: 246 seconds)
17:30:30*epichero quit (Remote host closed the connection)
17:42:30*^aurora^ joined #nim
17:48:38*nande quit (Read error: Connection reset by peer)
17:53:01*icebattle joined #nim
17:55:58*edayo joined #nim
17:56:45*edayo quit (Client Quit)
18:01:23*chrisheller quit (Ping timeout: 252 seconds)
18:04:32*jefus joined #nim
18:09:49*gsingh93 joined #nim
18:18:59*chrisheller joined #nim
18:21:02*quasinoxen quit (Read error: Connection reset by peer)
18:22:19*quasinoxen joined #nim
18:30:27nimnoob123EventType and Event is probably the most annoying types in the sdl2 bindings port
18:31:13*epichero joined #nim
18:31:44*epichero quit (Read error: Connection reset by peer)
18:32:03nimnoob123constant can't initialize type errors if you try to use them in your object as a variable type, even when initializing them through the object initializer
18:32:15*epichero joined #nim
18:33:34fowlnimnoob123, please tell Araq how much that bothers you, in the mean time `var event = sdl2.defaultEvent` will stop the errors
18:34:02nimnoob123they don't stop the errors when trying to use it inside an object
18:34:50nimnoob123let me create an example gist to show you my frustration
18:35:07fowlok
18:38:22Araqwhat?
18:38:26ekarlsoflaviu: ping
18:38:35Araqnimnoob123: what bothers you?
18:38:45fowlforced initialization
18:39:02fowlat least give us a pragma to get around it -_-
18:39:40Araqwell it's a warning
18:39:44Araqyou can turn it off
18:39:48fowlits an error
18:39:59Araqoh
18:40:00nimnoob123trying to figure out if there's something more to my issue than I make it out to be
18:40:29*Matthias247 joined #nim
18:43:06nimnoob123https://gist.github.com/G4MR/157932e01f5b5f58ef3c line 11 & 23 if I compile this: https://gist.github.com/G4MR/075e0d7e2d073fc3cd61 I get an error: "field not initialized draw_proc", now if I remove any occurrence of etype everything works as expected
18:44:05nimnoob123I've tried a handful of 'workarounds', but nothing really works for sdl2.eventtype or sdl2.event
18:47:11nimnoob123Now I say there has to be a bigger issue because I created a simpler object to test the same thing without issue, so I'm wondering if I failed somewhere else within my code. Since those lines cause everything else to fail unless I remove them
18:48:00Araqbtw you don't need the ': void' everywhere
18:48:16AraqI wish I knew why people do this, no tutorial does that
18:48:16nimnoob123i know, but I like it
18:49:05nimnoob123feels more consistent (reading wise) with other procs/methods that actually return a type
18:49:32Araq*shrug*
18:50:45def-Araq: I guess they do it mostly because it's what they're used to from some other languages
18:51:11def-You wonder how to write a proc without a return type, think about C, remember "void", try it out, and it works
18:52:21Araqnimnoob123: if isNil(self.events_proc) == false: # 'not' is a thing in Nim
18:53:07nimnoob123im just using the features that are available to me
18:53:40nimnoob123but yeah I'd rather figure out my issue first than changing syntax related things
18:54:20Araqwell EventType is some enum that doesn't have 0, so it needs to be initialized
18:55:01nimnoob123yeah and when i try to initialize it with say EventType.QuitEvent it throws an error regarding my draw_proc method, if I remove the event type stuff all together it doesn't throw that error
18:55:37nimnoob123which doesn't really make sense to me
18:55:39Araqwell that looks like a compiler bug
18:56:00nimnoob123im using the latest from github
18:59:19nimnoob123def- yeah I guess that make sense, I don't really realize I'm doing it tbh. I've written a void proc both ways, forcefully w/out the void and instinctively with void lol ¯\_(ツ)_/¯
19:00:04fowlAraq, no pointer type should have to be initialized unless its "not nil"
19:00:08Araqnimnoob123: fixed. can I have a test program?
19:00:16Araqor an issue number?
19:00:20nimnoob123yeah let me pull latest, sec
19:00:30nimnoob123oh let me upload to github
19:00:42Araqnimnoob123: no, I want an issue
19:00:48Araqhaven't pushed anything
19:00:58nimnoob123oh, sec
19:01:03Araqfowl: yes, I fixed that as well
19:02:13*smodo quit (Quit: Leaving)
19:05:40nimnoob123Araq: Didn't know how to title it: https://github.com/Araq/Nim/issues/2316
19:06:12fowlnimnoob123, you know how to get past taht right? draw_proc = nil, ... for each proc field
19:07:05fowlweird the existence of EventType makes it care about initialized fields
19:08:59nimnoob123yeah, just tried that. works when i set everything to nil - weird because it doesn't care at all w/out the EventType
19:10:16nimnoob123guess it's time to wait to see Araq's changes
19:11:06nimnoob123have to admit, i've been kind of gitty when i started this project lol went out and bought a domain too :#
19:11:28fowlnimnoob123, what do you store EventType for?
19:12:52nimnoob123well before i tried to just pass it to the events method (or events_proc) and I got an error regarding initializing EventType/Event
19:13:04nimnoob123so I said lets try storing it to see if that works
19:13:08nimnoob123then I sort of gave up
19:13:08*madmalik left #nim (#nim)
19:13:33nimnoob123"hey those kind folks on irc know this stuff better than me, worth a shot" :)
19:15:49fowlcan i make a suggestion since you're using a vtable-like pattern
19:15:56nimnoob123sure
19:17:43nimnoob123ah just noticed he put up the fix, gonna test it now
19:17:54fowlseparate your vtable from App like so https://gist.github.com/fowlmouth/2862a0569295102e21e5
19:19:06nimnoob123alright cool, will try it out
19:19:28fowlif you needed to call a super method from your app you can call it like defaultVT.draw(app)
19:19:35*reem joined #nim
19:21:00nimnoob123ye, looks good. I'll test it out and see how it goes.
19:21:23Araq # Before you say, hey this isn't initialized,
19:21:25Araq # uncomment the next line!
19:21:40Araqbut the next line initializes q, not p ...
19:26:16nimnoob123compiles now :)
19:27:09nimnoob123is nim targetting a summer 1.0 release like rust? just out of curiosity
19:27:45Araqdunno, progress is decent so I still hope we can release 1.0 earlier
19:28:23nimnoob123that'd be nice
19:33:27*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
19:34:06*bcinman joined #nim
19:36:12*bcinman quit (Client Quit)
19:36:42*pregressive joined #nim
19:38:23*bcinman joined #nim
19:47:11Araqlol I confused unary - with unary < in the disjoint checker
19:48:13filwit141 users looks like a new record, dom96
19:48:36filwitaccording to your gist: https://gist.github.com/dom96/da2d4dead6fb00b71312
19:51:53*epichero quit (Read error: Connection reset by peer)
19:52:02*epichero joined #nim
20:08:09*Aszarsha joined #nim
20:10:14nimnoob123are there any ide projects in the work?
20:10:38onionhammernimnoob123 yeah aporia
20:10:44onionhammerbut nimlime is far superior :)
20:10:45nimnoob123oh yeah derp
20:10:51onionhammerin my biased opinion :P
20:11:03nimnoob123i could never get aporia working on windows, can't remember why
20:11:13onionhammeri've gotten it working on win before
20:11:24onionhammerthere's a lot of dependencies u need to get before it'll run
20:11:36nimnoob123i tried nimlime, but it screws up my tabbing
20:11:47onionhammeroh?
20:11:51onionhammerin what way?
20:11:53nimnoob123it would double tab (8 space) over 4 space for some reason
20:12:06onionhammerthat... doesnt sound right
20:12:12nimnoob123so I just ripped the syntax highlighter out
20:12:16nimnoob123lol
20:12:18onionhammerI helped write it and I always use 4 spaces
20:12:35nimnoob123i haven't tried it recently, this was maybe a month ago
20:12:48onionhammeryeah month wouldnt be a big change
20:16:05onionhammeraraq nimsuggest is giving me websockets.nim(12, 66) Error: cannot open 'sha1'
20:16:19onionhammeraraq but sha1 module is installed (via jester) and websockets.nim compiles
20:17:05nimnoob123onionhammer, is the keyword list updated in the syntax highlighter for nimlime? there's some keywords like "not" that display like a variable
20:17:21nimnoob123(note I haven't updated in over a month or so)
20:18:21onionhammernot is considered an operator
20:18:32nimnoob123ah
20:18:33onionhammerhow ST highlights operators depends on your theme
20:18:37nimnoob123guess that makes sense
20:20:51nimnoob123guess ill try nimlime again w/ the latest dev version of ST3 (so glad he's working on ST again)
20:21:33onionhammeryeah thats a relief
20:21:46onionhammerI would also clone directly from the nimlime repo into your packages folder rather than getting the version on package control
20:22:03onionhammerwe're working towards another release to package control but the one out there is pretty out of date
20:22:44*wb_ quit (Quit: See y'all around)
20:23:26nimnoob123alright
20:27:24*pregressive quit (Remote host closed the connection)
20:28:40*icebattle quit (Read error: Connection reset by peer)
20:29:46*icebattle joined #nim
20:29:46*icebattle quit (Client Quit)
20:32:30*pregressive joined #nim
20:34:31*pregressive quit (Remote host closed the connection)
20:35:27*pregressive joined #nim
20:43:47*chrisheller quit (Remote host closed the connection)
20:50:31*^aurora^ quit (Quit: Leaving.)
20:54:56*^aurora^ joined #nim
20:57:18*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
20:58:42*reem quit (Remote host closed the connection)
20:59:12*mpthrapp_ quit (Remote host closed the connection)
21:00:33*reem joined #nim
21:01:27*bcinman joined #nim
21:03:04*reem quit (Remote host closed the connection)
21:05:46*fizzbooze joined #nim
21:12:37*reem joined #nim
21:12:54*chrisheller joined #nim
21:25:02*fizzbooze quit (Ping timeout: 252 seconds)
21:25:32*chrisheller quit (Read error: Connection reset by peer)
21:27:40flaviuekarlso: pong
21:28:35*chrisheller joined #nim
21:32:58fowlonionhammer, should i subclass pp::test to test clibpp or make another 2 classes
21:37:12onionhammerfowl up to you as long as it covers it
21:37:16onionhammeri dont have a preference
21:37:30fowlalright
21:37:34nimnoob123A bit off topic, but do any of you guys have an inbox account (new google inbox for mobile thingy)
21:37:36onionhammerthanks!
21:37:40ekarlsoflaviu: pp::test ? :P puppet ? :p
21:37:57ekarlsoonionhammer: http://185.56.186.94/#/
21:38:23ekarlsoflaviu: updated to handle options also ..
21:38:39nimnoob123does it support nimble ;)?
21:38:51flaviuekarlso: Looks great, let me see if it still has security holes
21:38:59fowlekarlso, needs sharing links
21:39:00ekarlsoflaviu: :p
21:39:03ekarlsofowl: ...
21:39:27fowlare they there and i dont see them?
21:39:32ekarlsofowl: not yet ;p
21:39:46fowloh
21:39:56fowlgood choice on the material ui, looks really nice
21:40:11flaviuekarlso: I think fowl is joking, but a url symbol for a permalink in the corner of the input and output boxes would be great.
21:40:46ekarlsoif someone wants syntax highlight also please submit a "mode" to ace editor to give us syntax highlighting ! :D
21:41:35*BlaXpirit_ joined #nim
21:43:57flaviuekarlso: The response upon an error is to just return 502 with a stack trace.
21:44:16ekarlsoflaviu: ....
21:44:24*BlaXpirit quit (Ping timeout: 245 seconds)
21:44:26ekarlsothat's dom96's fault for having sad error handling :p
21:44:27flaviuIt might be better if a dialog or whatever the material equivalent is showed up.
21:44:28ekarlsoin jester :P
21:44:43flaviuekarlso: yep. But users won't know that.
21:44:50ekarlso:p
21:45:21ekarlsodom96: fix fix :p
21:45:31flaviualso, --passC:-O3 fails.
21:45:51fowlsurely you can set an error handler?
21:46:35ekarlsoflaviu: meh :(
21:46:41ekarlsoflaviu: how to allow for all options -,,-
21:46:55ekarlsofowl: nope I dont think so :P
21:47:25ekarlsonot that I can see here at least : https://github.com/dom96/jester/blob/master/jester.nim
21:49:44ekarlsosuggestiosn for how to allow that flaviu ?
21:49:59flaviugive me a moment
21:57:49flaviuekarlso: Make a temporary directory, dump the command as-is into a file in that directory, bind that dir read-only to the playpen, and run `sh /command`.
21:58:30flaviuThat works because you have 100% control over what gets sent to the shell, and the `sh /command` is in the sandbox so you don't care what it does.
21:59:09ekarlsoonly thing that annoyed me flaviu was how the mount stuff worked :/
21:59:15ekarlsocouldn't really get hang of that
22:00:05*chrisheller quit (Ping timeout: 252 seconds)
22:02:59flaviuit binds /foo/bar/ to sandbox_loc/foo/bar/
22:03:14flaviusource code is pretty short: https://github.com/thestinger/playpen/blob/master/playpen.c
22:04:49*matkuki joined #nim
22:06:34matkukiI'm playing around with linear equations and get a return float value when echo-ing "1.#INF". What is that?
22:09:47*shalabh joined #nim
22:11:03shalabhhello
22:11:10shalabhhow do i print the type(x)
22:11:20Araqmatkuki: fixed in devel
22:11:28Araqbut it means "infinity"
22:11:49Araqshalabh: import typetraits
22:13:08shalabhAraq:ok
22:13:45ekarlsoflaviu: so what, write the command to a shell script ? ^
22:13:57ekarlsoflaviu: how to detect status then -,,-
22:14:01ekarlsoor exit code
22:14:35flaviu"the exit status of the script is the exit status of the last command executed in the script"
22:14:49ekarlsook :p
22:14:51flaviuso just add an exit at the end of the script
22:15:32matkukiAraq: Thanks.
22:15:35shalabhhmm didn't work
22:16:24shalabhtest.nim(20, 7) Error: type mismatch: got (typedesc[Obj])
22:16:59shalabhok name(type(x)) works
22:17:11*chrisheller joined #nim
22:17:44shalabhbut type(x).name doesn't work
22:18:33shalabhweird
22:18:59shalabhtype(x).name is not the same as (type(x)).name ?
22:19:12shalabhoh type probably isn't a proc
22:20:23shalabhAraq:so after playing around I think strings being value types is the right choice for consistency
22:20:47shalabhI was under the impression isn't not fully consistent (from earlier irc conversations and forum messages)
22:21:02shalabhbut looks like it's actually quite consistent with 'object'
22:21:59ekarlsoonionhammer: did you ever get a readme going ? :p
22:23:01Araqshalabh: the type() parsing has been reported already
22:24:13*fizzbooze joined #nim
22:24:43shalabhAraq:heh ok. I hit quite a few confusing moments, in particular `echo (type(x)).name` didn't work either.
22:25:00shalabhbut I think I figured it out. That is really `echo(..).name`
22:38:36*chrisheller quit (Remote host closed the connection)
22:39:06*vendethiel quit (Ping timeout: 252 seconds)
22:40:47nimnoob123thanks on the typetraits stuff, been wanting to figure that out for a while now
22:41:08*pregressive quit ()
22:41:18^aurora^Araq: should i file a bug-report regarding this strange issue compiling something with "-d:ssl" on osx and getting all kinds of strange SIGSEGV errors afterwards? you asked me to disable all code in CRYPTO_malloc_init and this indeed helped for me, but i have to do it always again as soon as i update …
22:41:29*vendethiel joined #nim
22:42:00Araq^aurora^: it's called a "PR" aka "pull request"
22:42:08Araqmight want to do that :P
22:42:42^aurora^ok :P but is it the right way to do it? … maybe there are unwanted side-effects on other platforms afterwards :)
22:43:26Araqwell we never did it on windows
22:43:34Araqso surely it cannot be too bad
22:43:52^aurora^ok … than … PR is coming soon. thanks :)
22:43:57Araqthere are more ssl issues btw
22:44:32Araqhttp://forum.nim-lang.org/t/999
22:45:18AraqOpenSSL is such a joke ...
22:45:35^aurora^oh ok … good to know … so far everything seems to work quite good for me :)
22:53:40onionhammerekarlso nei
22:54:13onionhammerekarlso werent u going to update the readme w/ instructions for setting up via vagrant? :P
22:58:13matkukiIs flaviu here?
22:59:15*xificurC quit (Ping timeout: 250 seconds)
23:02:46matkukiflaviu's OOP macro fails to compile with 'devel': Error: illformed AST: static[MyVar: string]
23:04:27*vendethiel quit (Ping timeout: 245 seconds)
23:06:10flaviumatkuki: I'm here, one moment.
23:06:53matkukiflaviu: Thanks. It fails at the first attribute of my class, if it helps.
23:11:10*chrisheller joined #nim
23:12:14reactormonkmatkuki, just toss him some code
23:12:34flaviuI haven't pulled upstream devel in a while, I'
23:12:39flavium compiling it atm
23:12:40matkukino problem, just a sec...
23:16:52matkukiflaviu: This is your OOP macro, that you helped me modify a bit: https://bpaste.net/show/b223a52c9e62
23:16:53matkukiAnd this is my abbreviated class example that fails: https://bpaste.net/show/50119189b126
23:20:33*girvo joined #nim
23:20:53flaviumatkuki: works for me
23:22:17*Trustable quit (Remote host closed the connection)
23:24:17flaviumatkuki: Try pulling the very latest devel
23:29:30matkukiflaviu: That did it! Repulled, recompiled and reinstalled everything and it works!
23:29:31matkukiProbably forgot to copy everything the last time. Thanks again!
23:29:57flaviunp
23:33:06*Matthias247 quit (Read error: Connection reset by peer)
23:39:27*epichero_ joined #nim
23:39:36*gmpreussner|work quit (Read error: Connection reset by peer)
23:40:42*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:40:53*epichero quit (Read error: Connection reset by peer)
23:50:11*chrisheller quit (Remote host closed the connection)
23:54:08*filwit quit (Ping timeout: 256 seconds)
23:58:21*chrisheller joined #nim