<< 30-06-2016 >>

00:01:11*araq0 joined #nim
00:02:25*araq0 quit (Client Quit)
00:05:09*ics quit (Quit: Connection closed for inactivity)
00:14:39*Demos quit (Ping timeout: 260 seconds)
00:28:11*sp33der89 joined #nim
00:28:49*Demos joined #nim
00:32:07*brechtm quit (Remote host closed the connection)
00:35:29*mcc joined #nim
00:38:59*ftsf_ joined #nim
00:46:34*brson quit (Ping timeout: 240 seconds)
00:49:16kiervktec: the most robust way is probably to write a wrapper function in C that unpacks the struct into some reference parameters
00:49:59vkteckier: So, like, getters and setters?
00:50:10kierbut I think that in most circumstances, a Nim tuple/object will be binary compatible with a C struct (so long as all the element types are binary compatible and are in the same order)
00:50:36kieryou could do individual getters and setters, but that'd probably mean calling the function every time you want to get a single field
00:51:43vkteckier: Okay, so if they're binary compatible, can I just create a tuple with the same attributes/types and use that?
00:52:43kieryeah. I don't guarantee that it'll work, and it's definitely not portable, but it's a hack that ought to work
00:53:18*yglukhov joined #nim
00:53:19kiervktec: this is what i was getting at with the wrapper function: https://gist.github.com/kierdavis/d17b59d78bcbfbd497fc6354a7459f6a
00:55:49vkteckier: Ahh, so that wrapper would translate to Nim as `proc call_and_unpack(a: var cint, b: var cstring, c: var cuint8)` (or something similar)
00:57:06kieryeah something along those lines
00:57:26kier(disclaimer: I haven't tested any of this)
00:57:40*yglukhov quit (Ping timeout: 258 seconds)
01:07:13*Demos quit (Ping timeout: 244 seconds)
01:15:21*desophos_ joined #nim
01:20:22*desophos_ quit (Ping timeout: 272 seconds)
01:38:52*chemist69 quit (Ping timeout: 264 seconds)
01:47:09*sp33der89 quit (Ping timeout: 246 seconds)
01:48:26*zodiak_ joined #nim
01:48:34*zodiak quit (Read error: Connection reset by peer)
01:52:09*chemist69 joined #nim
01:54:06*Demos joined #nim
02:13:29*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:29:51*hendi_ joined #nim
02:33:30*hendi quit (Ping timeout: 258 seconds)
02:49:04*Demon_Fox joined #nim
02:49:12*Demos quit (Read error: Connection reset by peer)
02:49:18*bjz joined #nim
02:58:23*Jesin quit (Quit: Leaving)
02:58:58*dmitry_p joined #nim
03:02:31*chrisheller quit (Ping timeout: 252 seconds)
03:05:47*bjz quit (Read error: Connection reset by peer)
03:06:00*chrisheller joined #nim
03:15:22*Jesin joined #nim
03:19:18*arnetheduck quit (Remote host closed the connection)
03:24:03*arnetheduck joined #nim
03:26:21*arnetheduck quit (Remote host closed the connection)
03:27:17*fredrik92 quit (Quit: Shutting down...)
03:28:14*arnetheduck joined #nim
03:32:36ftsf_what's the difference between static binding and dynamic binding?
03:32:41ftsf_proc vs method
03:42:46*yglukhov joined #nim
03:47:03*yglukhov quit (Ping timeout: 244 seconds)
03:50:38*fvs joined #nim
03:53:06fvshowto test for IndexError if {.push checks:off, line_dir:off, stack_trace:off.} is used as in pure stats module?
03:56:51*GangstaCat quit (Quit: Leaving)
03:56:51fvstrying to implement median proc that should fail for @[]
03:59:39*kssreeram joined #nim
04:03:37*fvs quit (Ping timeout: 250 seconds)
04:21:27*chrisheller quit (Remote host closed the connection)
04:23:33*kssreeram quit (Ping timeout: 250 seconds)
04:26:52*kssreeram joined #nim
04:30:31*dmitry_p quit (Quit: Leaving)
04:32:49*brechtm joined #nim
04:33:23*ics joined #nim
04:37:10*brechtm quit (Ping timeout: 244 seconds)
04:38:13*kssreeram quit (Read error: No route to host)
05:01:35*endragor joined #nim
05:14:49*s4 joined #nim
05:39:23*yglukhov joined #nim
05:44:28*yglukhov quit (Ping timeout: 272 seconds)
05:56:04*chrisheller joined #nim
06:00:43*chrisheller quit (Ping timeout: 252 seconds)
06:16:03*endragor_ joined #nim
06:18:46*endragor quit (Ping timeout: 244 seconds)
06:22:46*brechtm joined #nim
06:30:18*endragor_ quit (Remote host closed the connection)
06:30:24chemist69fvs: can't you just test for len == 0 ?
06:30:48*endragor joined #nim
06:42:52*desophos_ joined #nim
06:46:51*desophos_ quit (Ping timeout: 240 seconds)
06:58:05hendi_PMunch: cool, thanks!
07:00:21*irrequietus joined #nim
07:14:32*PMunch joined #nim
07:17:21*irrequietus quit ()
07:24:48*yglukhov joined #nim
07:36:15*desophos_ joined #nim
07:39:20*bjz joined #nim
07:40:35*desophos_ quit (Ping timeout: 244 seconds)
07:44:55*Trustable joined #nim
07:49:28*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:50:27*bjz joined #nim
07:50:29*bjz quit (Client Quit)
07:51:42dyce_dom96: is it fine there is a warning when defining a table before the jester directives?
07:51:49dyce_warning about the GC
08:01:52*kssreeram joined #nim
08:03:59*ftsf_ quit (Remote host closed the connection)
08:09:18chemist69PMunch: concerning yesterday's converter issue with countup(): if you write an iterator that only can use ints, the converter works: https://glot.io/snippets/eg3q4920f2
08:09:37PMunchYeah I saw you posted that on your issue
08:10:26PMunchhttp://pastebin.com/y8y2z9A8
08:10:44PMunchThat's my snippet from yesterday. The part that was failing is line 14
08:11:00*coffeepot joined #nim
08:11:08*Arrrr joined #nim
08:11:29PMunchSo it seems that T is not IntLikeForCount which it would be with only ints (if I'm not mistaken)
08:14:04PMunchMy guess is that since countupn takes generics it messes up the conversion
08:14:31chemist69if you import typetraits and insert echo(res.type.name) before the inc (and comment out inc) then the type of res is still float64
08:14:44chemist69I guess you're right.
08:14:52PMunchYeah
08:15:50PMunchProblem is that at the point were it's being passed into inc it is converted to an int
08:16:00PMunchThis int is not a var and thus you get the error
08:16:47chemist69yes, so if the iterator would use x = x + 1, then it should work?
08:16:48*desophos quit (Read error: Connection reset by peer)
08:17:12PMunchWell, maybe
08:17:23PMunchBut I don't think it would be converted to int at all then
08:17:37chemist69you're right again
08:18:09chemist69could one write a converter floatToIntlike ?
08:18:34PMunchProbably, but I don't think it would get called
08:18:51PMunchThe problem is that the code has a valid path for floats, so the converter is never called
08:19:01PMunchUntil it's too late
08:19:17chemist69well, okay, then I'll settle for using converters with simple types.
08:20:08PMunchAh well, IntLikeForCount is defined as: type IntLikeForCount = int|int8|int16|int32|char|bool|uint8|uint16|enum
08:20:22PMunchSo you already have a converter for it
08:20:52chemist69except for the float, which was the starting point...
08:22:57PMunchHmm
08:23:13PMunchIn my example http://pastebin.com/raw/y8y2z9A8
08:23:35PMunchIf you change the types for the variables T and S your code works
08:23:50PMunchThis is simply because it returns a type of the same kind as the second argument
08:24:53PMunchBy swapping them you return a type of the same kind as the first, which is int. This also means that "var res: T = T(a)" will convert your float to an int
08:25:28PMunchActually since it does it explicitly it doesn't even need the converter
08:26:25chemist69yeah, I get the feeling, that this was a really bad example for using a converter, so maybe we should move on...
08:26:46*mcc quit (Quit: Connection closed for inactivity)
08:30:29chemist69gotta go do some labwork. bbl
08:31:42PMunchTBH I'm not sure why it does the type checking in the first place
08:32:41PMunchhttp://pastebin.com/0FmXz5Vh
08:32:57PMunchThat function works for any types that takes something convertible to an int
08:33:25PMunchThat function works for any type that is convertible to an int*
08:34:01*rolha joined #nim
08:41:49*kssreeram quit (Ping timeout: 250 seconds)
08:50:40*arnetheduck quit (Ping timeout: 252 seconds)
08:52:38vktecIs it possible to have a Nim variable that is a C pointer, so that complex C structs, etc can be passed around easily?
08:52:57vktec(I don't need to read information from the struct in Nim)
08:53:53PMunchptr cchar?
08:55:20vktecPMunch: Would that work with something other than a cchar though?
08:55:28yglukhovvktec: every ptr is a c pointer. there's also type `pointer` which is void*
08:56:07vktecyglukhov: Okay, so how would I represent a pointer to a C struct in Nim?
08:56:40EastBytevar p: pointer = addr struct
08:56:50yglukhovthere are several ways.
08:57:14PMunchvktec, C isn't so concerned about what is actually pointed to by a pointer. It's more of a hint to the compiler that allows it to check if your assignments and such makes sense.
08:57:34yglukhovif you have a nim type that represents your struct (e.g. MyCStructure). then your pointer type is "type MyCStructurePtr = ptr MyCStructure"
08:57:46PMunchFor example you won't be able to access a member of a struct through a char* since the compiler have no idea what offset the member is at.
08:58:18vktecPMunch: Okay, that makes things much easier
08:58:21vktec:)
08:58:31yglukhovalso note, that you can get away with only your value type without ptr type, if you annotate function args properly
08:58:47PMunchBut you should still go with yglukhov's way of doing it
08:58:52vktecOkay
08:59:03PMunchYou could do some weird pointer arithmetic manually but it's not advisable :P
08:59:05yglukhove.g. if you define proc myCFunctionThatAcceptsPointerToMyStruct(mystruct: var MyStruct) {.importc.}
08:59:27vktecOkay, thanks yglukhov, PMunch
08:59:59yglukhovif your c function accepts a pointer, but doesnt modify the struct it points to, you can use `byref` arg annotation
09:00:45*LeNsTR|away joined #nim
09:00:47yglukhovif your struct is an opaque type, then you just define type MyStructRef = distinct pointer
09:01:39yglukhovas you can see, there's a lot of ways depending on your needs, so that you can bind to C with a nice nimish api, paying no runtime cost
09:01:51vktecyglukhov: I'm getting "illegal recursion" when using `type MyCStructure = ptr MyCStructure`
09:02:01*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
09:02:14vktecyglukhov: What do you mean by "opaque type"?
09:02:42vktec(Disclaimer: I'm by no means good at C)
09:02:56*cjh`_ joined #nim
09:03:12yglukhov "illegal recursion" - because you have to define to types with different names. one is actual value type struct. the other is ptr to it
09:03:17*allan0_ joined #nim
09:03:19yglukhov* two
09:04:04yglukhov"opaque type" - is a type that you don't have_acces_to/care_about_its members.
09:04:09*devn_ joined #nim
09:04:16vktecOkay
09:04:37yglukhovlike some references, handles, etc. which are created by some public api, and work only with those
09:05:20vktecI don't need to access the C struct's members from Nim. Would `distinct pointer` work?
09:05:33yglukhovyes
09:05:41vktecOkay
09:05:49vktecIs that the best/easiest solution?
09:06:14yglukhovthat depends =)
09:06:45vktec:)
09:06:53vktecI'll give it a go and see what happens
09:06:57*PMunch quit (Ping timeout: 250 seconds)
09:07:38*sarlalian_ joined #nim
09:08:16*lenstr quit (*.net *.split)
09:08:17*gokr quit (*.net *.split)
09:08:17*Amun_Ra quit (*.net *.split)
09:08:17*Satyajit quit (*.net *.split)
09:08:17*dom96 quit (*.net *.split)
09:08:17*sarlalian quit (*.net *.split)
09:08:18*devn quit (*.net *.split)
09:08:18*cjh` quit (*.net *.split)
09:08:18*allan0 quit (*.net *.split)
09:08:18*dyce_ quit (*.net *.split)
09:08:31yglukhovsure. you can show me a gist with c definitions you want to bind to, maybe ill give you better hints
09:09:30*dom96 joined #nim
09:10:03vktecOkay, 1 sec
09:10:32*PMunch joined #nim
09:12:18vktecHere's the typedef: http://0bin.net/paste/ugrD1Vj-RuPhIgVO#dmYMuAuycUCiYmGG-yD1pEhj4wBzj/N76SB7ZwueLWQ
09:12:42*TheLemonMan joined #nim
09:15:24*rolha quit (Ping timeout: 260 seconds)
09:16:55*dyce_ joined #nim
09:16:56*Amun_Ra joined #nim
09:17:26yglukhovvktec: errr... some function headers please? =)
09:17:54vktecI'll link you the header file :)
09:18:07yglukhovkk
09:18:10*LeNsTR|away is now known as lenstr
09:18:11*lenstr quit (Changing host)
09:18:11*lenstr joined #nim
09:18:25vktechttps://github.com/mruby/mruby/blob/master/include/mruby.h
09:19:37yglukhovok, so these structs look a lot like opaque. even though you can see their internals, you never have to access them. correct?
09:19:55*gokr joined #nim
09:20:40PMunchHmm, any particular reason why custom converters don't get applied when called eg. int(variable)
09:21:02yglukhovso yeah, you can go with distinct pointer solution for the start. just don't bind functions by referring to c headers, because you'll have a c ompile error of type mismatch.
09:21:24vktecyglukhov: Okay
09:22:12vktecWhat's the recommended way to link my Nim program to mruby's static library?
09:22:42yglukhovwith distinct pointer you will be able to get up and running pretty quickly, and further on, if you will need to do full-blown struct definitions (to access members from nim), you will be able to do it gradually in a backward compatible manner
09:23:01vktecyglukhov: Sounds good, thanks
09:23:24yglukhovdunno... how bout {.passL:"-lmruby".}. kinda hammerish way, but should be ok for start
09:24:32vktecI'll try that, thanks
09:24:36PMunchgithub.com/fowlmouth/mruby.nim
09:24:38yglukhovanytime ;)
09:24:41PMunchThat might be helpful
09:25:07*Demon_Fox quit (Quit: Leaving)
09:25:07yglukhovwow, why thats not on nimble
09:25:08vktecOh.
09:25:18vktecHow did I not find that 0_o
09:25:18PMunchfowl, what's the status of that ^
09:25:27vktecCould've sworn I looked...
09:25:39PMunchI literally found it by searching for "mruby nim"
09:25:42fowlnot good
09:25:53PMunchFound some IRC log were fowl mentioned it and went to his GitHub page :P
09:26:07PMunchfowl, how so? Not working at all?
09:26:26vktecPMunch: Huh.
09:26:37yglukhovvktec: ok, new plan. get fowls bindings up, and submit them to nimble =)
09:26:49vktec:)
09:26:51fowlIIRC its full of macros and ifdefs that change structures, it was a PITA
09:27:03chemist69PMunch: maybe you should submit a pull request for your countup function ;)
09:27:03*pafmaf joined #nim
09:28:37*Satyajit joined #nim
09:29:21vktecfowl's bindings look a) _way_ too complex for me (I've literally never written a binding before) and b) a bit OTT for what I need to do
09:30:52PMunchchemist69, I added the code to the issue. I'm happy to create a PR if no further changes are proposed.
09:30:55PMunchgithub.com/nim-lang/Nim/issues/4431
09:31:37PMunchBut honestly, why aren't custom converters counted in T(variable) statements (any type, int(variable) doesn't call them either)
09:32:15PMunchThe snippet is pretty ugly since it has to define the variables with a type so that implicit conversion will take place and call the custom converters.
09:46:22yglukhovfowl: btw, what do you think about nake issues? =)
09:47:37fowlyglukhov, i didnt know there were new issues sry
09:48:19yglukhovfowl can you take a look at them pls?
09:49:10fowlyglukhov, your feature request sounds fine and gradha was the guy who cared about releases, but i added you as a collaborator just now so you can make a new release if you want
09:50:28yglukhovoh ok cool, thanks.
09:51:05yglukhovi will then add the recursive lookup and do a new release
09:52:36fowlthanks i dont have a lot of time for programming these days
09:56:08*chrisheller joined #nim
09:56:14*vegansk quit (Ping timeout: 260 seconds)
10:00:31*chrisheller quit (Ping timeout: 252 seconds)
10:09:40*PMunch quit (Ping timeout: 258 seconds)
10:15:36*PMunch joined #nim
10:20:42*Arrrr_ joined #nim
10:23:28*Arrrr quit (Ping timeout: 258 seconds)
10:24:07*abruanese joined #nim
10:30:05*coffeepot joined #nim
10:39:51*Arrrr_ quit (Quit: WeeChat 1.4)
10:40:06*Arrrr joined #nim
10:42:19*Satyajit quit (Ping timeout: 252 seconds)
10:44:03*kier quit (Ping timeout: 246 seconds)
10:45:51*kier joined #nim
10:55:15*Satyajit joined #nim
10:59:05*KaiXBerg joined #nim
11:01:31*nsf quit (Quit: WeeChat 1.5)
11:09:43*fastrom1 quit (Quit: Leaving.)
11:13:24*ozra joined #nim
11:32:21*vegansk joined #nim
11:49:15*brechtm quit (Remote host closed the connection)
11:59:09*fowl left #nim ("Leaving")
12:08:00PMunchHmm, I just realised why I prefer bracketed languages for large projects. It's a lot easier to see the end of large scopes. Many lines of decreasing indentation with a single bracket per line really makes the end of scopes evident. Nim for example can end a huge function in one line, making it hard to distinguish between it and the following code..
12:09:15*rolha joined #nim
12:10:36coffeepotPMunch, this is where IDE tools come in. I use VSCode when working in Nim, which draws dotted lines to mark indent blocks which for me, is equivalent to bracket closes with the exception that bracket close indentations are not guaranteed to be inlined correctly
12:13:37PMunchDotted lines?
12:14:24coffeepotyeah at the tab points. Actually you can also use this https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow
12:14:34coffeepotis this the sorta thing that'd help?
12:15:24coffeepotofc this assumes windows :)
12:16:04PMunchLinux here, but dotted tab points are available in mostly any IDE
12:16:15PMunchThe rainbow thing could be handy though
12:16:50PMunchIt's not that I have a problem with indented lines
12:16:54PMunchBut rather how they end
12:17:22PMunchEnding a scope with a large indentation in a single line to be specific
12:21:22*fredrik92 joined #nim
12:22:38coffeepotah yeah, definitely helps to have some kind of ide helper for that if available
12:23:43coffeepoton the other side, I'm working on some C code atm that uses varying indents and even though the IDE highlights matching braces, it can get a bit confusing
12:24:52coffeepotbut tbf I've not worked on any large nim projects!
12:26:00dom96PMunch: Maybe adding empty lines to help you notice the change in scope would help?
12:26:05PMunchYeah, varying indents are worse :P
12:26:19PMunchdom96, yeah. I've thought about doing that
12:26:30dom96That's pretty much what I consider clean code to be.
12:26:52dom96If everything is in the same long block with no empty line separation then it becomes much easier to read.
12:26:59PMunchI think it's the Python style guide (or the JavaScript one, can't remember) that specifies the use of two newlines for end of functions
12:28:47PMunchIt makes it pretty simple to see where a function ends
12:28:53PMunchAt least simpler
12:29:20PMunchBut I think there's a difference between published code and code in development
12:29:40*brechtm joined #nim
12:31:26PMunchFor example while writing code I might add in an experimental if test or remove one. In a language using brackets this is as simple as removing or a line at the top and/or bottom. In indented languages it means indenting the entire block just to remove the indent after you're done testing.
12:32:39PMunchGood editors obviously have support for indentation changes but it's still cumbersome
12:44:48*chemist69 quit (Quit: WeeChat 1.5)
12:47:29*chemist69 joined #nim
12:47:35*ddl_smurf joined #nim
13:00:10*KaiXBerg quit (Quit: Page closed)
13:00:31*KaiXBerg joined #nim
13:05:59ftsfhow would I delete an item from a seq while iterating over it?
13:07:20PMunchHmm, theoretically you could remove it and decrease your iteration variable by one (so that the next iteration will use the same value and therefore check the new element in this place)
13:07:32PMunchNot 100% sure if that works properly though, but it should..
13:07:39ftsfPMunch, I get Error: unhandled exception: len(a) == L seq modified while iterating over it [AssertionError]
13:07:55ftsfI'm just curious how one generally works around that?
13:07:55PMunchAaah, no that's not allowed then..
13:08:07*saml joined #nim
13:08:13PMunchYou could either create a list of elements to delete and separate it into two loops
13:08:21fredrik92Generally, Iteration should imply immutability
13:08:25ftsfI can mark stuff to be deleted later, but then I have to iterate to check that mark?
13:08:39PMunchOr create a list of elements to keep which you update and then set the reference to the new list..
13:08:47ftsfPMunch, hmm that could work
13:08:59ftsfseems suboptimal for memory though
13:09:45PMunchWell, removing stuff from the middle of a contiguous piece of memory is suboptimal
13:09:59PMunchseqs are implemented as realloced arrays
13:10:07ftsfahh
13:10:12ftsfI guess what I want is a linked list
13:10:13PMunchSo not sure how happy they are about shrinking..
13:10:20PMunchThat is an option
13:10:39*nsf joined #nim
13:10:46ftsfsince this container will be containing particles which will be dying regularly
13:10:57ftsfor i could use a fixed array and find dead ones to replace perhaps
13:11:12PMunchDepends a bit on how you want to do it
13:11:35ftsfI'll try the fixed array method
13:11:46PMunchIf you want to have a max cap on particles you could keep a fixed array and look for dead particles whenever you want to add one
13:11:53ftsfyep, i'll do that =)
13:11:55PMunchThat means scanning the array though which might not be optimal
13:11:56ftsfthanks
13:12:05ftsftrue
13:12:26PMunchYou could create a linked list of bitmasks
13:12:27ftsfhmm, I guess linked list might be best as there will be a lot of adding and removing elements
13:13:13PMunchThen check if the bitmask is not zero (implying that there is space), then calculating the position into a fixed array and add your particle there
13:13:36ftsfhmm that seems complex =)
13:13:56ftsfI'll try the fixed thing, if it's a problem i'll switch to a linked list
13:14:18fredrik92Yes, genrerally arrays (and realloc'ed arrays) are optimal for appending and removing at the end, Linked lists are easiest when doing inserts and deleted in the middle of the list...
13:14:35PMunchThat would mean 1 link reference for every 32/62 elements, a single == check for every 32/64 elements to check if any of them is filled, and a little arithmetic to find the empty position
13:15:04PMunchThen of course a bitwise operation for marking and unmarking that a particle is dead/alive
13:15:29fredrik92PMunch, done this before, have you? :P
13:15:59PMunchHaha, yeah. Was part of my Green Computing implementation :)
13:16:46fredrik92Btw, Linked lists cam potentially also simplify parallelism issues...
13:16:48PMunchThat level of obsessive detail work is probably not healthy for a human brain :P
13:17:22fredrik92yeah, I notice that with myself... Kinda get worried from time to time :P
13:18:31PMunchThe bitmask thing actually isn't too bad when it comes to parallelism for things like this
13:19:06PMunchA single atomic bit operation to mark a spot as occupied or not
13:19:49fredrik92PMunch, you should check this one out: https://vimeo.com/172009499 (What tricks can you make when building a fast web server) :P
13:19:54PMunchOh and I guess you won't even have to use a linked list for storing the bitmasks if the size of the particle pool is static :)
13:20:46PMunchfredrik92, care to send it on Telegram so I can check it out when I get off work?
13:21:15fredrik92done
13:21:31ftsfis it possible to get an iterator that returns a mutable object?
13:21:54fredrik92I guess you'd have to implement that one yourself...?
13:22:43chemist69ftsf are you aware of <array>.mitems ?
13:23:54ftsfchemist69, i wasn't
13:24:13ftsfthat sounds much more useful
13:24:16*rolha quit (Ping timeout: 272 seconds)
13:25:02chemist69it's a hidden gem (not in the ruby sense)...
13:26:02ftsfcan be quite hard to find some stuff in the nim docs unless you know what to look for
13:26:50chemist69I agree.
13:27:04ftsfi noticed the "method" keyword doesn't seem to be in the manual
13:27:15*s4 quit (Quit: Konversation terminated!)
13:29:36ftsfI guess it does say it's a draft =)
13:30:17PMunchHmm, maybe I should write a little library for efficient pools of this kind..
13:31:40PMunchOptimized for this kind of random insert/removal with a cap on elements
13:31:52ftsfperhaps, if you don't have better things to do =)
13:32:08PMunchWell, define better things :P
13:33:07coffeepotI wonder if there's a reason why mitems isn't automatically used when a variable is modified, considering this http://nim-lang.org/docs/manual.html#overloading-resolution-overloading-based-on-var-t
13:33:32coffeepotand considering pairs is used automatically in iterators if you use two variables
13:35:14*Kaini quit (Remote host closed the connection)
13:36:49*Kaini joined #nim
13:44:25*brechtm quit (Remote host closed the connection)
13:49:09*stisa joined #nim
13:49:11chemist69yes, and D uses the syntax "for var i in array" to allow modification of the array elements, which I quite liked. It's analogously to the var arg procedure call.
13:50:24*brechtm joined #nim
13:53:14*stisa quit (Client Quit)
13:57:53*desophos joined #nim
14:07:17*gokr quit (Ping timeout: 260 seconds)
14:11:26*gokr joined #nim
14:15:11*PMunch quit (Ping timeout: 240 seconds)
14:22:25*endragor_ joined #nim
14:25:55*freezerburnV joined #nim
14:26:04*endragor quit (Ping timeout: 240 seconds)
14:26:53*endragor_ quit (Ping timeout: 258 seconds)
14:30:11*freezerburnV quit (Ping timeout: 240 seconds)
14:48:10*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:50:29*coffeepot joined #nim
14:53:25*pregressive joined #nim
14:54:21*pafmaf quit (Ping timeout: 276 seconds)
15:15:32*kssreeram joined #nim
15:21:11*kssreeram quit (Ping timeout: 240 seconds)
15:24:02*michael_campbell joined #nim
15:26:20*elrood joined #nim
15:28:30Araqhey guys, what's up?
15:29:45cheatfateAre you already in Poland?
15:30:04Araqyup
15:31:20cheatfateAnd hows first day of conference?
15:31:41*j3rn is now known as J3RN
15:31:41*ozra left #nim ("Konversation terminated!")
15:32:11Araqpretty nice, interesting talks and people
15:33:02*fvs joined #nim
15:35:26cheatfateAnd hows your speech? 30min was enough?
15:35:59samlwhat's conference
15:36:20AraqPolyConf 2016
15:36:30Araqcheatfate: my talk will be tomorrow
15:36:39Araq30 minutes are definitely enough
15:37:19cheatfateAraq, and when you return do you start `brand new and shiny` async core?
15:37:53Araqdunno. I thought you now know everything too.
15:39:44cheatfateI'm still not very strong in macros
15:41:08*chrisheller joined #nim
15:41:08Araqbbl
15:41:29cheatfateand i'm still not sure `switch context` will be faster, than what we have now...
15:42:26avsejdom96, where I can find how $lib substituted in nim.cfg? is it set during compile time somehow?
15:47:30fvsi have a proc that runs an sql query to copy a table to csv. No rows are returned in this qry. How do I wait for the csv to be written before returning from the proc? I plan to compress it and send it back to web client.
15:54:29*minus joined #nim
15:56:21minushey, the redis clients page lists a nim binding/client, but that just 404s (http://redis.io/clients#nim). i'm assuming that's been removed and i should just use hiredis' C API directly?
16:00:12*yglukhov quit (Ping timeout: 244 seconds)
16:01:54*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:02:10elroodminus, it's been moved from the standard library to https://github.com/nim-lang/redis
16:03:25*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
16:03:37*coffeepot joined #nim
16:06:20minuselrood: does it have docs on the official page or some page on its own as well?
16:10:31minusseems like no
16:13:59*kssreeram joined #nim
16:14:30elroodminus, no clue, sorry, doesn't seem so though. all i have about it is a git commit with its removal and new location
16:15:13michael_campbell(chuckle) Just realized there's a user here named "so", which is why my IRC client syntax-highlights that word.
16:15:27minusno problem. thanks for the info, i submitted a PR with the updated docs to redis
16:15:27*GangstaCat joined #nim
16:23:42*kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…)
16:26:28*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:27:38*coffeepot joined #nim
16:29:40*pafmaf joined #nim
16:30:07*kssreeram joined #nim
16:31:04*brson joined #nim
16:32:13*coffeepot quit (Client Quit)
16:38:03*BitPuffin joined #nim
16:42:55*rolha joined #nim
16:54:05*yglukhov joined #nim
16:59:34*yglukhov quit (Remote host closed the connection)
17:14:04*Arrrr quit (Quit: WeeChat 1.4)
17:19:00*yglukhov joined #nim
17:23:43*benwboot_ joined #nim
17:26:27*benwbooth quit (Ping timeout: 244 seconds)
17:30:26*yglukhov quit (Remote host closed the connection)
17:44:22*benwbooth joined #nim
17:45:03*yglukhov joined #nim
17:46:59*benwboot_ quit (Ping timeout: 260 seconds)
17:50:59*kssreeram quit (Quit: Textual IRC Client: www.textualapp.com)
17:51:44*kssreeram joined #nim
18:08:18*xet7_ quit (Read error: Connection reset by peer)
18:15:50*yglukhov quit (Remote host closed the connection)
18:21:10*rolha quit (Ping timeout: 250 seconds)
18:26:19*Jesin quit (Quit: Leaving)
18:40:50*irrequietus joined #nim
18:42:51*yglukhov joined #nim
18:47:53*irrequietus quit ()
19:00:08*vendethiel joined #nim
19:03:40*aziz joined #nim
19:09:00*TheLemonMan joined #nim
19:26:57*BitPuffin quit (Read error: Connection reset by peer)
19:38:31*stisa joined #nim
19:51:41*shodan45 joined #nim
19:58:00*Matthias247 joined #nim
20:02:57*fastrom joined #nim
20:11:14*stisa quit (Quit: Page closed)
20:37:37*pregressive quit (Remote host closed the connection)
20:46:11*GangstaCat quit (Quit: Leaving)
21:13:14*brechtm_ joined #nim
21:15:49*brechtm quit (Ping timeout: 260 seconds)
21:19:45*pafmaf quit (Quit: Leaving)
21:28:42*shodan45 quit (Remote host closed the connection)
21:30:10*OnO_ joined #nim
21:30:41*OnO quit (Ping timeout: 240 seconds)
21:42:38*benwboot_ joined #nim
21:44:00*allan0 joined #nim
21:44:19*KaiXBerg quit (Quit: Page closed)
21:44:54*fastrom1 joined #nim
21:45:11*benwbooth quit (Ping timeout: 240 seconds)
21:45:24*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
21:45:37*brechtm_ quit (*.net *.split)
21:45:37*vegansk quit (*.net *.split)
21:45:37*allan0_ quit (*.net *.split)
21:45:38*beatmox quit (*.net *.split)
21:45:38*pandada8 quit (*.net *.split)
21:45:38*regtools quit (*.net *.split)
21:45:38*cncl quit (*.net *.split)
21:48:28*fastrom quit (Ping timeout: 264 seconds)
21:57:35*Jesin joined #nim
22:05:10*Jesin quit (Quit: Leaving)
22:16:17*elrood quit (Quit: Leaving)
22:30:21dyce_is there anything like some_list[-1] to get last element like in python
22:30:27dyce_or do i have to use pop
22:31:49*Demon_Fox joined #nim
22:35:51*arnetheduck joined #nim
22:39:25*chrisheller quit (Remote host closed the connection)
22:48:31*Matthias247 quit (Read error: Connection reset by peer)
22:51:05dyce_also home come this doesnt work "1 2 3".split().pop()
22:51:06*Trustable quit (Remote host closed the connection)
22:57:53*rolha joined #nim
22:58:50*kulelu88 joined #nim
23:06:17*fredrik92 quit (Quit: Shutting down...)
23:09:04*lee_ joined #nim
23:11:58*aziz quit (Quit: Ex-Chat)
23:35:52*rolha quit (Ping timeout: 264 seconds)
23:50:00*wuehlmaus quit (Ping timeout: 272 seconds)
23:55:09*arnetheduck_ joined #nim
23:55:09*arnetheduck quit (Read error: Connection reset by peer)
23:55:22*brson quit (Quit: leaving)
23:56:28*lee_ quit (Remote host closed the connection)
23:56:38*benwbooth joined #nim
23:58:10*benwboot_ quit (Ping timeout: 252 seconds)