<< 15-04-2015 >>

00:03:19BlaXpiritfilwit, https://gist.github.com/BlaXpirit/7e111f588177d763497e
00:04:30filwitthere we go.
00:14:57*TEttinger joined #nim
00:16:02*tmku quit (Ping timeout: 272 seconds)
00:19:22*brson quit (Ping timeout: 244 seconds)
00:21:56*anthony_ joined #nim
00:23:09*tmku joined #nim
00:31:15*HakanD___ quit (Quit: Be back later ...)
00:39:53*EXetoC quit (Ping timeout: 246 seconds)
00:41:05*BlaXpirit quit (Quit: Quit Konversation)
00:45:00*gsingh93 joined #nim
00:45:01*gsingh93_ joined #nim
00:58:36*fowlmouth quit (Ping timeout: 240 seconds)
01:11:52*pregressive quit (Remote host closed the connection)
01:27:04*fowl joined #nim
01:34:29*akiradeveloper joined #nim
01:41:19dhasenanIn the unittest module, what is 'suite' for? It doesn't seem to affect the output.
01:41:42dhasenanOr at least, the suite name doesn't show up in the output.
01:45:34MagusOTBwhat does "invalid type" mean?
01:46:26def-MagusOTB: have an example where you get that?
01:46:59MagusOTBone sec
01:49:28MagusOTBhttp://pastebin.com/KU3BQHmz
01:49:38flaviudhasenan: It doesn't do anything, but that doesn't mean it'll continue to do nothing.
01:50:11MagusOTBI'm guessing I'm doing something wrong with the 'WindowPtr' bit, but I'm not sure what.
01:50:23flaviuIt might be used to create JUnit XML in the future.
01:52:36def-MagusOTB: `var int` makes no sense. When it's a var object, every field is mutable, otherwise none
01:53:37MagusOTBah. duh.
01:54:16MagusOTBin the program I extracted that from, the error was on a line very far from that
01:54:41def-yes, it's a bit weird that the error only happens when you use the object
01:54:54def-You could report that the error line should be fixed
01:55:04def-as a github issue
01:56:01*itsmeront quit (Ping timeout: 246 seconds)
01:57:39MagusOTBthe smaller version looks like it does it right though
02:01:24*anthony_ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
02:04:20*anthony joined #nim
02:04:44*anthony is now known as Guest44126
02:25:50*akiradeveloper quit (Remote host closed the connection)
02:30:04*darkf joined #nim
02:32:42a5iWhere is BlaXpirit?!
02:34:00*endragor joined #nim
02:37:21reactormonka5i, ruby was my first language and I'm with nim now :-)
02:38:53a5ireactormonk: it could have been your first, but I love Ruby :P
02:39:00a5iJavaScript was my first
02:39:18reactormonka5i, first major one. I've messed with VB and JS before
02:41:05reactormonkpigmej, ping
02:41:43reactormonkpigmej, how would you make the data interchange format for epc? alist style or just a list to save space?
02:44:13a5iI like both Nim and Crystal
02:44:28reactormonkI could a) rewrite suggest.nim b) just reparse the output...
02:44:44a5iElegant, Fast, and many nice features
02:45:08a5iat the end of the day, I love Ruby syntax :P
02:45:16a5imost of it anyway
02:49:30*bjz joined #nim
02:49:48onionhammercrystal would be great without all those 'end's :)
02:55:05*jholland quit (Quit: Connection closed for inactivity)
02:56:20*BitPuffin|osx quit (Ping timeout: 265 seconds)
03:03:52*Guest44126 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
03:08:34*johnsoft quit (Ping timeout: 245 seconds)
03:10:17*saml_ quit (Quit: Leaving)
03:19:57*johnsoft joined #nim
03:26:21*akiradeveloper joined #nim
03:31:01*akiradeveloper quit (Ping timeout: 248 seconds)
03:31:51*HakanD___ joined #nim
03:33:39*akiradeveloper joined #nim
03:36:04*HakanD___ quit (Ping timeout: 245 seconds)
03:49:02*Kingsquee joined #nim
04:15:08*gsingh93 quit (Ping timeout: 250 seconds)
04:25:01*gsingh93 joined #nim
04:27:59*gsingh93_ quit (Ping timeout: 256 seconds)
04:29:33MagusOTBhow do I instantiate a var object?
04:30:28*gsingh93 quit (Ping timeout: 244 seconds)
04:33:57VarriountMagusOTB: Uh, what?
04:34:24MagusOTBso earlier I tried to make an object with a mutable field, and I guess it needs to be a var object
04:34:36VarriountMagusOTB: 'var x: objectType'?
04:34:50VarriountOr do you mean
04:35:14Varriount'proc foo(p: var objecttype) = ...
04:35:38MagusOTBis 'var object' not a thing?
04:36:32VarriountWhat do you mean? It exists in proc parameters, but it isn't a real type.
04:36:55MagusOTBI don't think I know what I mean, sec. I'm pbad at this.
04:36:55cazovlike type TObj = var object Property : Int or w/e
04:37:02MagusOTByeah that ^^
04:37:09VarriountYou can't do that.
04:37:33MagusOTBcan I make a constructor that has a return value that defaults to var type
04:37:43VarriountMagusOTB: Could you just show me your code?
04:37:50MagusOTBI wan to be able to say 'var a = newThing()' and have a come out to be var thing instead of thing
04:38:04MagusOTBone sec
04:39:24MagusOTBhttp://pastebin.com/VWG6EsUx
04:39:37MagusOTBI want a to be a var thing, not an immutable thing, is that the right way to do it?
04:40:03VarriountUh, no.
04:40:10MagusOTBI don't think I understand how storage classes work in this language :|
04:40:25VarriountMagusOTB: What programming language are you coming from?
04:40:50MagusOTBC
04:41:00MagusOTBalsoa a fair amount of python and javascript
04:41:01MagusOTBbut mostly C
04:43:27fowlMagusOTB, var thing = Thing() # now you can get its address and mutate it; let thing = Thing() # now this isnt possible
04:44:21VarriountMagusOTB: https://gist.github.com/anonymous/b9d4b2c72474eec3f6ea
04:46:25VarriountMagusOTB: An object is pretty much equivalent to a C struct
04:47:02cazovdoes returning an object cause a copy?
04:47:12VarriountIn this case, no.
04:47:34VarriountNor does passing an object type as an argument to a procedure
04:48:02VarriountHowever an object type will be copied when assigned.
04:51:50cazovok. that makes sense. thanks :]
04:55:21Varriountcazov, MagusOTB: https://gist.github.com/Varriount/5ce47935b973dfe44004
04:56:25VarriountAdding 'var' to a parameter type essentially tells Nim 'make the implicit pointer passed for this type mutable'
04:57:13Varriount(As, again, Nim passes most things by reference/pointer behind the scenes)
04:57:31MagusOTBah
04:57:32MagusOTBneat
04:57:34cazovahh ok
04:58:22MagusOTBnewTypeName is the canonical way to construct things, right?
04:58:53VarriountMagusOTB: For reference types, I think. For object types, it's 'initTypeName'.
04:59:04VarriountAlthough, I might have those switched around.
05:00:19VarriountMagusOTB: Whenever I read your nick, I think of MantisBT (Bug tracker software)
05:00:35MagusOTBha
05:00:36MagusOTBI've seen that
05:01:02MagusOTBthat's a new one though :)
05:01:52MagusOTBso the difference between a mutable and nonmutable type is per-instance and the difference between a reference and object type is per type?
05:02:36MagusOTBerr... not nomutable type, nonmutable... identifier?
05:02:56VarriountMagusOTB: Pretty much, although you can augment already existing types with 'ref' when declaring a variable type
05:03:15Varriountvar obj: ref ObjectType
05:04:35MagusOTByeah... how do you declear a whole type to be ref?
05:05:05Varriounttype RefType = ref object
05:05:20MagusOTBok, I think that's where I got 'var object'
05:05:28Varriount(Or ref ObjType, or ref RefType)
05:06:04MagusOTBso 'var' and 'ref' are orthogonal
05:07:24MagusOTBthanks for the help, I successfully summoned a red cube, so imma head out.
05:07:37*MagusOTB quit (Quit: leaving)
05:07:54*fowl quit (Quit: Leaving)
05:09:11*filwit quit (Quit: Leaving)
05:09:40*fowl joined #nim
05:13:38*ChrisMAN quit (Ping timeout: 250 seconds)
05:19:30*buMPnet quit (Read error: Connection reset by peer)
05:20:57*buMPnet joined #nim
05:45:35*transfuturist joined #nim
05:46:28transfuturistAraq: Have you considered adding a top-of-file pragma to set compiler options directly in the source?
05:46:47transfuturistit would be more convenient than separate config files
05:47:00*gsingh93 joined #nim
06:01:37*gsingh93_ joined #nim
06:15:16*gsingh931 joined #nim
06:18:41*gsingh93 quit (Ping timeout: 276 seconds)
06:19:31*akiradeveloper quit (Remote host closed the connection)
06:35:29*gsingh931 quit (Ping timeout: 246 seconds)
06:35:35*gsingh93_ quit (Ping timeout: 276 seconds)
06:39:24reactormonktransfuturist, nah, compiler options are supposed to be global.
06:39:41reactormonkso as soon as you start including said file your compiler options to wush
06:41:46*Kingsquee quit (Remote host closed the connection)
06:42:11*Kingsquee joined #nim
06:48:31*Ven joined #nim
06:53:06transfuturistah
06:56:25pigmejreactormonk: pong
06:56:33pigmej(I'm in central europe timezone :P)
06:56:41reactormonkyeah, gotta go sleep soon
06:56:52pigmejthe problem with nimsuggest is that it works as a program not as a library
06:57:43pigmejabout parsing... tbh I would copy nimsuggest :D
06:57:48pigmejand rewrite parsing part
06:57:50reactormonkyeah, I can hack epc in. I assume we only wanna go via stdin?
06:57:59pigmejreactormonk: not at all
06:58:09pigmejepc expects tcp communication on random port
06:58:15pigmejwhich is then printend on stdout at first
06:59:10pigmejso it's more like classical request/response with tcp
06:59:21reactormonkso epc talks via server
06:59:31pigmejyeah
06:59:44reactormonkcan do
07:00:06pigmejbut the serevr part seems to be quite easy (the epc compatible server)
07:00:23reactormonkhow does the passing of the port work?
07:00:34pigmejit just prints port on stdout
07:00:38pigmejafter process is started
07:01:18pigmejI could probably take care of this part on thursday from 7PM CEST.
07:01:20pigmejif so.
07:02:16*bluenote quit (Ping timeout: 246 seconds)
07:02:59reactormonkfrom what I see use writelnHook to accumulate the data and then create the sexp, then send it according to epc
07:03:30pigmejit's like request response
07:03:46pigmejjust like classic rpc :) just emacs / elisp on client side
07:03:54pigmejand epc manages the processes also.
07:04:19pigmej(epc:controller)
07:04:32*transfuturist quit (Ping timeout: 272 seconds)
07:04:35reactormonkso yeah copy serve, parse the msglines (ugly, but best way), package into epc, code the starting sequence, code the rpc part
07:04:56reactormonkaka an action proc for epc
07:05:02pigmejyup
07:05:15reactormonkand methods. Can hardcode if you want.
07:05:20pigmejprobably we don't even need the discovery
07:05:26*endragor_ joined #nim
07:05:27pigmejif you have time, then please so :)
07:05:40pigmejif not I could handle that probably :D
07:06:03pigmejthe protocol is not that hard from what I know
07:08:56*endragor quit (Ping timeout: 240 seconds)
07:12:34pigmejreactormonk: I think when we will have /working/ version, then we can show it to araq and he will decide what to do with nimsuggest ?
07:13:01reactormonkpigmej, no idea. Gotta go do some contract work starting tomorrow and roadtripping meanwhile.
07:13:41pigmejhmm
07:14:29pigmejS-expressions are working ?
07:15:43reactormonkshould according to my asserts
07:17:25pigmejthen probably I should have all what I need :) (I suppose)
07:20:03*akiradeveloper joined #nim
07:23:15*endragor_ quit (Remote host closed the connection)
07:24:43*akiradeveloper quit (Ping timeout: 255 seconds)
07:25:02*milosn quit (Read error: Connection reset by peer)
07:25:49*milosn joined #nim
07:27:59*BlaXpirit joined #nim
07:28:36*vendethiel quit (Ping timeout: 256 seconds)
07:29:02*vendethiel joined #nim
07:31:41*akiradeveloper joined #nim
07:46:12*HakanD___ joined #nim
07:46:53*dtscode is now known as charmander
07:47:03*HakanD____ joined #nim
07:47:11*charmander is now known as squirtle
07:48:23*akiradeveloper quit (Remote host closed the connection)
07:50:51*HakanD___ quit (Ping timeout: 256 seconds)
07:52:03*HakanD____ is now known as HakanD
08:05:49*coffeepot joined #nim
08:13:42*akiradeveloper joined #nim
08:18:02*gokr_ quit (Quit: IRC for Sailfish 0.9)
08:21:03*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:26:55*Trustable joined #nim
08:47:09*Arrrr joined #nim
08:48:33Arrrr.eval echo "Hello Nimrod"
08:48:36MimbusArrrr: Hello Nimrod
08:49:17repaxAhoy, the pyrate has arrived!
08:50:14coffeepotGood morning Arrrr
08:50:52Triplefox.eval echo "Yarrrr"
08:50:53MimbusTriplefox: Yarrrr
08:50:57Triplefox:3
08:51:03Arrrrhello nimroders
09:00:39fowlmorning all
09:00:48*OnO joined #nim
09:00:54coffeepotgood morning fowl :)
09:02:09fowli'm pretty close to having interfaces working
09:02:56coffeepotfowl: i discovered your repo last night, fowltek. Some really nice examples in there - though a bit out of date with the current compiler.
09:03:29fowli have too much code to maintain :/
09:03:36*milosn quit (Ping timeout: 240 seconds)
09:04:20coffeepotthe neural networks one doesn't need any changes, might use it for something - just need to think what :D
09:05:17coffeepotsome really great stuff though - I've enjoyed reading through your code for inspiration on my gaming related things
09:05:27*Arrrrr joined #nim
09:05:49*Arrrr quit (Ping timeout: 246 seconds)
09:05:55fowlcool :)
09:06:38coffeepotI wonder, would it be worth including things like quadtrees into a standard tree variation library?
09:06:57Arrrrrfowl: are interfaces going to work like go's ?
09:07:29ArrrrrOr have any special quality.
09:09:52*endragor joined #nim
09:10:03fowlpretty much the same thing
09:11:14fowlexcept anything cool in go is hard coded in the compiler
09:11:35fowli wrote a macro so that "import_repo github.com/user/package" works for ex
09:11:37coffeepotaren't go interfaces kind of used as generics, compared to something more akin to code contracts?
09:11:57BlaXpiritfowl, O_o
09:12:03BlaXpiritwhere is it
09:12:07fowlin my gists
09:12:12*Kingsquee is now known as Kingsqueebrushie
09:12:32Arrrrrhttps://gist.github.com/fowlmouth/ac51baef7956af1ebdf8
09:13:12fowlcoffeepot, they are but go doesnt have true generics, because interface is used as a generic container, functions aren't instantiated, instead of objects are downclassed
09:13:20Arrrrr"except anything cool in go is hard coded in the compiler" you mean that is hardcoded in go or in nim
09:13:47Arrrrri suppose the later
09:14:48fowlyea
09:14:55coffeepotthe gist looks very interesting - is refoptional something built into nim now?
09:15:22BlaXpirithttps://gist.github.com/BlaXpirit/7e4a445f5c64ef658d2d "Nimception"
09:16:06coffeepotBlaXpirit: lol!
09:16:40fowlcoffeepot, no its defined there
09:16:46Arrrrrwhy the interface is defined as Drawable but used as IDrawable? is that a typo or actually how will be used?
09:17:06fowlArrrrr, Drawable can't be instantiated, its a generic constraint
09:18:14coffeepotderp, just seen the def for RefOptional :D
09:18:32coffeepotI must need more coffee
09:19:00coffeepotthat is really cool
09:19:38Arrrrrso where the 'I' comes, is generated by macros or the like?
09:20:41coffeepotIDrawable* = object of Interface, you could always define it as DrawableConcept and Drawable* = object of Interface I guess
09:21:13fowlArrrrr, if a Drawable type is guaranteed to be able to call draw(obj) then IDrawable can be generated that captures that draw function for some type
09:21:55fowlcoffeepot, i'll probably make it DrawableInstance
09:22:18coffeepotyeah that sounds better than what i said :)
09:23:38Arrrrrfowl you are a genius
09:23:58fowlnah
09:24:28fowlconcepts are cool though because unlike an abstract base class, you can fulfill a behavior way after a type is defined
09:24:30*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:25:28coffeepotthis is pretty cool, so seq[IDrawable] effectively means we can stuff unrelated objects into one seq as long as they implement the interface calls?
09:26:36Arrrrrand seems like, unlike java, you dont have to write explicitly "implements drawable".
09:26:52coffeepotdoesn't that make seq into a heterogeneous storage type?
09:27:02coffeepotor allow it to be rather
09:27:59coffeepoti think they are all inherited in this case though
09:29:53fowlah in the end Interface won't be a base type
09:30:26fowltheres no need for it to be
09:30:53coffeepotso this would allow seq to take unrelated classes?
09:31:03fowlyea
09:31:16coffeepot:) nice
09:31:21fowlcoffeepot, theres an example on line 176
09:33:35coffeepotwhat is this doing? new(result) do (x:Obj1):
09:33:35coffeepot echo "Freeing ", x[]
09:33:52coffeepotnot familiar with do in nim
09:34:01Arrrrri was about to ask that
09:34:16fowldo passes a function
09:34:31*Pokon quit (Ping timeout: 246 seconds)
09:34:35fowlhere its set as the finalizer when that ref is freed
09:35:30coffeepotwow so I can pass a destructor by going new(mytype) do(x: mytype): <destructor>?
09:36:14fowlnew(instance) but yes
09:36:38coffeepotthat's very interesting, if slightly unintuitive syntax to me
09:37:13fowlgenerally you would call the func free and invoke it like new(result, free)
09:38:07ArrrrrIt is necessary to do a (i assume) casting here? https://gist.github.com/fowlmouth/ac51baef7956af1ebdf8#file-gistfile1-nim-L178-L180
09:38:25coffeepothuh has that been in nim for a while? The forum thread on constructors made me think destuctors were only under consideration
09:39:24fowlArrrrr, thats not casting, its `as` operator, ln 132
09:40:06Arrrrrah, it transform a concept to an interface?
09:40:51coffeepotalso, out of interest, why is GCfullcollect required using your interface technique? Does converting to an IDrawable bump the reference count or make temporary references that need cleaning up?
09:41:17fowlArrrrr, yesp
09:41:44BlaXpirittemplating language in 45 lines of code
09:41:47BlaXpiritthat's pretty good
09:42:25BlaXpirithttps://github.com/BlaXpirit/nimception
09:42:52fowlcoffeepot, because i wanted to make sure it was gc safe, it does keep a reference, and since IDrawable can be optionally a ref/ptr/value you have to call destroy() to clean it up if you think it may keep a reference
09:43:49fowldestroy() also deallocs if it is a ptr
09:44:54coffeepotI really like the idea of interfaces as code contracts for objects, but I must say they were a nightmare in Delphi for the reference bumping. If I recall correctly checking if an object was an interface bumped and de-bumped the ref counter
09:45:38fowlchecking if T is Drawable happens at compile time
09:46:04coffeepotmind you it was only really a problem when using interfaces with ref counted objects - caused them to be unexpectedly freed if you weren't careful. Don't think that'll be the same issue in nim
09:46:10coffeepotfowl: ah nice! :)
09:47:01ArrrrrMan, the power of interfaces in compile time.
09:47:21fowl`as` takes Drawable and typedesc[IDrawable] so if it doesnt error then draw(obj) must be fine
09:48:22coffeepotthis is really sweet
09:49:14ArrrrrYes, after this is finished someone should write a blog post of this.
09:50:37coffeepotI'm thinking BlaXpirit nimception might make a good blog post too, 45 line templating is pretty impressive
09:51:29coffeepotI really need to set up a github account and start contributing some stuff
09:51:59BlaXpiritwhat i want to do here is to make an actual replacement for nim templates which is better
09:52:18BlaXpiritbut yeah, 45 line templating language was a nice byproduct
09:53:00coffeepotBlaXpirit: nice :) If these things are provided as easy to use libraries it would really help things like webdev, etc too
09:53:37BlaXpiritthere was this already https://github.com/onionhammer/nim-templates
09:53:44BlaXpiritit's probably better, just much more code
09:54:11coffeepotthere's so many cool libs in nim I have trouble keeping track of them all!
09:55:45coffeepotlooked into gokr urho3d nim conversion today. With what you've done, fowl, on physics and quadtrees already I'm kind of a bit spoiled for choice for gaming related code!
09:56:44gokrNote that Urhonimo is mainly the work of Araq :)
09:57:02gokrI guess you checked the samples?
09:57:30coffeepotoh, well credit where it's due! It looks very interesting
09:57:42coffeepotyes the samples are what drew me to be honest
09:57:52coffeepotnothing like examples to learn how a library works
09:58:06gokrNote that we simply ported some of the Urho samples, so they are a bit "C++-ish" in style.
09:58:54gokrBut yeah, it's a full blown game engine and we are already using it extensively in our next version of our client.
09:59:46coffeepot:D using in a commercial concept is a great sign that it's working well and performant
10:00:07gokrYou can search youtube for Urho3D and you will find quite a lot.
10:00:26coffeepotI noticed there was some C in here https://github.com/3dicc/Urhonimo/blob/master/examples/character.nim not quite sure how the emit works here
10:00:45gokrYeah, that's a bit ugly - Araq wants to fix that.
10:01:19coffeepotis this required? Seemed like the classes were defined below again in nim
10:01:34gokrI am uncertain about it, ask Araq.
10:02:58*HakanD quit (Quit: Be back later ...)
10:03:21*milosn joined #nim
10:17:04*milosn quit (Ping timeout: 255 seconds)
10:28:33*milosn joined #nim
10:29:04*Ven joined #nim
10:39:17fowlgokr, i'm sure that ATTRIBUTE() stuff could be importc'd
10:40:35flaviuBlaXpirit: Nice! That looks useful!
10:41:18*milosn quit (Read error: Connection reset by peer)
10:41:59*milosn joined #nim
10:43:36*Kingsqueebrushie quit (Quit: Konversation terminated!)
10:44:26*milosn quit (Read error: Connection reset by peer)
10:44:55*milosn joined #nim
10:46:30*bluenote joined #nim
10:47:01bluenoteHow can I post code on the forum? Is it markdown syntax, i.e., 4 space indentation?
10:47:12dom96```nim ... ```
10:47:25bluenotethanks!
10:47:47dom96or it might be ```nimrod still
10:48:00bluenotethis also works for multiline blocks?
10:48:33dom96yes
10:52:20*TEttinger quit (Ping timeout: 252 seconds)
11:00:50*akiradeveloper quit (Remote host closed the connection)
11:04:38*milosn quit (Ping timeout: 246 seconds)
11:09:12*EXetoC joined #nim
11:09:25*untitaker quit (Ping timeout: 264 seconds)
11:14:32*untitaker joined #nim
11:17:04*milosn joined #nim
11:25:01*HakanD joined #nim
11:27:51*BlaXpirit quit (Quit: Quit Konversation)
11:40:37*milosn quit (Read error: Connection reset by peer)
11:41:42*milosn joined #nim
11:43:31*akiradeveloper joined #nim
11:48:02a5iDang it
11:48:10a5iI keep missing blax :(
11:50:29Arrrrryay https://github.com/Araq/Nim/blob/13a5ecda320ada29f19432df805dfc4538f8e103/tests/parser/ttupleunpack.nim
12:00:17*milosn quit (Ping timeout: 250 seconds)
12:12:50*milosn joined #nim
12:33:14*xcombelle joined #nim
12:37:40*milosn quit (Ping timeout: 272 seconds)
12:39:46*akiradeveloper quit ()
12:50:55*pafmaf joined #nim
12:51:34*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:54:39*milosn joined #nim
12:56:07*mpthrapp joined #nim
13:16:58Arrrrrwhy procCall wasn't called super, which is shorter (even though it is *more* than super)?
13:21:50AraqArrrrr: because it has nothing to do with 'super'.
13:22:35Araqit works quite different. it means "Ignore dynamic binding here, trust overloading resolution"
13:22:52Araq"in other words, treat it like a proc call"
13:23:16*xet7 quit (Ping timeout: 240 seconds)
13:24:37ArrrrrYes you are right. Well.
13:28:56ArrrrrThen, in order to use it as super, you actually have to know what is the super class of a given parameter.
13:29:10*xet7 joined #nim
13:34:49*^aurora^_ joined #nim
13:42:15novista fine day to complain \o/ Araq nim needs to either have 1-based arrays + inclusive intervals or 0-based arrays + non-inclusive intervals. Or kittens will die.. (oh not this again i know..)
13:43:18Araqor: you learn the very basics of math.
13:44:08Araqin math sums from 0 to N-1 are common and mathematicians can deal with it.
13:45:32novistnow we have to deal with lots of n+1 / n-1 gotchas for no good reason
13:46:22novistlet me quote you: "Nim's design focuses on efficiency, expressiveness, elegance (in the order of priority).". There is really nothing efficient, expressive and most importantly elegant about this
13:47:13pigmejwhat is the discussion about?
13:47:25Arrrrrsomething about cats
13:47:27Araqit surely is elegant. Intervals have inclusive bounds, exclusive bounds don't work.
13:47:29novisti know change like this sucks a lot.. but its similar to python3 thing. you know how smooth is transition. nim has the same situation.
13:47:43Araqexclusive bounds do not work!
13:47:44*milosn quit (Ping timeout: 245 seconds)
13:47:48novistwell then 1-based arrays/strings would solve the problem
13:48:14novistarrays we can make so, strings - not. confusing to mix them then
13:48:41pigmejnovist: what is the case ? examples ?
13:49:00novistalthough idk what does not work with non-inclusive, in say python there is no such gotchas to deal with
13:49:28novistpigmej: for i in 0..length-1 stuff
13:49:38Araqpython is full of gotchas when you're used to inclusive upper bounds
13:49:54Arrrrrcant be done with 0..<length?
13:49:55novistlike what?
13:50:05HakanDagreed that inclusive bounds is better, but 0-based arrays surely leads to n+1/n-1 problems, mostly because of how people are used to do stuff in other languages
13:50:29Araqrange(1, 3) vs range(N)
13:51:11pigmejAraq: in python right side is always exclusive
13:51:11AraqArrrrr: of course it can, novist just likes to argue
13:51:14novistcant see anything wrong with range, works just the same
13:51:29novistHakanD: whats the right way?
13:51:30*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
13:51:44pigmejAraq: in python it's (inclusive, exclusive) afair always
13:51:57Araqcounting from 1 to 2 with range(1, 3) surely counts as a gotcha
13:51:59pigmejwhile range defaults to 0,N if only one argument given
13:52:05*nimm2 joined #nim
13:52:08HakanDthere's no right or wrong way imho, just preference, or habits
13:52:14pigmejHakanD: +1
13:52:23novistwhat gotcha if its non-inclusive?
13:52:26pigmejnovist: imagine if you wish to create numbers 1 to 100
13:52:29AraqHakanD: then you simply ignore every discussion here
13:52:30novist1 included, 3 not included
13:52:47HakanD(:
13:52:55novistHakanD: should there not be one obvious right way to do things?
13:52:56pigmejit's just matter of preference / useage
13:53:01pigmejusage*
13:53:12AraqHakanD: how do you count up to high(someEnum) when there is no high+1's element
13:53:12pigmejnovist: in python to create 1 to 100, you need range(1, 101)
13:53:31Arrrrrin before optional colons
13:53:33pigmejwhile in nim just 1..100
13:53:56novistpigmej: see that works great when stuff is 1-based
13:53:58*milosn joined #nim
13:54:12pigmejnovist: not
13:54:21Araqnovist: you're right that starting from 1 works better, but *shrug* .. < is a thing in Nim.
13:54:35pigmejI'm also from python world, but ... I get used to that;D
13:55:12AraqPython has no enums and not even characters and is weakly typed so there is always high+1 :P
13:57:37*nimm2 left #nim (#nim)
13:57:44*milosn quit (Read error: Connection reset by peer)
13:57:58Araqand in C &a[N] has to be a valid address but it's not dereference-able. Very "elegant" indeed.
13:58:57*banister joined #nim
13:58:57novistin c loops usually have condition i < N, again 0-based + non-inclusive range
13:58:59*milosn joined #nim
13:59:22Araqin C you write '<', in Nim you write '.. <'. get over it.
13:59:56*BlaXpirit joined #nim
14:00:29*Jehan_ joined #nim
14:01:22Araqalso, it does compose substr(s, i, <N) and is explicit. It simply is elegant, but you don't see it. :P
14:02:07Arrrrri wouldnt not arge against a ... proc but it is true <N has more advantages
14:02:22*milosn quit (Read error: Connection reset by peer)
14:03:21coffeepotwait are we discussing whether to make things like arrays and seq's count from 1, so myseq[0] is invalid? Or am I just going crazy
14:03:38Arrrrrboth
14:04:02*milosn joined #nim
14:04:15Jehan_Hmm. Am I odd in that I generally just write N-1 instead of <N?
14:04:47novisti think its easy to miss < or -1 at times
14:05:12coffeepotpython's slices have nice elegance to them in their indexing but i find it strange to even discuss indexing from 1, what advantage would that give?
14:05:27novistlack of </-1 stuff
14:05:41novisti dont like indexing from 1 either, believe me
14:05:47novistbut i dont like </-1 more :)
14:05:49coffeepotbut then you have to make sure it starts from 1 so isn't this just moving the problem over?
14:06:16novistthen there is no problem
14:06:46novisthell even ability to define 1-based string would make me shut up. if it could at least be implicitly converted to/from standard string
14:07:11novistand possibly others thinking like me would have harder time arguing against </-1
14:07:12Arrrrrwhat's the matter with strings?
14:07:12coffeepotbut what happens when you access the zero index in a string then?
14:07:30Jehan_coffeepot: Out of bounds error.
14:07:44Jehan_Same as when you access something greater than the length of the string.
14:07:53novistoh also seqs are 0-based w/ no way to change?
14:08:13Jehan_novist: Correct.
14:08:23*OnO joined #nim
14:08:31Jehan_Well, you can write a wrapper type around seq that does 1-based indexing.
14:08:31coffeepotwhat's the advantage then of indexing from 0 when the same "problem" occurs at the other end of the array?
14:08:49coffeepotor use iterators?
14:09:00coffeepotno indexing necessary :D
14:09:08novistcoffeepot: with 1-based string of length 10 you can loop over it with 1..10, what problem on what end?
14:09:14*OnO quit (Client Quit)
14:09:23Jehan_coffeepot: There are plenty of algorithms that require random access, not sequential access.
14:10:29Jehan_That said, 0-based vs. 1-based indexing is something where neither is always better. Both alternatives result in situations where they're better than the other (and obviously, also some where they're worse than the other).
14:11:09EXetoC1-based indexing in a low level language?
14:11:16*pregressive joined #nim
14:11:35Jehan_EXetoC: even there.
14:11:38coffeepotwhat languages actually use 1 based indexing? Aside from pascal for strings
14:11:41*saml joined #nim
14:11:50Arrrrrvisual basic
14:11:55gokrSmalltalk
14:12:00novistones aimed at scientific community too
14:12:17coffeepotfair enough, was just curious have never encountered it!
14:12:27Jehan_Assume you have a Pascal-like string type. One byte encoding the length, the rest are the actual strings.
14:13:02Jehan_This allows for a more efficient encoding of s[i], and you can encode "not found" results with 0.
14:13:15BlaXpirit1-based indexing is bad. inclusive upper bounds are bad. 0-based indexing with inclusive upper bounds is the worst. it's not getting changed. gotta move on.
14:13:22Jehan_s/encoding of/code generation for/
14:13:46novistoh hey BlaXpirit o/
14:13:49ArrrrrSo, in nim you have to get used to use low/high procs if you dont want to get crazy
14:14:04Jehan_BlaXpirit: I'm not in favor for it (or anything else) being changed, but to claim that 1-based indexing is generally bad is ignorant.
14:14:12BlaXpiritnope, it's bad
14:14:15BlaXpiritjust bad
14:14:53gokrThing is - if the language is "high level" enough I can't see it being a problem generally. In Smalltalk it has never been considered a problem - because you don't always fiddle around with indexing.
14:15:09gokrIf you have proper iterators etc - indexing is much more rare.
14:15:10novistBlaXpirit: you are right, gotta move on. though im afraid moving on will be away from nim. and im not talking about myself
14:15:14*darkf quit (Quit: Leaving)
14:15:33*pregressive quit (Client Quit)
14:16:04coffeepot"for i = 1 .. s.len" or "for i = 0 .. <s.len" (if my syntax is right?)
14:16:05Jehan_Eh, whatever. I think it's time to withdraw from the Nim community anyway, it's only bikeshedding these days.
14:16:06*Jehan_ quit (Quit: Leaving)
14:16:07novistgokr: iterators only are good for sequential access. nim is low level enough to often deal with random access
14:16:20*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:16:21EXetoCcoffeepot: s.high
14:16:29EXetoCthere's that too
14:16:35BlaXpirit> implying random access is low level
14:16:41coffeepotbikeshedding is a sign that the language is useful enough for people to quibble about details :)
14:16:43BlaXpiritridiculous
14:16:57BlaXpiritcoffeepot, there is something in these words
14:17:40novistBlaXpirit: my reasoning is random access being more complex thus lower level which is synonymous to "complex"
14:17:54BlaXpiritwut
14:18:04gokrnovist: Well, I can only say I have never felt it's a problem in Smalltalk. Exact reasons are probably several, but to be as black and white as BlaXpirit is ... well, I am with Jehan here.
14:18:43novistsmalltalk you said has 1-based indexing right?
14:18:48gokryeah
14:18:54novistand ranges inclusive or not?
14:19:23gokrSmalltalk has Intervals and you don't use them that much.
14:19:43BlaXpirit"interval" is typically both ends non-inclusive :|
14:19:46*Ven joined #nim
14:20:12novistso how do you print "hi" 100 times in smalltalk?
14:20:25*Ven quit (Client Quit)
14:21:11gokr100 timesRepeat: [Transcript show: 'Hi']
14:21:31BlaXpiritmm i expected something like ruby
14:21:44novistthats cool. how about 1 to: 100 do: ... ? seems like that range would include both 1 and 100
14:21:52gokrSure, it does.
14:21:54novist1-indexing + inclusive ranges = less headache
14:22:01BlaXpiritsure
14:22:17novistnow we know why you had no problems in smalltalk :)
14:22:34BlaXpiritno other language has 0-based and inclusive, we know
14:24:06*askatasuna joined #nim
14:24:16gokrnovist: Well, you also seldom do "range arithmetics" in Smalltalk.
14:24:36coffeepot"for idx, item in items:" no -1 yet you have the index?
14:25:08EXetoCcoffeepot: what do you mean?
14:25:28BlaXpiritmeans use this code and u avoid dealing with indices
14:25:51BlaXpiritrather with off-by-1 errors
14:25:51EXetoCok
14:25:59coffeepotwell, is this about having to use -1 at the loop extent which looks "ugly", or about using idx+1 in the loop?
14:26:08fowlno, it means high(arr) is not the same as len(arr)
14:26:39fowlthink about if arr can be indexed from -10 to 10, if you start at 0 you're wrong too
14:26:54coffeepotfowl: yes, quite!
14:27:14BlaXpiritcode that starts at 0 needs to be abolished
14:27:25BlaXpiritto prepare for the new age of openArray-free code
14:29:04EXetoCdon't bring up 1-indexing if you're going to argue for familiarity
14:29:29Arrrrrin 2050 "programing language features that went wrong"
14:29:32*bjz quit (Quit: Textual IRC Client: www.textualapp.com)
14:29:39coffeepothaha
14:30:46dom96Does somebody want to change the syntax now to introduce 1-indexing?
14:30:56BlaXpiritnope
14:31:01coffeepothang on though, if you have 1-indexing, doesn't the compiler have to do something more complex when just looping through an array type structure? As in, with 0-indexing it's taking the start mem addr and adding zero, whereas with 1-indexing you'd have to dec the mem addr by one to make it consistent wouldn't you?
14:31:11BlaXpiritpls
14:31:28EXetoCdom96: no
14:31:36BlaXpiritnobody said 1-indexing is good, don't start this
14:31:57dom96BlaXpirit: oh good.
14:34:00bluenotedoesn't Nim have a "indices" template anyways?
14:34:08bluenotefor i in whatever.indices:
14:34:18BlaXpiritdoes it?
14:34:24bluenotejust avoid writing ranges in general...
14:34:26BlaXpiriti really really doubt it
14:34:44bluenoteI though I have seen it, or maybe I have written it myself?
14:34:53*milosn quit (Ping timeout: 256 seconds)
14:34:54bluenotebut at least I never write ranges manually
14:35:12coffeepoti must say i tend to just do "for idx, item in list:"
14:37:40*TEttinger joined #nim
14:41:20BlaXpiritdamn i'm stupid
14:44:04coffeepotBlaXpirit: why?
14:44:30BlaXpiritforgot that no regex at compile time, even though regex implementation was one of the main topics on my mind recently
14:44:49coffeepot:)
14:44:57*EXetoC quit (Quit: WeeChat 1.1.1)
14:45:46Arrrrrthis kind of discussion a the lesser evil. If nim gets popular, most will simply complain and talk shit about things they dont like. So one should ask if, when someone complains here about a thing, is because he is new or he has a point. If 80% of future users complain about a detail, who is right then.
14:47:00coffeepoti think this kind of thing is just personal preference
14:47:46fowlArrrrr, everybody thinks their slice of time is representative of some larger collective mindset
14:48:10coffeepotlike the request to have colons after if predicates, which to the testament of nim, was able to be introduced as an optional switch
14:48:15fowl'if you change these things then language X will be on board!'
14:48:42novistwhen i started to think i realized indeed most of </-1 can be avoided. but it requires changing of thinking
14:49:14novistso maybe instead next to tutorials there should be a page indicating "the old way" vs "the nim way"
14:49:27novistso new people know how to do it right
14:49:41coffeepotto me, zero indexing IS the old way - and kinda seems odd to have 1 indexed :D
14:50:10BlaXpiritwat
14:50:13novistwell what i meant is loops, iterating, string slicing (although i still think ^2 is weird, both ^ and 2)
14:51:10novisti mean examples like bad: for i in 0.. <s.len and good: for i in 0..high(s)
14:51:18coffeepotnovist what's your previous language experience out of interest?
14:51:30BlaXpiritnovist, no, that's still bad
14:51:34BlaXpiritin many cases
14:51:58novistc++/c#/php/js/python in that order
14:52:05novistwhy is it bad BlaXpirit?
14:52:16BlaXpiritif something is not 0-indexed
14:52:35renesac[11:00:08] <Araq> in C you write '<', in Nim you write '.. <'. get over it. <-- they are not the same thing
14:52:41novistoh right, low(s) i see
14:52:48renesacit has been shown in the slicing issue
14:52:53novisti guess my mistake just illustrates the need
14:53:05*bcinman joined #nim
14:53:19renesacand in the for issue (I reopened my issue was re-opened)
14:53:19BlaXpiritmany would not consider it a mistake
14:53:23fowlrenesac, slicing behavior was anomalous its way different than iteration
14:53:44BlaXpiritnovist, i'm just hoping for generic sequence operations instead of openarray
14:53:44fowl0.. -1 will not iterate at all
14:54:08renesachttps://github.com/Araq/Nim/issues/1008 <-- this is still a bug
14:54:40renesacinclusive upper bounds can be paid in performance or safety
14:54:47renesacaraq choses to pay in safety
14:55:08renesacand an extra gotcha of course
14:55:16novistbtw was there any effort to make ..-1 (without space) work?
14:55:26BlaXpirit"effort"
14:55:29novistor at leas talking about that
14:55:30BlaXpiritwell no
14:55:43BlaXpiritbut there sure was talking about ..<
14:55:52coffeepotI am confused, aren't C++, c#, python, js 0 indexed anyway? Not sure about php
14:56:06novistthere could be ..- too, even if its bit hackish fix
14:56:19novistcoffeepot: yes they are
14:56:41renesaccoffeepot: and fortran, lua, julia, matlab, etc are 1 indexed, but it don't matter
14:57:21renesacthe problem is that we don't know any language, besides nim, that is 0 indexed with inclusive upper-bounds
14:57:32coffeepotsure, but novist mentioned being used to 1-indexing so I assumed coming from one of the sci languages you listed renesac
14:57:50coffeepotahhhh i see i think i understand now
14:57:51*xcombelle quit (Ping timeout: 264 seconds)
14:57:53fowlinclusive upper bounds?
14:57:53renesacand we suspect that there is a good reason for such language don't exist
14:58:00novistoh no you misunderstood. 1-indexing i so dont like ;)
14:58:30renesac[low, high] instead of [low, high) (not sure on the notation)
14:58:32BlaXpiritmisunderstandings spread like crazy around here
14:58:47coffeepot*head scratching intensifies*
14:58:55novist*hair fell out*
14:59:03BlaXpiritcoffeepot, nobody suggested 1-based indexing
14:59:32*ChrisMAN joined #nim
14:59:55*mwbrown joined #nim
15:00:12*OnO joined #nim
15:01:06renesacpeople only said that inclusive intervals like nim uses suit 1-based indexing, while 0-based indexing should be combined with half-inclusive intervals
15:01:29BlaXpirit+
15:01:56renesacto avoid performance/safety problems like issue #1008
15:02:06coffeepotwhen you say inclusive intervals do you mean that a for loop would essentially add +1 to the upper bound?
15:02:08renesacfor instance
15:02:28renesaccoffeepot: no, it compares with <=
15:02:33renesacinstead of <
15:02:35BlaXpiritlike currently
15:02:37BlaXpiritadsadfghfgh
15:02:49renesacit is different from adding or subtracting 1
15:02:50BlaXpiritinclusive upper bound <= exclusive upper bound <
15:03:21renesacaway
15:04:49coffeepotblimey now i feel like a dunce - i never even noticed this :D
15:05:31coffeepotfor i in 0..10: echo i -> 11 counts :D
15:07:54TEttingerso, are people just noticing the issues from both-ends-inclusive indexing now? was there much code written in Nimrod before it became Nim?
15:08:24*endragor quit (Ping timeout: 272 seconds)
15:09:15*repax quit (Read error: Connection reset by peer)
15:09:16coffeepotI probably never noticed it because i don't use indexes if I can help it
15:09:43coffeepotofc i've never written anything large in nim :)
15:10:01dom96I've been coding in Nim for 5 years now. It has never been an issue for me.
15:10:34coffeepotmaybe as novist said all that's needed is a note in the docs
15:11:01coffeepotthis is where someone tells me there is a note and I just glided over it ;)
15:11:02novistmore like noobie tutorials
15:11:17novistwith explicit note how its not supposed to be done
15:11:55coffeepotdom96 how did you come across nim?
15:12:01dom96coffeepot: wikipedia
15:12:05federico3inclusiveness seems to be a big concern - maybe a dedicated page on the docs with a lot of examples could help
15:12:10coffeepotthat's ironic :)
15:12:12dom96coffeepot: indeed
15:12:17novisti bet there will be people that define array like array[0..MAX_SIZE, int] and then for i in 0.. <MAX_SIZE:... instead of for i in 0..arr.high()
15:12:30dom96It was linked from the Python page and I was looking for Python-inspired languages.
15:12:41federico3otherwise someone wll end up forking Nim into a non-inclusive one (named "Ni" of course)
15:13:02dom96novist: and they will get an out of bounds error
15:13:15coffeepoti was looking for nim without realising it when i reluctantly learned python (wanted a compiled, clear high level lang)
15:13:21novistdoesnt high() return last index?
15:13:26*xcombelle joined #nim
15:13:48coffeepotspent a good while learning how I could compile python code lol
15:13:50dom96I always use .. <x.len anyway
15:14:01BlaXpiritlame
15:14:05novistwhy arr.high() is wrong? isnt it essentially same?
15:14:13dom96coffeepot: I basically wanted a compiled Python too heh
15:14:15BlaXpiritarr.high is best
15:14:27dom96I never said it was wrong
15:14:27*HakanD quit (Read error: Connection reset by peer)
15:14:38novistso why index oob error?
15:14:53dom96novist: for your earlier example
15:15:42novistdom96: btw if you still want compiled python check out nuitka project if you havent already
15:15:55dom96for arrays it is ideal, but you should use arr.low instead of '0'
15:16:14dom96novist: I'm pretty happy with Nim
15:16:29novistright, well i wrote it with 0-based indexing in mind. people that choose otherwise would know what to write isntead of 0 ;)
15:16:55dom96true
15:17:34*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
15:20:25coffeepotdom96, while you're here: have you considered writing a more in depth tutorial for jester?
15:21:05dom96coffeepot: yeah. First I need to implement some things and release 0.1 finally.
15:21:20coffeepotwhat's on your feature list for it?
15:21:24*mwbrown quit (Read error: Connection reset by peer)
15:21:38dom96caching support
15:21:44dom96is all that's left I think
15:22:18coffeepoti'm not a webdev, but i'd like to learn to use jester as from what i learnt of django, jester seems nicer
15:22:28dom96that's nice to hear :)
15:23:01dom96i'll see what I can do but nowadays I have very little time :\
15:24:16coffeepotknow that feel - i think if i won the lottery i'd be happy to just finally get the time to finish my home projects!
15:24:36emilspcoffeepot, if you dislike django, there's flask, which is as simple as it gets
15:25:02coffeepotthat was next on my learn list but then i found nim and gradually python seemed less and less cool
15:25:23emilspdon't learn a language/framework/library/toolkit/whatever just because it's cool
15:25:58coffeepoti didn't learn it because it was "cool" in a kid way, I learnt it because it seemed "cool" in an expressive, productive, less boilerplate way :)
15:26:14novistbottle is even more lightweight than flask o/
15:26:21coffeepotI didn't get on with dynamic typing tho
15:26:43emilspdynamic typing just means you'll have to 'define' the types when writin documentation
15:27:22coffeepotpart of why i mention a jester tutorial is the real prospect of nim doing very well in the same areas as python. It's as expressive, and has a capable and clean web framework already
15:28:10coffeepotemilsp: that was part of the thing, documenting types but not guaranteeing type safety. It was my first experience of dynamic typing though. I'm sure you adapt after time
15:28:42*saml quit (Ping timeout: 244 seconds)
15:28:43novistone thing that python cant brag about is performance. i bet jester's page vies per second is sky-high compared to python solution
15:29:06emilspif you're worried about typesaftey in anything written in python, you use a linter and it will weed out 50% of the bugs related to that
15:29:48emilspnovist, python is not meant for perf, it's more of a 'first langugae' language
15:30:16*xcombelle quit (Ping timeout: 250 seconds)
15:30:49*pafmaf quit (Quit: This computer has gone to sleep)
15:31:14*pafmaf joined #nim
15:31:42coffeepotemilsp: yes, that's the thing, there's a lot of things you can do to get around the fact there's no strong typing. I say this partly in jest, partly serious. I'm sure you get used to dynamic typing but it feels "wrong" to me as all my language experience has been with typed languages.
15:31:58coffeepotpersonal preference i suppose
15:32:26novistemilsp: i would argue its more "do it fast" language
15:32:33novistfast as in writing code
15:32:46coffeepotalso: nim could be a "first language", there's been times I've literally copied someone's pseudocode over to try out something and it's just compiled!
15:33:01novistah the joys of VM freezing in the middle of debugging session..
15:33:33*saml joined #nim
15:34:03novistah its not a freeze.. its windows dicking up. lovely.
15:38:53*xcombelle joined #nim
15:40:33*HakanD joined #nim
15:46:27novistshould auto-deref work here? https://paste2box.com/qNftXQ#/tPC-KT1ra3q97aJBV1MdsncD7hB3Dse6hhERV3fOcOI/Yfu2fRCz.txt
15:46:33*milosn joined #nim
15:57:09ArrrrrIs not working?
15:57:28*brson joined #nim
15:57:35novistnope
15:57:50novistadding [] to a works
15:58:02novistjust making sure if i should make a bug report
15:58:18Arrrrrfrom inside test proc?
15:59:17novistyes
16:16:56*BitPuffin joined #nim
16:17:55*pregressive joined #nim
16:22:11coffeepothave a good evening all! :)
16:23:22*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:26:22*Tennis quit (Quit: Leaving)
16:28:31*HakanD quit (Quit: Lingo: www.lingoirc.com)
16:29:39BlaXpiritbrain melting
16:30:17BlaXpiritstring templates were easy, but changing stringification to inserting actual nodes/values...
16:30:23*HakanD joined #nim
16:31:12BlaXpiritand by that i mean, for example, dropping 'quotes' from https://gist.github.com/7e4a445f5c64ef658d2d#file-1-nim-L14-L16
16:39:09*pafmaf quit (Quit: This computer has gone to sleep)
16:44:03*OnO joined #nim
16:51:05*EXetoC joined #nim
16:54:08*jfchevrette joined #nim
17:06:25*repax joined #nim
17:06:56*BlaXpirit_ joined #nim
17:09:35*BlaXpirit quit (Ping timeout: 256 seconds)
17:10:48*BlaXpirit_ quit (Client Quit)
17:11:07*BlaXpirit joined #nim
17:11:53*shodan45 joined #nim
17:15:17*pafmaf joined #nim
17:18:53*HakanD_ joined #nim
17:18:53*HakanD quit (Read error: Connection reset by peer)
17:21:07*HakanD_ quit (Client Quit)
17:21:34*HakanD_ joined #nim
17:26:13*HakanD_ quit (Ping timeout: 264 seconds)
17:30:33*HakanD joined #nim
17:40:24*xcombelle quit (Ping timeout: 272 seconds)
17:44:13*gsingh931 joined #nim
17:45:56*gsingh93_ joined #nim
17:50:03*Varriount quit (Read error: Connection reset by peer)
17:50:35*Varriount joined #nim
17:54:11*HakanD quit (Quit: Be back later ...)
17:54:38*HakanD joined #nim
17:59:13*HakanD quit (Ping timeout: 255 seconds)
18:02:23*Varriount quit (Read error: Connection reset by peer)
18:02:58*Varriount joined #nim
18:04:21Arrrrrhttp://i.imgur.com/zQGfUnP.jpg
18:04:38*jfchevrette quit (Quit: Textual IRC Client: www.textualapp.com)
18:09:46dom96Arrrrr: playing GTA 5 for PC?
18:10:29ArrrrrNo, my notebook is so old. I saw it on reddit.
18:18:38squirtle:C i want a bacon sandwhich
18:19:01*gsingh931 quit (Ping timeout: 264 seconds)
18:19:36reactormonkI got a bacon phone :-)
18:22:30*flaviu quit (Remote host closed the connection)
18:29:08*anthony joined #nim
18:29:32*anthony is now known as Guest18935
18:30:35*BlaXpirit_ joined #nim
18:30:44*Guest18935 quit (Max SendQ exceeded)
18:33:39*squirtle is now known as dtscode
18:33:50*HakanD joined #nim
18:36:22renesacsudo make me a sandwich
18:39:30federico3renesac: This incident will be reported.
18:40:24renesacwho does sudo report these "incidents" to?
18:41:34dom96me
18:41:46TEttingerthe ultimate authority, /dev/null
18:41:55renesacdom96: are you santa?
18:41:59renesac:O
18:42:08dom96perhaps
18:44:43ArrrrrCould var/let keyword be optional? You don't have to use them in crystal *runs away*
18:44:59renesacbwt: if anyone knows of a xkcd font with international accented characters let me know [/off-topic]
18:45:09*pafmaf quit (Quit: This computer has gone to sleep)
18:45:22*xcombelle joined #nim
18:46:08TEttingerxkcd font?
18:46:21renesaca font like Randal's handwriting
18:46:28TEttingeroh ok
18:46:48TEttingerI make fonts but nothing handwriting-like
18:47:15renesacwell, I guess if I really wanted I could modify one of the available ones
18:47:20renesacto add accents
18:47:29TEttingerhttp://fontstruct.com/fontstructions/show/820062 is one of mine
18:47:38TEttingerit has accented chars, yes :)
18:48:01TEttingerhttp://fontstruct.com/fontstructions/show/mandrill_2 should have more
18:51:51*vendethiel- joined #nim
18:52:17EXetoCArrrrr: it reduces the readability
18:53:22*irrequietus joined #nim
18:53:33ArrrrrNot if you allow it only if followed by an assignment.
18:53:56*vendethiel quit (Ping timeout: 250 seconds)
18:57:38repaxArrrrr: What does optional var/let mean? That you can introduce variables and constants implicitly?
18:58:05renesacArrrrr: I though you were joking
18:58:17ArrrrrWell, of course i suppose you cant have both.
18:59:20ArrrrrI dont think anyone will take i seriuosly, but i like it.
19:00:08repaxIt's a very bad idea. So many bugs come from misspelt variable names in languages supporting this.
19:01:10pigmejhmm, let's make whole syntax optional;D
19:01:56repaxpigmej: You can option out of using Nim
19:02:49pigmejrepax: that was irony :)
19:03:04repaxpigmej: Yeah, I got it.
19:03:24pigmejthen I don't got it ;/
19:03:25pigmej;d
19:03:50repaxYou're all a bunch of nimrooders ;)
19:06:10*TEttinger quit (Ping timeout: 256 seconds)
19:08:43repaxDoes anyone know if there are any plans for major todos/changes/additions to the language? I'm feeling it is stabilising..
19:13:09repaxWhat would you think of a standardised tag for procs that do memory allocation? That way you could track them - both manual allocations and procs using GC allocations. Suppose you wish to not have any allocations in certain parts of a program..
19:14:18renesacrepax: a pragma to be verified by the nim's effect system?
19:14:36renesaclike the "noSideEffects'?
19:14:36repaxrenesac: Yeah
19:14:43*gsingh931 joined #nim
19:15:05renesacsounds interesting, not high priority though
19:15:06repaxrenesac: Well, perhaps you're ok with other kind of side effects
19:15:40repaxYou just don't want allocations.
19:15:55renesacwell, you can disable the GC for a part of your code, but that takes care just of the deallocation part
19:16:13*bluenote quit (Ping timeout: 246 seconds)
19:16:46repaxI came to think of this after reading the NASA's 10 rules for safety in their code.. An article that surfaced on Reddit the other day..
19:18:03repaxAh, here it is: "Rules for Developing Safety Critical Code" : http://pixelscommander.com/wp-content/uploads/2014/12/P10.pdf
19:18:59repaxRule 3: "Do not use dynamic memory allocation after initialization."
19:20:55renesacyou can fill a feature request on github
19:21:22renesacor better yet, submit a pull request implementing it
19:21:32repaxI could. Just wanted to see if there were opinions.
19:23:29repaxTags is a nice feature. I think they could be used to infer lots of stuff statically from code.
19:25:38*BlaXpirit_ quit (Quit: Quit Konversation)
19:31:34*xcombelle quit (Remote host closed the connection)
19:34:30*dtscode is now known as charmander
19:35:02*Matthias247 joined #nim
19:35:29*charmander is now known as bulbasaur
19:40:23*filcuc joined #nim
19:44:55*filcuc quit (Remote host closed the connection)
19:46:58ArrrrrI have to go, see you nimroders!
19:47:02*Arrrrr quit (Quit: Page closed)
19:47:45*filcuc joined #nim
19:53:31repaxbbl
20:06:29*gsingh93_ quit (Ping timeout: 250 seconds)
20:09:05*gokr_ joined #nim
20:11:02*pafmaf joined #nim
20:13:56*^aurora^_ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
20:15:02*vendethiel- quit (Ping timeout: 265 seconds)
20:20:35*vendethiel joined #nim
20:21:03*HakanD quit (Quit: Be back later ...)
20:21:37*HakanD joined #nim
20:23:18*gsingh931 quit (Quit: WeeChat 1.1.1)
20:23:46*gsingh93 joined #nim
20:26:20*HakanD quit (Ping timeout: 272 seconds)
20:40:24*wb joined #nim
20:44:11*Sembei quit (Ping timeout: 250 seconds)
20:48:32*^aurora^ joined #nim
20:48:46*Demos joined #nim
20:50:26*pafmaf quit (Quit: Verlassend)
20:55:01*gsingh93 quit (Ping timeout: 250 seconds)
20:57:46*Sembei joined #nim
20:59:21*mpthrapp quit (Remote host closed the connection)
21:09:33*BitPuffin quit (Ping timeout: 245 seconds)
21:14:25*bjz joined #nim
21:18:45*filcuc quit (Quit: Konversation terminated!)
21:27:45OnOjust wanted to say I am sorry for being such a b**tch regarding this colon stuff, all I want to understand exactly grammar and hope other do too
21:29:10OnOyeah... now I will crawl back under the stone ;P
21:30:17ggVGcOnO: why do you censor letters within a word? If you think the word is offensive then don't use it, and if not then just write it
21:30:26ggVGcwe all read the word the same anyway
21:30:32ggVGcso you are still putting it in our minds
21:30:48VarriountOnO: Oh? I haven't actually been reading that particular forum thread.
21:30:56VarriountNor the github issue
21:31:12ggVGcas a note I don't find it offensive and don't care what people write, but I think it's silly to censor and at the same time give the whole meaning anyway
21:31:15VarriountggVGc: Let him type how he wants (within reason)
21:31:15ggVGcmakes no sense
21:31:48dom96OnO: Don't worry. I hope that even though your proposal may not be accepted you stick with Nim, and before I forget: Witam :)
21:32:18OnOggVGc: well, as a precaution for being kicked, also knowing the IRC logs gets online :>
21:32:33OnOdom96: Dobry wieczór
21:33:34OnOI think I will, I enjoy playing with and learning new languages (including computer programming ones ;P)
21:33:51OnOand so far I think Nim has such a great potential
21:34:19reactormonkOnO, unless you can make the compiler do the syntax highlight, I'm actually against changing the syntax because it's gonna be a bitch to support in all possible editors and nim-mode hl already has a bugs
21:34:21OnOI was updating my benchmarks with latencies and distribution: https://github.com/nanoant/WebFrameworkBenchmark
21:34:54OnOand Nim is really killer there, I just wonder what would be the result if AsyncHTTPServer will be multi-threaded
21:35:58OnOreactormonk: this is valid argument I accept :)
21:36:21OnOreactormonk: I really missed such arguments, that's why I was bitching do much
21:36:31OnOs/do/so
21:41:25*Varriount is jamming along to videogame music
21:41:39renesacOnO: in the python faq they make the syntax highligh argument too
21:41:42renesac:P
21:42:00*gsingh93 joined #nim
21:42:40OnOrenesac: yeah, by disabling highlight totally in the "less readable" part, pretty funny
21:43:27renesacOnO: actually, they should have disabled syntax highlighting in the python code, but the 'less readable' wasn't python code so they couldn't highlight
21:43:33renesacbut I was refering to the paragraph after that
21:43:41renesacwhere they discuss syntax highlighint
21:43:48renesac*highlighting
21:44:41OnObtw. do you think I should fill a bug about compiler diagnostics, especially described http://forum.nim-lang.org/t/671/7
21:44:58OnOtest.nim(2, 6) Error: ':' expected <-- the location compiler gives is completely wrong
21:45:15AraqOnO: just fix it instead please ;-)
21:45:59Araqafaict the location is 1 line off, which is a very common problem for most compilers
21:46:15Araqand nothing I lose sleep over
21:46:34renesacyeah, to give a more precise error message it would have to consider which keywords were used
21:47:13*Matthias247 quit (Read error: Connection reset by peer)
21:47:24renesacthe compiler gives worse error messages in other places... this isn't that bad...
21:47:49Araq???(???,???) invalid AST :P
21:47:55renesacthough, it seems like it could be improved
21:48:25Araqerror messages always can be improved but you should look at how the devel compiler now reports gc-safety issues
21:49:09AraqIMHO the error reporting got from "unworkable" to "impressive" for that feature
21:49:27Varriount???(???,???) Unknown Error: Executing rm -rf /
21:50:02renesacI haven't saw that, but cheers!
21:50:37gokrWhen I studied like... 20 years ago I recall some modified C compiler that gave hilarious error messages. Lecturing you and basically saying that you are an idiot etc. It was quite fun.
21:51:48Araqlol
21:51:53ggVGcgokr: meet intercal, http://en.wikipedia.org/wiki/INTERCAL
21:53:27AraqOnO: btw the reason why *I* prefer the colons are purely aesthetic. so it's no surprise I cannot convince you ;-)
21:53:46Demosit is quite common though
21:53:53Demoslike most people like them
21:54:02OnOeditor and syntax highlight argument convinces me :>
21:54:08DemosI like them most of the time, except when I am writing "dense" code
21:54:14OnOI am textmate bundle maintainer, so I know that pain
21:56:18reactormonkOnO, if you want you can document your example and put it somewhere
21:57:00OnOnah... I'll work on PR and fix that
21:57:02*HakanD joined #nim
21:59:46OnOhttps://github.com/Araq/Nim/pull/2565
22:00:23OnOnow I'll try to have a look why "expected" token locations are borked
22:02:23*Trustable quit (Remote host closed the connection)
22:04:43*flaviu joined #nim
22:05:14*vendethiel quit (Ping timeout: 256 seconds)
22:06:59*nande joined #nim
22:07:04*pregressive quit ()
22:07:10*vendethiel joined #nim
22:11:16fowlturns out if IDrawable forwards all the functions used by Drawable then IDrawable can be Drawable and it can be captured in another IDrawable :p not sure if this is useful yet
22:15:43*tinAndi joined #nim
22:16:39*gmpreussner|work quit (Read error: Connection reset by peer)
22:19:07Araqfowl: your interface stuff is cool, but I wonder if it shouldn't simply require a 'ref object' you can capture properly
22:20:05Araqit's the nature of this thing to have ref semantics and require boxing, why pretend to support anything elseß
22:20:07Araq?
22:21:07fowlyou mean require the captured obj to be a ref or require the interface to be a ref
22:21:50Araqthe interface to be a ref
22:22:30Araqand to require the caputred obj to be ref, but not so sure about that
22:23:09fowli dont see any reason to force people into that
22:23:18*tinAndi quit (Quit: ChatZilla 0.9.91.1 [Firefox 37.0.1/20150402191859])
22:23:41Araqhrm this spider is quick
22:24:01fowli think its cool that obj as IDrawable or obj as ref IDrawable works :p
22:24:31Araq(but not quick enough)
22:25:15Araqyeah well I dunno. actually I don't even care.
22:26:12Araqsingle inheritance plus composition plus closures are more than I ever need
22:29:20fowlAraq, all of go's cool features are being recreated in nim with macros lol
22:30:23gokrgo fowl go... eh, no, I mean nim fowl nim!
22:31:15BlaXpirit:p
22:31:23gokrBtw, am I guessing correctly that concepts can be used to actually "get rid" of the somewhat special beast openArray?
22:31:39BlaXpiritthat's what i've been preaching about
22:31:47gokrOk, missed that
22:31:54Araqyeah but it's different.
22:32:10AraqopenArray is not generic, it's polymorphic
22:32:20gokrah
22:32:28BlaXpiritmore like duomorphic
22:32:32gokrHehe
22:32:47BlaXpiritit is harmful.
22:32:55BlaXpiritlow high are all u need
22:34:02AraqBlaXpirit: everything is harmful according to you, that word lost its meaning.
22:34:13fowlBlaXpirit, https://gist.github.com/fowlmouth/8cc9ee26bcf509b5fea5
22:35:54BlaXpiritlol
22:44:08*gsingh93 quit (Ping timeout: 245 seconds)
22:44:13OnOokie, I did another PR fixing location of the erroneous parser token: https://github.com/Araq/Nim/pull/2566
22:44:24OnOnow it is high time to get some sleep
22:49:37*irrequietus quit ()
22:49:40OnOgood night
22:49:42*OnO quit (Quit: Textual IRC Client: www.textualapp.com)
23:05:31*BlaXpirit quit (Quit: Quit Konversation)
23:28:37*ChrisMAN quit (Ping timeout: 264 seconds)