<< 09-06-2015 >>

00:00:59*kumul joined #nim
00:01:21*vbtt_ joined #nim
00:05:44onionhammer@Varriont it doesnt seem to add anything...
00:06:03onionhammerCould not import subprocess32 module, falling back to subprocess module
00:06:25Varriountonionhammer: Any errors?
00:06:34onionhammerthat was the error
00:07:22Varriountonionhammer: Do you have SublimeCodeIntel installed?
00:07:28onionhammernope
00:07:59Varriountonionhammer: What's the ST3 build number?
00:08:21onionhammer3083
00:11:02*flaviu joined #nim
00:11:04*federico3 quit (Ping timeout: 245 seconds)
00:11:15*datanois1 quit (Ping timeout: 250 seconds)
00:11:20onionhammeri can do a screencast with u tomorrow maybe
00:11:35Varriountonionhammer: Hm. That would be helpful.
00:13:05onionhammerMaybe even later today
00:13:38onionhammerTomorrow is my designated tinkering day though
00:14:10onionhammerUntil my gf starts her job at the end of the month anyway :p
00:29:32*datanois1 joined #nim
00:34:35*vikaton joined #nim
00:38:25*federico3 joined #nim
00:42:06vikatonHey
00:42:30VarriountHello vikaton
00:42:30dtscodeo/
00:42:35dtscodeVarriount:
00:42:41dtscodemake it christmas ;-;
00:42:45vikatonHow are ya Varriount
00:42:50*Jehan` quit (Quit: Leaving)
00:43:19Varriountdtscode: As much as I would like it to be otherwise, I do not have magic weather powers.
00:43:27dtscodeD:
00:44:09dtscodeI should make a repo for something that involves Christmas
00:44:32*jaco60 joined #nim
00:46:59*brson_ joined #nim
00:47:37*brson quit (Ping timeout: 244 seconds)
00:48:11*zero_coder quit (Quit: EliteBNC - http://www.elitebnc.net/)
00:54:04*brson_ quit (Quit: leaving)
00:54:11*brson joined #nim
00:56:34Varriountonionhammer: You still up?
00:58:15onionhammerYeah
00:58:47*dddddd quit (Ping timeout: 276 seconds)
00:58:56Varriountonionhammer: Do you have more than one window open?
00:59:16vikatononionhammer: dont answer !
00:59:22vikatonjk, im b0red
00:59:29*Varriount pushed vikaton down.
00:59:57Varriountonionhammer: Try the latest commit. I just tested on Ubuntu, and fixed an import bug.
01:01:01onionhammerMaybe. I'm on my phone now, I'll try later
01:02:50Varriountonionhammer: What? You don't run virtualbox on your phone? :3
01:03:12*jaco60 quit (Ping timeout: 265 seconds)
01:06:59*fioco joined #nim
01:07:17fiocoMay I please have some help with array indexing?
01:07:22fioco(in Nim)
01:11:29*BitPuffin|osx quit (Ping timeout: 250 seconds)
01:13:57vikatonwe need a bot
01:14:02vikatonwell we have one
01:14:10vikatonbut someone gotta keep putting it here
01:14:24*pregressive joined #nim
01:16:04onionhammerVarriount even if I did its my Mac you want to test
01:16:07onionhammer:p
01:19:22*ozra quit (Ping timeout: 246 seconds)
01:21:56Varriountonionhammer: Darn. I don't have a copy of OSX
01:22:10Varriountfioco: Ask away
01:23:49*johnsoft quit (Ping timeout: 255 seconds)
01:25:05*johnsoft joined #nim
01:25:56fiocohttp://pastebin.com/n2A5MrYb <- I want x.html from that
01:26:12fiocoI get 1 before x.html
01:28:19*filwit joined #nim
01:31:50*zero_coder joined #nim
01:34:03fiocoVarriount:^^
01:34:12fiocoAnd thanks
01:34:27Varriountfioco: First off, please be aware that split creates new string objects each time. Second, ranges are inclusive on both ends - [1,2,3][0..2] returns [1,2,3]
01:35:01fiocoOk
01:35:49*Roin quit (Ping timeout: 264 seconds)
01:36:17filwitnotfowl, Varriount, fffff: the other day i posted a gist about 'auto composition' as an alternative to inheritance in Nim, mostly a way to avoid the runtime typeinfo overhead associated with inheritance.. for the sake of completeness I just wanted to point out that Nim already supports what I was after with the {.pure inheritable.} pragmas, I just didn't realize {.pure.} could be applied to objects and limit their abilities (eg, you
01:36:18filwitcan't *really* us 'of' and/or methods)
01:36:50filwituse*
01:37:52filwitanyways, that's pretty cool, my compliments to the chef(s)
01:40:52*boop is now known as boopisaway
01:42:50onionhammer@varriount i pulled and it said already up to date
01:43:22onionhammeranyway, weird, looks like it work s;)
01:43:39onionhammer@varriount fixed!
01:44:29Varriountonionhammer: Yay!
01:44:51ddddddddfilwit: wow thats nice
01:45:40Varriountfilwit: Now it needs to be documented. :D
01:45:43*zero_coder quit (Quit: EliteBNC - http://www.elitebnc.net/)
01:46:02filwitVarriount: it is documented, but perhaps not the best
01:46:51*brson quit (Quit: leaving)
01:46:58filwiti was trying to lookup something else in the docs and came across it and realized it was exactly what I was talking about before... tried it out and it already functions like my gist!
01:47:05filwitso was pretty impressed
01:47:47VarriountHrm. I really wish the 'pure' pragma didn't have such disparate effects.
01:48:18filwityeah that's the confusing part really
01:48:34filwiti just assumed .pure was a enum only thing (was it at one point?)
01:48:52Varriountfilwit: Yeah... That needs to change. It doesn't make sense at all.
01:50:36Varriountfilwit: Could you point me out to the part in the documentation you discovered?
01:50:36filwitwell i mean it's not exactly a horrible situation or anything.. clearer documentation might be enough.. but ideally it would be good to have 2 distinct pragmas IMO, I agree
01:50:51filwithttp://nim-lang.org/docs/manual.html#pragmas-pure-pragma
01:51:40filwitit mentions that the runtime typeinfo is omitted.. which is what caught my eye.. but it doesn't mention anything about restricted of/method use
01:52:27VarriountHm. I think it makes sense to let 'pure' remain as a no-typeinfo effect, and create a new name for the enum effect.
01:52:34filwityou can still use 'of'.. but only when the compiler can see all required type info.. otherwise it gives you and compiler error
01:53:28VarriountWhat would be a good name? 'noImplicitFields'? 'qualifiedMembers'?
01:53:45Varriount'qualifyFields'?
01:55:56filwithonestly I think {.pure.} for both isn't horrible.. and honestly the real solution is to eventually make enums symbol resolution was a bit more intelligent (so they don't conflict where they don't apply)
01:56:41Varriountfilwit: Wildly varying behaviors dependant on context is not a good thing.
01:57:39filwitwell i agree, but {.pure.} on enums could even be considered temporary IMO.. if the resolution rules where a bit better there would be very little to no reason to even have {.pure.} ability..
01:58:12Varriountfilwit: Except for those who *want* full qualification.
01:59:43filwitbut yeah, if a name change was in order I'd be in favor of something obvious like 'requireTypeName` or 'pureSymbols', etc
02:00:53filwitanything that was roughly similar to that.. i used to use .pure enums all over, now I only use them when I really need to avoid conflict (I don't do hungarian notation though..)
02:01:31filwitso it's no skin off my back
02:02:52*Roin joined #nim
02:03:42filwitso it's no skin off my back
02:03:57filwitbleh.. stupid terminal+alt-tab mistakes..
02:05:24onionhammer@Varriount wht happened to normal non-doc comment continuation:)?
02:08:52Varriountonionhammer: That existed? If it did, it was accidental.
02:08:59onionhammer;)
02:09:06onionhammeri dont remember
02:09:26onionhammerNot sure why it shouldnt exist though
02:09:40Varriountonionhammer: I would like to put out a release first.
02:09:52onionhammersounds good
02:10:03onionhammerwe should get nimsuggest stuff working first
02:10:20VarriountBlaargh...
02:10:34VarriountI really don't like touching that code.
02:11:08onionhammerlol
02:11:17onionhammerI can try to work on it
02:11:26onionhammeri just wont have much time til july :\
02:11:36filwithmm... looks like there's some bugs with this {.pure inheritable.} thing though...
02:12:09Varriountonionhammer: No, no, I can do it.
02:16:34onionhammerVarriount not sure when it stopped working
02:16:54Varriountonionhammer: When what stopped working?
02:17:05onionhammerthe definition lookup stuff
02:17:10filwityeah obj-constructors don't work with .pure objects.. looks like time to search/make an issue
02:17:40notfowlfilwit: pure isn't needed for object anymore
02:18:04filwitnotfowl: it is to make pure ihertiable base-types
02:18:13notfowlfilwit: there's no such thing
02:18:53onionhammerVarriount looks like it's failing at get_project_file
02:18:58VarriountI must admit, I'm still not sure why you want to remove type information.
02:19:05filwityes it works, you can use all the compile-time binding (eg, procs, 'of' when the types are known, etc), just not the dynamic ones (methods, of from base refs, etc)
02:19:12Varriountonionhammer: The suggestion feature has never worked for me.
02:19:13filwit^ notfowl
02:19:16filwiter..
02:19:27onionhammersuggestion.. isnt that the one you added?
02:19:39onionhammerI added the go-to-def
02:19:41notfowlSo "of" only does work at run time
02:19:48Varriountonionhammer: No. I haven't written anything IDETools related.
02:20:00Varriountonionhammer: I've formatted the code, but that's all.
02:20:03notfowlThere is no pure inheritable object, it needs runtime info
02:20:04onionhammersomeone else wrote the check / suggest stuff
02:20:16onionhammervarriount something you did relating to project file lookup borked it i think
02:20:47filwitnotfowl: {.pure inheritable.} objects in Nim already work the way I was suggesting with composition (basically.. minus a few of my fancy ideas, but the core part is there.. though they have a bug with obj-constructors apparently)
02:21:19notfowlK I'm not going to argue with you, just take some time to think about it
02:21:28filwitlol
02:21:45filwitdo the same?
02:22:00filwitcause it works.. i'm running code and doing sizeof and it works
02:22:14filwitand more than that, i know what's going on in the memory
02:22:26notfowlSure
02:22:32notfowlTotally
02:22:49Varriountfilwit: What did you mean by composition again? (I can't remember)
02:23:49notfowl"It works its just that it doesn't really work"
02:23:50filwitVarriount: http://en.wikipedia.org/wiki/Object_composition
02:24:14filwitnotfowl: show me where I said "it doesn't work" just like that?
02:24:30filwiti didn't say that, i said "obj-constructors have a bug"
02:24:45notfowl"it works except without methods, "of", .."
02:24:50onionhammerVarriount "sublime" not found sublime.status_message("No definition found")
02:25:00notfowlcongrats you have inheritance without inheritance
02:25:08filwitnotfowl: which is what I wanted
02:25:13filwitrun this code: https://gist.github.com/PhilipWitte/a38afecf9dddad4cdd16
02:25:42filwityou get the basic part of inheritance, you just can't do the parts which require runtime typeinfo
02:25:47onionhammerVarriount ah got it working at least on mac
02:25:49onionhammerI'll check in
02:26:00Varriountfilwit: I think I remember... You wanted to be able to inherit from an object type, without grabbing its type information, right?
02:26:04filwitsince I never use anything that requires typeinfo, that's exactly what I mean
02:26:21filwitwhat i *want*
02:26:38onionhammerVarriount test & make sure i didnt break anything :P I also changed the default settings to point to just "nim"
02:26:47filwitit's like C++ inheritance.. it doesn't do anything behind the scenes
02:26:51filwitVarriount: yes
02:27:04Varriountfilwit: Was type information getting in the way before?
02:27:31notfowluh huh
02:27:35vikatonare things like {.Text.} pragmas ?
02:27:37notfowlexcept this isnt polymorphism
02:27:40Varriountfilwit: Also, if I recall correctly, C++ inheritence does quite a lot behind the scenes, especially to make things like multiple inheritence work.
02:27:52Varriountvikaton: Yep.
02:28:02vikatonSwag
02:28:26filwitnot exactly. I'm just writing a completely separate event system that doesn't use methods or type-info, so I wanted a way to provide/declare base-type entry points with minimal runtime cost
02:28:32filwitVarriount ^
02:28:50Varriountfilwit: Hrm. Are you sure that isn't pre-optimization?
02:29:32filwitnotfowl: dude. never said I wanted 'polymorphism'.. this is what i kept saying "composition" which means something specific
02:29:39filwitwhy*
02:30:25filwitVarriount: well this wasn't stopping me from achieving anything.. I just realized it would be nice, which is why i made a gist about it (and posted it here)
02:30:33notfowlfilwit, this isnt useful, write more code and you'll see how inflexible it is
02:31:29*darkf joined #nim
02:31:45filwitlol.. dude it's a way to get automatic object/function composition in Nim.. i'd say it's useful, even if it doesn't apply to what you need real polymorphism for
02:32:49notfowlits not automatic
02:33:15filwitxwing.move(...) vs xwing.sprite.move(...)
02:33:20notfowlthis isnt composition anyways, this is inheritance
02:33:23filwitcall it what you want
02:33:37notfowlyou have a type and a subtype
02:34:11notfowlshow me a Player that is Sprite and Fighter and Fighter has nothing to do with Sprite
02:34:35filwitthat gist shows you exactly that
02:35:05filwityou could split Sprite into a different file and only expose specific procs to mutate it's members
02:35:58filwitit's only "single chain" composition, so yeah it's a "limited" version of it I suppose.. i'm not an expert on these terms either, so it's possible I'm using them wrong
02:36:08onionhammerVarriount opening json.nim in lib/pure..it looks like the syntax highlight is very messed up
02:36:22notfowlyou're showing me inheritance and insisting its composition, el to the el
02:37:05*notfowl left #nim ("Leaving")
02:37:45filwitthe difference between composition and inheritance is very minor
02:37:56Varriountonionhammer: Looks like the regex detecting bad characters broke.
02:38:04filwitand this basically fits the bill, as far as I can tell
02:39:09filwitso yeah, totally could be classified as "composition" AFAIK (which btw.. i was using that term for my initial proposal mostly)
02:40:31filwiti mean, there difference is `type Foo = object of Bar` (inheritance, implies runtime typeinfo) `type Foo = object[bar:Bar]` (composition, if this syntax where possible)..
02:40:39filwitthe difference is minor
02:41:15filwitthough I suppose you're correct "inheritance" would be a more correct term for what Nim does with .pure .inheritable objects
02:42:03filwitbut i was using that term mostly from my initial concept a few days ago (which is slightly different than what Nim currently does)
02:42:22filwitbleh, repeating myself now..
02:56:20*zero_coder joined #nim
02:56:29*pregressive quit (Remote host closed the connection)
02:58:10*vikaton quit ()
03:06:09*CARAM__ quit (Remote host closed the connection)
03:06:10*pmbauer quit (Remote host closed the connection)
03:06:10*endou_________ quit (Remote host closed the connection)
03:06:11*n1ftyn8 quit (Remote host closed the connection)
03:06:11*NhanH quit (Remote host closed the connection)
03:06:37*fioco quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
03:07:48*eventualbuddha quit (Remote host closed the connection)
03:07:51*mikolalysenko quit (Remote host closed the connection)
03:08:17onionhammerVarriount somethings very wrong w/ the project.py
03:17:58*Siecje quit (Read error: Connection reset by peer)
03:24:09*woadwarrior joined #nim
03:35:53*woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…)
03:45:37*filwit quit (Quit: Leaving)
04:12:30*ddl_smurf quit (Quit: ddl_smurf)
05:07:10*filcuc joined #nim
05:10:47*filcuc quit (Client Quit)
05:23:21*ozra joined #nim
05:27:19*kumool joined #nim
05:31:09*kumul quit (Ping timeout: 276 seconds)
05:33:44*datanois1 quit (Ping timeout: 258 seconds)
05:43:38*xcombelle quit (Read error: Connection reset by peer)
05:58:22*dalarmmst joined #nim
06:00:26*datanois1 joined #nim
06:04:23*kumool quit (Quit: Leaving)
06:12:28*vendethiel joined #nim
06:12:38*eventualbuddha joined #nim
06:14:03*NhanH joined #nim
06:16:26*pmbauer joined #nim
06:17:35*dalarmmst quit (Remote host closed the connection)
06:20:50*dalarmmst joined #nim
06:22:37*n1ftyn8 joined #nim
06:22:38*datanois1 quit (Ping timeout: 246 seconds)
06:25:13*endou_________ joined #nim
06:26:18*yglukhov________ joined #nim
06:29:52*woadwarrior joined #nim
06:32:44*biscarch quit (Ping timeout: 252 seconds)
06:32:45*AckZ quit (Ping timeout: 252 seconds)
06:34:51*clone1018 quit (Ping timeout: 276 seconds)
06:35:27*vendethiel quit (Ping timeout: 258 seconds)
06:36:32*CARAM__ joined #nim
06:38:54*yglukhov________ quit (Quit: Be back later ...)
06:41:05*vendethiel joined #nim
06:42:40*vbtt_ quit (Remote host closed the connection)
06:46:46*mikolalysenko joined #nim
06:53:25*TylerE quit (Remote host closed the connection)
06:53:26*DecoPerson quit (Remote host closed the connection)
06:58:53*Ven joined #nim
06:59:12*liom joined #nim
06:59:48*ddl_smurf joined #nim
07:03:59*vendethiel quit (Ping timeout: 256 seconds)
07:11:04*gunn joined #nim
07:11:06*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:12:45*gunn quit (Client Quit)
07:13:51*gunn joined #nim
07:14:32*gunn quit (Client Quit)
07:16:02*liom quit (Quit: Page closed)
07:24:41*Ven joined #nim
07:25:04*AckZ joined #nim
07:30:23*TylerE joined #nim
07:36:07*NimBot joined #nim
07:38:30*Ven quit (Read error: Connection reset by peer)
07:39:14*biscarch joined #nim
07:40:58*clone1018 joined #nim
07:41:02*Ven joined #nim
07:41:07*dalarmmst quit (Remote host closed the connection)
07:41:49*Ven quit (Read error: Connection reset by peer)
07:43:30*dalarmmst joined #nim
07:45:23*vendethiel joined #nim
07:45:31*gokr joined #nim
07:48:08gokrHappy morning! :)
07:48:12*yglukhov________ joined #nim
07:49:39dtscodeAnd a merry afternoon
07:57:59*DecoPerson joined #nim
08:02:20r-kuhey gokr. any plans on updating urhonimo to new release of urho3d? ;)
08:02:46gokrr-ku: Yeah, definitely. We are just silly busy trying to get a beta out of our new client.
08:02:50*Kingsquee quit (Quit: Konversation terminated!)
08:03:07gokrSo its in the pipeline, just not sure when Araq has time to do it.
08:03:15r-kuawesome ;)
08:03:22r-kubtw do you have scripting requirement in your project?
08:03:41*coffeepot joined #nim
08:03:57gokrMmmm... how so?
08:04:29r-kuwell i mean usually games do use some scripting language to define content, like quests in mmos are scripted etc
08:04:35gokrWe do, but... our client has CPython embedded for making end user apps.
08:05:07gokrBut... do you mean end user scripting or just "easier development" for us?
08:05:25r-kujust for developers i meant
08:05:35gokrOk, well, in that case we have Smalltalk
08:05:48gokr95% of our client is still in Smalltalk.
08:05:57r-kui had this interesting idea.. you know like nim has vm, it can interpret itself
08:06:00*vbtt_ joined #nim
08:06:05gokrr-ku: sure
08:06:12r-kuwouldnt it be useful if nim apps could use nim scripting
08:06:24gokrYes, but...
08:06:24r-kulike if vm could be separated out into stdlib or something
08:06:37gokr...I am not sure Nim is the "perfect" scripting language.
08:07:02gokrFurther, the VM is ... not getting an awful lot of love from Araq - since he feels its restricted.
08:07:14gokrBut well, he can tell more on his views on that.
08:07:46gokrIf you want to do something that is "popular" in the industry - then i would say that integrating LuaJIT is a decent way to go.
08:08:00gokrIf you want to do some "fun stuff" then you can join my little Ni project :)
08:08:25r-kui figured since lang aims at gamedev and that field usually does use scripting then uniform language for both script and native code could be useful. even more so if it easily binds. figured ill toss this idea somewhere around Araq
08:08:49ozraHi folks.
08:08:55r-kuindustry uses lua because its easy to bind native code to
08:09:11ozraLike the idea of extending Nim in the scripting domain :) It would need wider type inference then imo
08:09:12r-kui personally have no love for lua ^_^ although it can be made nicer with some changes to parser
08:09:13gokrWell, I can say that there is a fair lot of interest in these directions.... let me point out a few things:
08:09:28gokr1. fowl is experimenting with writing a Smalltalkish VM in Nim. Bytecode VM.
08:09:48gokr2. I am playing with Ni - https://github.com/gokr/ni
08:10:34gokr3. LuaJIT is the "industry standard" and its sickeningly fast, but as a language I don't love it that much either, quirky.
08:11:03gokr4. We intend to do some dll reloading stuff so we can modify Nim code without stopping system.
08:11:14r-kugokr: Ni is like custom scripting language?
08:11:28gokrNi is a little experiment from me.
08:11:52gokrI discovered Rebol a few weeks back, which is a pretty fascinating language. So I decided to make a little interpreter for it.
08:12:13gokrSo it parses code to an AST, then executes that AST directly using an Interpreter.
08:12:43r-kuthats actually a neat idea
08:12:54r-kusaw factorial.ni, it looks so strange hehe
08:12:55gokrRebol has a very small grammar.
08:13:07ozraStrange indeed, haha
08:13:09gokrYeah, but that's mainly because I haven't done params yet :)
08:13:32gokrBut Rebol is indeed a bit funky - but quite cool when you learn the very small basics.
08:14:03gokrI can explain factorial.ni if you like
08:14:13ozrar-ku: Are you keen on refactoring the VM yourself?
08:14:43r-kugokr: i understand it more or less, code is more obvious to read than write ^_^
08:14:55gokrWhen I get functions working more properly with arguments - it should look like the Rebol variant: https://github.com/gokr/ni/blob/master/factorial.r
08:15:16gokrExcept I named "either" "ifelse" instead.
08:15:41gokrNi (and Rebol) has no builtin keywords.
08:15:48gokrSo ... its all malleable.
08:15:50r-kuozra: i totally do not have enough experience for doing that myself
08:16:01ozragokr: That's a cool conceot
08:16:20gokrRebol is basically a mix of Lisp, Forth and Self.
08:16:26ozrar-ku: It's not the easiest task to take on..
08:16:29r-kuah that looks clearer, still totally weird ^_^
08:16:55gokrWell, its not hard actually if you learn the few rules of it. :)
08:17:21gokrOne fun thing with Rebol and Ni is that they are homoiconic
08:17:27gokrLike Lisp.
08:18:32gokrSo code is data etc
08:18:32r-kudunno, i prefer compiler doing the heavy work. why write AST myself.. ^_^
08:19:08gokrThe deal with this is that... Ni is completely self modifiable.
08:19:46ozrar-ku: I like that you can work with the AST in macros in Nim - it's not a must - but you can. Which is a god send for DSL'ing...
08:20:00r-kugokr: you mean it can modify it's own AST during runtime?
08:20:11gokrIf you look at the Ni/Rebol example again - it might seem like the "factorial: func blablabla" is a declared function, right?
08:20:15gokrBut its not.
08:20:16r-kuozra: AST for macros is great yes, but not for writing everything
08:20:27gokrIts actually code that creates a function.
08:20:38gokrr-ku: yes, exactly.
08:20:59r-kuthat certainly enables some sinister applications hehe
08:21:13gokrSo let's say in my Ni code: "factorial: func [ifelse n > 1 [f: f * n n: n - 1 factorial] [f]]"
08:21:49gokrThat line is actually this:
08:22:51ozra- dramatic pause -
08:22:52gokr"factorial = make-a-func(@["ifelse", "n", ">", 1, @["f:", "f", "*", "n" .... ]])
08:23:00ozracool
08:23:04gokrSorry, I didn't go all the way there
08:23:11*Trustable joined #nim
08:23:27gokrBut its basically calling the "func" function that will create a function and assign it to the variable "factorial"
08:23:52gokrSo obviously its not a declaration - its actually a statement.
08:24:18gokrAnd ... this is all like in Smalltalk and Lisp and Forth etc. These languages are made to always be "in runtime".
08:24:21ozraSo all function creation is through factories, somewhat?
08:24:56gokrThe "func" word is bound to a primitive in this case.
08:24:58*ingsoc joined #nim
08:25:10gokrMmmm, not factories really.
08:25:18ozraAh, no, realize that
08:25:27TEttingergokr, heh I'm making a language that compiles to LuaJIT, effectively. my first try I think was closer to REBOL than the current one. the first version would have benefited from being rebol-like, I think, it was a stack language that implicitly made functions partially evaluated. the current version is very close to clojure but using mutable state more commonly.
08:26:20gokrozra: https://github.com/gokr/ni/blob/master/ni.nim#L252-278
08:26:53ozraAre those the primitives?
08:27:01gokrThat's where I instantiate the Interpreter, create the singletons for "true", "false" and "nil" - bind them to the global variables with the same names, and also bind a bunch of primitives.
08:27:02gokryes
08:27:15gokrWell, its where I hook them in.
08:27:22*Guest95994 quit (Remote host closed the connection)
08:27:22gokrLike say line 263
08:27:36gokrHooks up "+" with the Nim proc "primAdd"
08:27:48gokrWhich is on line 151
08:28:12gokrAnd above that line you can see I have a bunch of methods doing some coercion for int + float, float + int etc
08:28:35gokrTEttinger: Way cool
08:29:10gokrTEttinger: Are you using that... project on github exposing LuaJIT for making languages? Can't recall where it was
08:29:13TEttingergokr, it's definitely advantageous to be translating to a higher-level language like Nim or Lua rather than bytecode :)
08:29:15TEttingerhm?
08:29:17TEttingerno
08:29:18TEttingerI should
08:29:20ozracool
08:29:33gokrTEttinger: Let's see if I can find it...
08:29:47gokrhttps://github.com/franko/luajit-lang-toolkit
08:30:02gokrDon't know if its usable
08:30:04*Ven joined #nim
08:30:25gokrTEttinger: I just wanted to make... an interpreter so that I can explore Nim mixing
08:31:30*Ven quit (Client Quit)
08:31:57TEttingerI'll try it out, gokr. this is quite cool.
08:32:00TEttingerthanks!
08:32:32gokr:)
08:33:21*bjz joined #nim
08:33:26gokrozra: There is a pretty advanced reimplementation of Rebol called Red: http://www.red-lang.org
08:33:53gokrTo see a bit of why Rebol is pretty cool, this article shows some power moves: http://www.red-lang.org/2013/11/041-introducing-parse.html
08:34:37gokrThe short of it all is that Rebol (and Ni) is very malleable for making DSLs etc
08:35:21gokrWhich I think would enable interesting "very high level" stuff on top of Nim.
08:35:55gokrAnd btw, that factorial.ni is almost as fast as Rebol3 :)
08:39:25*woadwarr_ joined #nim
08:42:22*woadwarrior quit (Ping timeout: 265 seconds)
08:45:11*woadwarrior joined #nim
08:45:24TEttingergokr, hm. my home-made parser and lexer combination is like... a third the size of theirs... probably because I have a simpler grammar and I'm using LPEG as a 3rd party lib..
08:45:47TEttingermakes me somewhat reluctant to switch so soon
08:46:31TEttingertheirs is definitely better...
08:46:40TEttingerit handles escape chars and UTF-8
08:47:41*woadwarr_ quit (Ping timeout: 265 seconds)
08:56:46*dddddd joined #nim
09:01:05*johnsoft quit (Ping timeout: 276 seconds)
09:01:24*johnsoft joined #nim
09:12:12*Ven joined #nim
09:24:32*xcombelle joined #nim
09:29:54*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:40:14*boopisaway is now known as boop
09:52:07*woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:53:30*woadwarrior joined #nim
09:57:53*vendethiel quit (Ping timeout: 246 seconds)
10:05:43*vendethiel joined #nim
10:15:41*Ven joined #nim
10:19:58*Arrrr joined #nim
10:29:31*JinShil joined #nim
10:42:32*Xaseron quit (Remote host closed the connection)
10:52:20*ddl_smurf quit (Quit: ddl_smurf)
10:57:16*Siecje joined #nim
11:02:27*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:07:19*Sembei joined #nim
11:09:01*Sembei quit (Client Quit)
11:11:24*Sembei joined #nim
11:12:01*Sentreen joined #nim
11:16:05gokrozra: https://github.com/gokr/ni/blob/master/sample.ni
11:19:52*ddl_smurf joined #nim
11:20:38SentreenAny idea why I get an illegal storage access when trying to add to a sec? `result.cells.add(tmp)` The type of results is just an object that contains a seq.
11:24:09dom96Sentreen: You need to initialise sequences
11:24:14dom96result.cells = @[]
11:25:57SentreenThat works! Guess I didn't see since echo-ing the cells field printed it as if it were an empty seq. Thanks!
11:29:41dom96hrm, that's incredibly misleading
11:29:44dom96and arguably incorrect
11:29:48dom96i'll file a bug report for that
11:32:32Arrrrdom96: would you report this, p-please http://stackoverflow.com/q/30671669/4802061
11:32:39*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:33:06dom96Arrrr: why don't you report it?
11:33:37ArrrrI dont have a github account
11:33:43Arrrryet
11:34:07dom96then create one
11:37:51*strcmp1 quit (Remote host closed the connection)
11:40:03taotetekI'm looking for a little advice in regards to ffi - some of the C calls I'm wrapping take a pointer to a pointer - I'm currently handling it by making the function arg a pointer, and calling myfunc(addr(myarg)) - but I'd like to have some type safety around the wrapper call
11:40:50taotetekall of the ffi examples and docs i'm finding are just a simple one to one wrapper (the style c2nim generates) - I'm looking for some solid examples on a nim function that does some things in nim, then calls a C function
11:41:45taotetekthe idea being, the function could then accept a valid type, and within the function I could call the C function with addr(mytype), to make the external API simpler.
11:43:19*strcmp1 joined #nim
11:44:32*Ven joined #nim
11:45:16*Ven quit (Client Quit)
11:50:39*strcmp1 quit (Ping timeout: 245 seconds)
11:54:05*Ven joined #nim
11:56:10*strcmp1 joined #nim
11:57:03*woadwarr_ joined #nim
11:58:13*datanois1 joined #nim
11:59:13*woadwarrior quit (Ping timeout: 264 seconds)
12:01:12*woadwarrior joined #nim
12:03:43*woadwarr_ quit (Ping timeout: 255 seconds)
12:17:30*jaco60 joined #nim
12:21:36*jm116__ quit (Ping timeout: 258 seconds)
12:21:50*jm116__ joined #nim
12:24:53*strcmp1 quit (Ping timeout: 246 seconds)
12:29:14*woadwarr_ joined #nim
12:32:05*woadwarrior quit (Ping timeout: 256 seconds)
12:32:06*drewsrem joined #nim
12:35:32*strcmp1 joined #nim
12:40:43*ddl_smurf quit (Quit: ddl_smurf)
12:45:17dtscodeand once again, I try to do IRC in a language other than nim, and once again, I find myself needing irc
12:45:24dtscodeerr the nim irc module
12:51:25*banister joined #nim
12:52:46*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:06:03*TEttinger quit (Ping timeout: 250 seconds)
13:06:36*kokozedman joined #nim
13:06:53kokozedmanhey guys…
13:07:01kokozedmanis there a Web Socket implementation for nim?
13:10:08*Siecje quit (Ping timeout: 265 seconds)
13:10:26*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:15:10dom96kokozedman: onionhammer has one IIRC
13:15:56kokozedmandom96: yes, I’m looking at it… but among it’s TODO is “Resolve memory issues” (not much more information on that)
13:16:08kokozedmanso, I was looking for a more widely used instead
13:16:15kokozedmanbut I guess there isn't
13:16:16dom96might be best to just roll your own
13:16:26*davidhq joined #nim
13:16:26dom96would be great if you could
13:20:59*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:23:06*NfNitLoop joined #nim
13:23:50*NfNitLoop waves hi.
13:24:30NfNitLoopI heard about Nim a while ago but only just started reading up on it. Sounds nice so far! :D
13:25:19NfNitLoopI'll have to get used to needing forward declarations in code again, though. -_-
13:27:54*Varriount waves back to NfNitLoop
13:28:24ArrrrIs not that bad, you get used to it. But yes, i wish it wasnt necessary
13:28:33VarriountNfNitLoop: The channel should get more responsive a bit later. You came on just as many of are waking up.
13:28:59Varriount(In fact, I'm about to drive to work)
13:29:03ozraGetting rid of forward requirements is on the todo list, so it won't be forever...
13:29:17NfNitLoopYep, I'm just waking up myself. I'll head to work here in a bit, but I'll idle in here and read scrollback later. :p
13:29:30NfNitLoopozra: Fingers crossed!
13:29:50kokozedmanozra: glad to hear that!
13:30:05ozraArrrr: Did you get that github account yet? :-P
13:30:59Varriountozra: There's a bug in the character literal recognition in NimLime, if you're interested.
13:31:43ozraVarriount: Yeah, I've fixed the multiline conditionals now, what's up with chars?
13:32:07ozraSnippet?
13:32:09Varriount':' causes the highlighter to mark the rest of the file with an 'invalid' selector/group
13:32:25Varriountozra: Look at lib\pure\json.nim
13:32:29Arrrrprobably im blind but i dont spot "remove forward dec" on the todo
13:32:36Varriount(Or /lib/pure/json.nim)
13:33:18ozraArrrr: I better verify that so I haven't misunderstood something completely.. Or, let's ask an expert: dom96?
13:33:36ozraVarriount: Ok, cool, I'll check right away
13:33:50*banister joined #nim
13:34:22*JinShil quit (Quit: Konversation terminated!)
13:34:32ozraVarriount: some specific row num to get me on target?
13:35:39*Sembei quit (Ping timeout: 245 seconds)
13:36:04ozraArrrr: by todos I mean issues in github - that's the authority)
13:36:38dom96ozra: Arrrr: zahary already implemented experimental support for that, you can enable it with some pragma.
13:36:52dom96Not sure whether Araq will make it default
13:36:58dom96if he does it won't be for some time anyway
13:37:09ozraNfNitLoop: Did you catch that? :)
13:37:27ArrrrAnd what's the downside of the pragma to make it experimental
13:37:34ozradom96: What would be the reason not to make it default (aside from experimental nature)
13:38:28NfNitLoopozra: Oh? Interesting. Is that in 0.11.2 (I'm just using what brew installed.) :p
13:38:45*ddl_smurf joined #nim
13:38:50*ddl_smurf quit (Client Quit)
13:38:55dom96ozra: The ability to know where to look for the proc.
13:38:59NfNitLoopEr, I suppose I should ask dom96 ---^
13:39:02dom96i.e. just scroll up
13:39:08ozraNfNitLoop: Yup :)
13:39:51ozradom96: Basically it's not deterministic enough - yet..?
13:40:29dom96ozra: Because a procedure has to be above the place where it is called you know that you can scroll up to look for it
13:41:59ozraWhat!? That's fucking retarded. ctrl + shift + f - search 'c funcname' - and done. Or as suggested by Araq: "goto definition". Is this really the reason holding it back?
13:42:40dtscodeDo we have anything for handling SIGALRM and alarm(2) in the stdlib?
13:44:11NfNitLoopYeah, I really prefer doing (and reading) top-down development. I'll put my main() at the top of a file, use high-level functions in it, and define them immediately below. The language forcing forward declaration seems archaic. :p
13:44:53ozraNfNitLoop: +1 - that's the 'natural' flow
13:45:12ArrrrMake the parser works backwards
13:46:02*strcmp1 quit (Quit: Leaving)
13:46:26*Sembei joined #nim
13:46:27ozraArrrr: Computers are here to do tasks for us, that includes parsing - instead of making us parse...
13:46:53*Ven joined #nim
13:48:06Arrrrheh, i was joking. Didnt expect that to work anyway
13:48:55ozraIn any event, it's not killing me. But if it's in place and working, baam, just go imo.
13:49:37NfNitLoopHow do I use that experimental feature? I'm skimming http://nim-lang.org/docs/manual.html and don't see it.
13:49:46ozraVarriount: I don't find anything wrong with json.nim when glancing at it!?
13:49:59OnOreactormonk: dom96: guys would you mind cutting of some branches that are abandoned from Nim repo (either merged or not gonna be merged): standalone (2013), newasync (2014, this I think is merged), float_ float_$ (2014), caas-fixes (2014), asyncmacro (2013)
13:50:51ozraNfNitLoop: {.experimental.}
13:50:59OnOsome of these branches are pretty mysterious
13:51:05ozraNfNitLoop: simple to search index: http://nim-lang.org/docs/theindex.html
13:51:05NfNitLoopOh, that enables *all* experimental features?
13:52:53NfNitLoopCan't you pick just one? like Python's from __future__ import print_function, etc.
13:55:10*kumul joined #nim
13:57:02*Siecje joined #nim
13:57:07*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:59:34*ddl_smurf joined #nim
14:06:07*woadwarrior joined #nim
14:06:50*Ven joined #nim
14:08:14r-kui just realized that strings are counted from 0 from the start and from 1 from the end. +1 confusion points earned
14:08:44*woadwarr_ quit (Ping timeout: 264 seconds)
14:14:47*pregress_ joined #nim
14:16:30ozraNfNitLoop: Was out in the garden cuttin and mowin.. afaik, no.
14:17:39*vendethiel quit (Ping timeout: 276 seconds)
14:18:40*scoeri joined #nim
14:20:32ozraNfNitLoop: You'll have to ask the Nim Gods, they might know of some undoc'ed way :)
14:20:33*ddl_smurf quit (Quit: ddl_smurf)
14:21:27*banister quit (Ping timeout: 256 seconds)
14:23:04*vendethiel joined #nim
14:26:38scoeriHi all, I had a question, is there any way to safely use multithreaded callbacks from C into Nim?
14:30:05scoeriI currently have a C implementation running a number of pthreads and each of them should be able to safely call an exported Nim proc
14:32:31*pregress_ quit (Read error: Connection reset by peer)
14:32:51*pregressive joined #nim
14:33:06*Ven quit (Read error: Connection reset by peer)
14:34:56*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:35:08*coffeepot joined #nim
14:35:28*ddl_smurf joined #nim
14:37:57NfNitLoopscoeri: I would assume that if your proc gets called from a thread, it should be safe to call the callback it gets passed. (since it'll operate within the same thread.)
14:39:29NfNitLoopozra: dom96: I tried {.experimental.} in 0.11.2 but it still complains if I don't add a forward declaration.
14:41:41*ddl_smurf quit (Quit: ddl_smurf)
14:42:07NfNitLoophttp://pastie.org/10231477 <-- code
14:43:22NfNitLoopI also can't seem to find any docs about .experimental. enabling automatic forward declarations. Anybody have a link? :)
14:44:06*vendethiel quit (Ping timeout: 244 seconds)
14:46:09NfNitLoopaha! "Added a highly experimental noforward pragma enabling a special compilation mode that largely eliminates the need for forward declarations."
14:46:10*mtj_ quit (Ping timeout: 244 seconds)
14:46:10NfNitLoophttp://nim-lang.org/news.html#Z2015-05-04-version-0-11-2-released
14:46:46NfNitLoopWow, it's old. 2013-05
14:48:10NfNitLoopDoh. It only seems to look forward in the same scope. So that code still doesn't work.
14:48:12NfNitLoophello.nim(10, 6) Error: implementation of 'main.foo()' expected
14:48:24NfNitLoop:~(
14:48:26*NfNitLoop goes to work.
14:48:45*vendethiel joined #nim
14:50:40*banister joined #nim
14:50:50*afiskon joined #nim
14:51:19*brson joined #nim
14:52:32*strcmp1 joined #nim
14:53:36*mtj_ joined #nim
14:53:55scoeriNfNitLoop: http://pastie.org/10231493
14:54:17scoerithat's the example I am using
14:54:46afiskonHello everyone. I never tried Nim before but have a lot of experience in such languages as Haskell and Scala. Which books or tutorial would you recommend to start learning Nim? How about this one for instance? http://nim-lang.org/docs/manual.html
14:55:24pigmejafiskon: http://nim-lang.org/tut1.html & tut2.html
14:56:18*ddl_smurf joined #nim
14:57:07afiskonpigmej, ok, thank you!
14:57:33*ddl_smurf quit (Client Quit)
14:58:13afiskonBTW do I right understand that Nim is considered quite a new languages without any success stories so far? Or there are some already?
15:02:02scoerithere is a small section on Thread coordination here: http://nim-lang.org/docs/backends.html#memory-management-thread-coordination
15:02:10*Matthias247 joined #nim
15:02:25scoeriis anyone familiar with calling Nim from multiple C threads?
15:04:49*xcombelle quit (Quit: Leaving)
15:07:00NfNitLoopscoeri: do you see a problem with that code? What happens?
15:11:23*datanois1 is now known as datanoise
15:12:59*vendethiel quit (Ping timeout: 265 seconds)
15:17:48scoeriNfNitLoop: it starts all five threads and then randomly prints out some of the hello worlds
15:17:58scoeriand then gets into an infinite loop
15:18:29scoeriwhich uses 100% of my CPU
15:19:03scoeriare you sure the calling Nim code from C is 100% thread-safe?
15:19:06Arrrrozra you are now a top committer https://github.com/Araq/Nim/pulse/monthly
15:36:06*Siecje quit (Ping timeout: 265 seconds)
15:36:09*Siecje1 joined #nim
15:36:57reactormonkOnO, killed a few, might kill some more
15:37:16reactormonkafiskon, well, Araq now employs it professionally
15:46:26*Matthias247 quit (Read error: Connection reset by peer)
15:51:20gokrafiskon: Our next version of our virtual world client is using Nim. Not out yet though.
15:53:23ozraafiskon: According to the intell, Araq has been developing Nim since 2008 (I think?), so it might not be "new", but it does seem to catch on now :)
15:53:34gokr2006
15:53:43ozraAh
15:53:56ozragokr: Checked out the links, minimalistic indeed :)
15:54:25gokr:)
15:54:33ozraArrrr: Oh my, haha. Don't know how reliable such stats are!
15:57:43SentreenIs it possible to use a range type as a function argument? i.e.: `proc wrap(n:int, r:range): int`
16:04:22SentreenOr maybe in other words, are types first class in nim
16:07:54Arrrrrange[1..10] i think will work
16:07:57*vendethiel joined #nim
16:09:42*xcombelle joined #nim
16:12:43wbAbout the `^` in the stdlib: is there a good reason for its current implementation instead of just "template `^`*(x,y) = pow(x,y)" ?
16:12:58wb(asked this a couple days ago but i think everyone was asleep)
16:14:38SentreenI figured it out, you need to use `typedesc` so the correct signature is `proc wrap(n:int, r:typedesc): int` After that you can do things like high(r)
16:15:35*afiskon quit (Quit: Leaving)
16:15:46*darkf quit (Quit: Leaving)
16:17:02*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:17:07SentreenEven better: `proc wrap(n:int, r:typedesc): r` works too!
16:17:17SentreenThat's actually really impressive
16:19:40*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:21:07*Kelet joined #nim
16:23:22*banister joined #nim
16:28:59*vendethiel quit (Ping timeout: 244 seconds)
16:30:25*vikaton joined #nim
16:30:36*dt_ joined #nim
16:31:00*dt_ left #nim (#nim)
16:39:22*Kingsquee joined #nim
16:44:58OnOreactormonk: thanks
16:53:25drewsremJust compiled the latest devel-nim and now c2nim fails to compile with: "cparse.nim(40, 19) Error: ambiguous identifier: 'TToken' -- use a qualifier"
16:54:27reactormonkdrewsrem, meh, another regression
16:54:31*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:57:23reactormonkdrewsrem, I'll take a look
16:57:29reactormonk... in a few minutes/hours
16:57:30drewsremreactormonk, merci
16:57:51*ddl_smurf joined #nim
16:59:00*vendethiel joined #nim
17:06:20*NimBot joined #nim
17:11:30*xificurC_ quit (Ping timeout: 272 seconds)
17:17:55*xificurC joined #nim
17:20:33*banister joined #nim
17:21:21*yglukhov________ quit (Ping timeout: 246 seconds)
17:21:52*Kingsquee quit (Quit: Konversation terminated!)
17:22:57*pregressive quit (Remote host closed the connection)
17:25:39*Sentreen quit ()
17:26:46*yglukhov________ joined #nim
17:27:35drewsremI have macro that returns a stmt via quasi-quoting a proc that's supposed to overload another proc with the same signature, but when I call the macro compilation errors out with "ambiguous call; both _ and _ match for: (Type)" - any idea?
17:28:06reactormonkdrewsrem, did you pull c2nim?
17:28:59*Kelet quit (Quit: Page closed)
17:29:09reactormonk... yup
17:29:45drewsremreactormonk, I tried installing c2nim through nimble, which should pull the latest from GH
17:32:39*yglukhov________ quit (Ping timeout: 276 seconds)
17:37:28reactormonkdom96, somehow nimble build on c2nim insists on repulling the compiler sources every time
17:38:35reactormonkdrewsrem, try again
17:39:15drewsremreactormonk, will be able to in ~10 min
17:42:39*ddl_smurf quit (Quit: ddl_smurf)
17:42:39*brson quit (Quit: leaving)
17:43:09*ddl_smurf joined #nim
17:43:19*ddl_smurf quit (Client Quit)
17:46:25*kumul quit (Quit: Leaving)
17:46:43*Jesin quit (Quit: brb rebooting)
17:48:29*filcuc joined #nim
17:48:51*Jesin joined #nim
17:51:51*ingsoc1 joined #nim
17:52:33*ingsoc quit (Ping timeout: 264 seconds)
17:53:04drewsremreactormonk, worked fine now, thanked
17:53:12drewsremthanks*
17:55:20*gokr_ joined #nim
17:59:48*yglukhov________ joined #nim
18:01:45*pregressive joined #nim
18:05:33drewsremCan I check within a macro if some specific proc has already been declared? e.g. if "proc someProcess(someInt: int)" has been declared previously, write an error message inside the macro at compile time
18:05:52*xificurC quit (Quit: WeeChat 1.2)
18:07:09*xcombelle quit (Ping timeout: 244 seconds)
18:08:18jackvwhat's the point of the "noreturn" pragma as opposed to just having a void proc?
18:10:22ArrrrI suppose the reason is this http://stackoverflow.com/questions/15964219/noreturn-function-does-return
18:10:30XeIs there a writeup on how to do command line flag parsing in nim?
18:10:53onionhammerkokozedman the issues are with nim's GC, not my websocket implementation
18:11:00onionhammer@dom96 too
18:11:39kokozedmanonionhammer: hey man! thanks for letting me know… is the problem still there? (i’m using 0.11.2)
18:12:45onionhammeri havent tested it in a while, sorry
18:12:56onionhammerthere is some code in there to test the memory usag though
18:13:07onionhammerso you can check yourself; i think theres a python script to test it maybe
18:13:13*mtj_ quit (Ping timeout: 256 seconds)
18:13:34jackvArrrr, thanks
18:13:44kokozedmanonionhammer: is it a decent implementation though? I mean, for a simple Web Socket back and forth chat app for instance?
18:14:42onionhammeryeah, it works fairly well
18:14:43*mtj_ joined #nim
18:14:51onionhammeror used to last time i used it ;) the ground has shifted underneath it a lot
18:17:17*skyfex__ joined #nim
18:17:17*skyfex_ quit (Read error: Connection reset by peer)
18:17:52drewsremIs there any way to get result/return in statement-templates working? - e.g.: http://ix.io/j0Y
18:22:50*brson joined #nim
18:24:25*gokr_ quit (Read error: Connection reset by peer)
18:29:20*xificurC joined #nim
18:30:44*xcombelle joined #nim
18:31:21*woadwarrior quit (Ping timeout: 256 seconds)
18:32:29*dom96_ joined #nim
18:33:34dom96_Xe: plenty of examples out there
18:37:49dom96_drewsrem: perhaps try making it an immediate template with {.immediate.}
18:39:14drewsremdom96_, thanks, this worked for templates, apparently it doesn't for macros tho?
18:39:44dom96_drewsrem: show me your code.
18:40:11Xedom96_: do you know how to use HTTP basic auth for httpclient?
18:40:35dom96_Xe: I'm guessing you just need to specify the correct headers?
18:41:47drewsremdom96_, http://ix.io/j11
18:42:13dom96_Xe: http://en.wikipedia.org/wiki/Basic_access_authentication#Client_side
18:42:43drewsremdom96_, oh whoops, it actually worked
18:42:59dom96_drewsrem: heh
18:48:21*kbuser joined #nim
18:48:29*kbuser quit (Remote host closed the connection)
18:49:02*kas joined #nim
18:49:36drewsremdom96_, hmmmm... maybe I've found something else: http://ix.io/j12 I had another macro with a different signature, but same name, that apparently is required to also be immediate, tho it shouldn't even be used in my call. - Makes sense to you?
18:50:46dom96_I think overloading doesn't quite work with immediate.
18:51:03dom96_Read up on it in the readme.
18:51:10drewsremdom96_, thanks, will do
18:51:10dom96_er, the manual heh
18:52:18kasHi everyone. I'm new. Can I ask some questions?
18:54:21ArrrrGo on
18:54:45ArrrrAnd welcome to nim, the most promising programming language out there.
18:54:57kasIs it possible to deallocate seq manually without GC effort?
18:55:21kasI do not want relay on GC
18:56:07kasI have some problem with memory, and i want more control about what i and when is allocated and deallocated
18:56:13ArrrrYes, you are free to choose which GC implementation for your own app, even to disable it.
18:56:55ldleworkOr throttle it
18:58:05*vikaton quit (Quit: Connection closed for inactivity)
18:58:05kasok, so if I disable GC, then how to free allocated memory in seq? Assign nil to seq variable?
18:58:32Arrrrhttp://nim-lang.org/docs/manual.html#types-reference-and-pointer-types
18:58:40ArrrrCheck out this link
19:02:23drewsremdom96_, a last thing, http://ix.io/j13 - I have a macro that creates a proc with a given name that returns an int, for whatever reason, now for the proc I'm creating I'm trying to set the result to some default-value before inserting the give statements, so that even if you don't specify a result/return in the passed statements, it will return the default-value, instead it seems that result inside the quasi-quoted proc always refers to the result of the
19:02:23drewsremmacro - any idea?
19:02:24*xificurC quit (Quit: WeeChat 1.2)
19:05:48dom96_drewsrem: I think that may be a quote bug. You may need to contruct the AST for 'result = 5' yourself. or just do: let resAST = parseExpr("result = 5") then in the quote write '`resAST`'
19:05:51dom96_That might work
19:06:42*xcombelle quit (Quit: Leaving)
19:06:55*Siecje1 quit (Quit: Leaving.)
19:07:52kasArrrr: It look like answer to my problem. I should `alloc` `dealloc` for manual alloc / dealloc. Thank you.
19:09:15ArrrrOne more thing kas, if you want to disable the gc, you need to use the compiler switch --gc:none in case you want 0 traced memory http://nim-lang.org/docs/nimc.html
19:10:30*xificurC joined #nim
19:11:26kasArrrr: I think it will be better if I use untraced language features for most critical part of my program, and for everything else I use normal code. So I think the best solution will be to not disable GC at all.
19:12:01kasBut thanks anyway - it may be helpful in the future.
19:12:10ArrrrThat's a great decision indeed.
19:24:08*kumul joined #nim
19:24:33*jefus_ joined #nim
19:27:13kasI have one more question. How the seq setLen method is implemented? If I look into source then I do not see any body of the method https://github.com/Araq/Nim/blob/master/lib/system.nim#L946
19:29:14ArrrrThat's a good question. It is implemented using magic, so you need to ask the wizards. Maybe dom96_, reactormonk or Araq knows
19:30:09dom96_kas: Check the generated C code.
19:30:24reactormonkArrrr, not sure if I'm deserving of the wizard title, I'd start with git grep SetLengthSeq
19:32:32drewsremdom96_, wonderful, that worked, much appreciated
19:33:21dom96_drewsrem: np
19:39:07*filcuc quit (Quit: Konversation terminated!)
19:39:12*kokozedman quit (Quit: kokozedman)
19:43:56*jefus_ quit (Quit: Leaving)
19:45:23*kas quit (Remote host closed the connection)
19:46:25*anthgur joined #nim
19:46:35*woadwarrior joined #nim
19:47:10*kas joined #nim
19:48:17*Arrrr quit (Quit: WeeChat 1.2)
19:57:14pigmejAraq: what would be the best/recommended way to detect if I should complete with sug or with con ?
19:57:24Ethecois there a converter from cpp to nim by anychance?
19:59:53*woadwarr_ joined #nim
20:01:19reactormonkEtheco, c2nim works for header files, probably no templates though
20:02:08reactormonkkas, btw, if you look at source, always compile with -d:release so you have the least clutter
20:02:42*woadwarrior quit (Ping timeout: 246 seconds)
20:06:02pigmejreactormonk: is it just my emacs or indenting in nim-mode is sometimes broken
20:06:04kasreactormonk: But I read that -d:release will remove all kind of goodness provided by compiler (array bound check etc.)
20:06:34reactormonkpigmej, it's sometimes broken, remarkably after for i, x in foo:
20:06:53reactormonkkas, so what? you only want to read it after all, not run it
20:08:43pigmejreactormonk: I will try to do something with it when I will start my bigger project in nim
20:08:57kasah misunderstand... Good point.
20:09:38*jh32 joined #nim
20:09:38reactormonkpigmej, just start collecting issues when it doesn't work as expected
20:13:44kasreactormonk: What do you think what is the best method to monitoring memory usage for application written in nim? For example writing some alerts to log file if process exceed some memory limit?
20:14:12reactormonkkas, there's getProcessMem but that's about it
20:15:28kasreactormonk: Ok, thanks.
20:16:13reactormonkkas, maybe connect that to a signal that wakes up your thread once in a while
20:18:25kasreactormonk: Good idea.
20:20:24*xificurC_ joined #nim
20:21:00*xificurC quit (Remote host closed the connection)
20:21:06*Mat4 joined #nim
20:21:26*endou_________ quit (Read error: Connection reset by peer)
20:21:55*endou_________ joined #nim
20:22:16*mikolalysenko quit (Ping timeout: 256 seconds)
20:22:16*NhanH quit (Ping timeout: 256 seconds)
20:23:45*NhanH joined #nim
20:23:48*woadwarrior joined #nim
20:23:58*mikolalysenko joined #nim
20:24:14*Matthias247 joined #nim
20:25:43Ethecois there a reason when in Aporia and i run the program, the output doesn't actually provide the echo's until i terminate the program
20:26:07*woadwarr_ quit (Ping timeout: 265 seconds)
20:27:19pigmejreactormonk: http://wklej.to/9Hyc8/text
20:27:31pigmejcursor on hig<there>
20:27:44reactormonkpigmej, https://github.com/reactormonk/nim-mode/issues/new
20:27:55pigmejreactormonk: no no, not that it's indent problem nor nim-mode
20:28:10pigmejI wonder why nimsuggest doesn't suggest 'high' there
20:28:26reactormonkpigmej, aww.
20:28:45pigmejhmm, it doesn't suggest it at all even without that function call
20:29:03reactormonkpigmej, I have no idea. I don't know enough about the inner workings of nimsuggest :-/
20:29:27reactormonkI'll have to read into that at some point
20:29:41pigmejreactormonk: hmm, but should it, isn't it ?
20:29:46pigmejit should*
20:30:11reactormonkpigmej, yup, exactly
20:32:09*xificurC_ quit (Quit: WeeChat 1.2)
20:32:27*xificurC joined #nim
20:34:49*kas quit (Ping timeout: 245 seconds)
20:35:56pigmejAraq: http://wklej.to/9Hyc8/text why nimsuggest doesn't want to return `high` completion there for line 6 column 16
20:43:13*woadwarr_ joined #nim
20:43:28*woadwarr_ quit (Client Quit)
20:46:50*woadwarrior quit (Ping timeout: 272 seconds)
20:50:42pigmejreactormonk: hmm, con is a bit weird,
20:51:57pigmejand I have no idea how we can support it
20:56:26*anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…)
21:00:02*Kingsquee joined #nim
21:01:20Varriountozra: https://unsee.cc/gamuribo/
21:01:27dom96_Etheco: Buffering
21:03:18ozraVarriount: Ah, ok, fixed that earlier today :-) That's why I couldn't see it then :) I might PR tonight or tomorrow - would be good to get some of the fixes up to githubs highlighter too...
21:04:16*jefus joined #nim
21:04:37*jefus quit (Remote host closed the connection)
21:04:51*jefus_ joined #nim
21:04:58*jefus_ is now known as jefus
21:07:51pigmejreactormonk: could we talk for a while or you're busy with other things ?
21:08:11reactormonkpigmej, kinda, but screw it.
21:08:40pigmejreactormonk: the 'con' thingy seems to be more like those are available functions to call, select one
21:09:03pigmejit's not like complete INSIDE ()
21:09:07pigmejhttp://wklej.to/ScPgr/text
21:09:34pigmejcon depending on arguments that are already set, suggests what functions are possible to call
21:10:46pigmejso I wonder if it's correct task for company
21:10:53*ingsoc1 quit (Quit: Leaving.)
21:11:07pigmejbecause it would be quite useless I think
21:11:37reactormonkpigmej, how about tossing con of some kind of yasnipped solution?
21:11:48reactormonks/of/in favour of/
21:12:09pigmejtypes problem
21:12:13pigmejI wonder what about minibuffer
21:12:27pigmejor some keybinding to display possibilities but those are not completion
21:12:41*kumul quit (Ping timeout: 250 seconds)
21:12:53pigmejbecause con doesn't care about arguments, it just care about function itself it seems
21:13:26*wan quit (Ping timeout: 272 seconds)
21:15:28Varriountozra: I would like to get a new version of NimLime out as soon as possible. The current version is horribly outdated.
21:15:41pigmejVarriount: you're NimLime author ?
21:15:46Varriountpigmej: Yes.
21:15:55pigmejVarriount: how do you handle nimsuggest con ?
21:15:58reactormonkpigmej, so use con for yasnippet? I feel that's what's con is for.
21:16:03Varriountpigmej: No, it doesn't have NimSuggest support.
21:16:08pigmejah ;/
21:16:24pigmejreactormonk: hmm, dynamic yasnippet backedn ?
21:16:29pigmejbackend*
21:16:35reactormonkpigmej, basically.
21:16:35Varriountpigmej: I've kinda been putting it off. Sublime Text's built-in suggestion feature is ok.
21:17:07pigmejreactormonk: I never ever seen something like this probably...
21:17:08*pregressive quit (Remote host closed the connection)
21:17:13pigmejany links ?
21:17:22reactormonkpigmej, no idea
21:17:23pigmejVarriount: ah ok
21:17:28Varriountpigmej: My priorities list is as follows: c2nim integration, nimsuggest integration, other.
21:17:32reactormonkpigmej, mabye ensime
21:18:11pigmejreactormonk: I wonder what CEDET does
21:18:25reactormonkpigmej, go find out :-)
21:18:32pigmejyeah
21:18:44pigmejI just wanted to know what do you tkink about it
21:18:44*pikos joined #nim
21:19:53pigmejreactormonk: but hmm, I think I might have one idea ;D
21:20:01reactormonkpigmej, go ahead
21:20:29pigmejbtw I also updated company backend yesterday a bit (copy&paste + adjust from emacs-jedi)
21:20:37pigmejnot yet PR or something
21:22:21reactormonkpigmej, should I move it to nim-lang at some point and toss you access?
21:25:12pigmejyou could, just keep in mind that I don't have high elisp exp.
21:25:37reactormonkpigmej, neither do I. exp is as bad as php in terms of experience and people hacking in it ^^
21:25:43ozraVarriount: Cool - I'll jump right on it. Just gonna check so no current color themes are affected unintentionally, if so, I'll disable those matchers until I've fixed it properly, sounds good?
21:26:00*wan joined #nim
21:27:21ozraVarriount: How does the go to definition work in NimLime then? (Haven't looked at code, just the syntax highlighter - I think I might as well learn python to code on sublime)
21:28:08ozraThe dream: NimLime Text - all scripting in Nim B-) Zooom!
21:31:08pigmejreactormonk: then I have nothing against giving me access obviously
21:31:51*Sembei quit (Ping timeout: 265 seconds)
21:35:11*vendethiel- joined #nim
21:35:43*vendethiel quit (Ping timeout: 265 seconds)
21:48:31*anthgur joined #nim
21:49:31*BitPuffin|osx joined #nim
21:56:26*vendethiel- quit (Ping timeout: 246 seconds)
21:59:17*pikos quit (Remote host closed the connection)
22:02:32*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:02:47*davidhq joined #nim
22:09:17*fioco_ joined #nim
22:12:48*Mat4 left #nim (#nim)
22:27:16*vbtt_ quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
22:27:28*vbtt_ joined #nim
22:29:44*Jesin quit (Quit: Leaving)
22:34:07*boop is now known as boopisaway
22:37:53*vendethiel joined #nim
22:39:07*anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:46:07ozraVarriount: PR'ed...
22:46:39*boopisaway is now known as boop
22:46:56*Matthias247 quit (Read error: Connection reset by peer)
22:48:20*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:51:23*ddl_smurf joined #nim
22:53:43*wuehlmaus quit (Ping timeout: 256 seconds)
22:59:36*Jesin joined #nim
23:00:16*vendethiel quit (Ping timeout: 255 seconds)
23:03:51*wuehlmaus joined #nim
23:04:15*wuehlmaus is now known as Guest93295
23:05:43*Trustable quit (Remote host closed the connection)
23:08:05*Sentreen joined #nim
23:09:44*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:11:57*Sentreen quit (Client Quit)
23:15:00*kumul joined #nim
23:21:52reactormonkpigmej, what's company-nim-meta good for?
23:22:12*fioco_ quit (Quit: :See my work at lukethetechman.wordpress.com)
23:23:43reactormonkah, something for company.
23:24:02*vikaton joined #nim
23:25:28*brson quit (Quit: leaving)
23:25:49pigmejyu
23:25:55pigmejyup its' minibuffer for example
23:26:14reactormonkkk.
23:26:45pigmejI generally cleaned up a bit suggestion popup (removed all {} stuff)
23:26:47*saml_ joined #nim
23:27:12pigmejit's now displayed in minibuffer by default when single candidate is selected
23:28:00pigmejand there is something like 'doc buffer' (I have no idea yet what's exactly that, and how to use it from company itself), where we can present function doc etc (maybe you already have it in nim-mode itself).
23:28:10pigmejanyway, I will go sleep now ;/
23:28:16*yglukhov________ quit (Quit: Be back later ...)
23:28:20reactormonkpigmej, cool
23:28:22reactormonksleep well o/
23:28:26pigmejthx
23:36:05*lamefun joined #nim
23:36:23lamefunCan Nim use itself as scripting language (load untrusted code in a sandbox)?
23:40:18*anthgur joined #nim
23:40:54*lamefun left #nim ("Leaving")
23:45:16ldleworkDoes a question get answered if a tree falls down?
23:45:33ldleworkor something
23:46:01*anthgur quit (Ping timeout: 252 seconds)
23:46:34ozraldlework: what up?
23:46:47ldleworkI was just making a joke about the guy who asked and then left
23:47:20ozrahaha. ok. just flipped to the chat, so didn't follow. Did have a couple of trees fall the last days though ;-)
23:52:38*jbomo joined #nim
23:53:47*TEttinger joined #nim