<< 05-03-2016 >>

00:01:51*yglukhov_ joined #nim
00:01:51*yglukhov quit (Read error: Connection reset by peer)
00:05:49*yglukhov_ quit (Read error: Connection reset by peer)
00:06:17*yglukhov joined #nim
00:08:31*yglukhov_ joined #nim
00:08:31*yglukhov quit (Read error: Connection reset by peer)
00:10:44*yglukhov_ quit (Read error: Connection reset by peer)
00:18:35*yglukhov joined #nim
00:27:38*Guest19225 quit (Ping timeout: 252 seconds)
00:35:48*jaco60 quit (Ping timeout: 250 seconds)
00:37:11*jaco60 joined #nim
00:50:43*desophos quit ()
00:54:53*mahasamoot joined #nim
00:55:44*arnetheduck joined #nim
01:01:17*jaco60 quit (Ping timeout: 248 seconds)
01:02:12*jaco60 joined #nim
01:02:53*mahasamoot quit (Ping timeout: 244 seconds)
01:03:51*mahasamoot joined #nim
01:05:30*Trustable quit (Remote host closed the connection)
01:11:09*PMunch quit (Ping timeout: 244 seconds)
01:11:51*saml_ joined #nim
01:16:45*desophos joined #nim
01:16:46*jaco60 quit (Ping timeout: 268 seconds)
01:19:03*jaco60 joined #nim
01:27:59VarriountAraq: I've removed the method-usage in my additions to nimsuggest. It uses explicit case statements now.
01:33:09*yglukhov quit (Remote host closed the connection)
01:42:03*mahasamoot quit (Ping timeout: 240 seconds)
01:43:09*jaco60 quit (Ping timeout: 244 seconds)
02:03:37*Matthias247 quit (Read error: Connection reset by peer)
02:04:51*pregressive joined #nim
02:25:31*merowinger joined #nim
02:33:40*yglukhov joined #nim
02:38:01*yglukhov quit (Ping timeout: 240 seconds)
02:39:24*merowinger quit ()
02:58:37*arnetheduck quit (Ping timeout: 248 seconds)
02:59:46*arnetheduck joined #nim
03:00:59*darkf joined #nim
03:25:03*sora quit (Ping timeout: 264 seconds)
03:35:16*yglukhov joined #nim
03:37:27*brson quit (Quit: leaving)
03:39:32*yglukhov quit (Ping timeout: 250 seconds)
03:53:02*mahasamoot joined #nim
03:53:57*mrkishi quit (Ping timeout: 276 seconds)
04:07:52*saml_ quit (Quit: Leaving)
04:25:42*filwit_ quit (Quit: Leaving)
04:37:01*yglukhov joined #nim
04:41:03*yglukhov quit (Ping timeout: 240 seconds)
04:43:08*vendethiel joined #nim
04:44:47*samdoran joined #nim
05:03:49*Demos joined #nim
05:08:42*vendethiel quit (Ping timeout: 276 seconds)
05:12:01*OnwardEuler joined #nim
05:20:15*pregressive quit (Remote host closed the connection)
06:16:13*francisl joined #nim
06:35:43*francisl quit (Quit: francisl)
06:37:36*Kingsquee joined #nim
06:38:22*yglukhov joined #nim
06:41:16*samdoran quit (Ping timeout: 252 seconds)
06:43:36*yglukhov quit (Ping timeout: 276 seconds)
06:44:34DemosI'm reading a thread right now that essentially justifies how nim's module system works
06:53:24VarriountDemos: Link?
06:53:54Demoshttps://github.com/JuliaLang/julia/issues/4600
06:54:06Demosit's long, and indirect
06:54:17Demosbut highlights pretty much every single reason I think nim gets this right
06:57:12VarriountAs far as evaluation logic goes, Nim does pretty much what you would expect (although, like most things, it could do with some advanced error checking)
06:57:44Demosyeah, unfortinately for my current project I need Julia's graphing and data array functionality
06:58:02Demosalso the atom plugin for julia is super awesome
06:58:09Demosbut holy crap the module system sucks
06:59:25VarriountDemos: Care to underline some points?
06:59:46Demosabout what I need or about how Julia's modules suck?
07:02:17VarriountBoth.
07:02:57DemosI need a real RPEL with support for displaying complex data types and graphs
07:03:23Demos(this is not gunna happen in nim till we get a proper VM, seperate from the CTFE VM)
07:03:37Demosand julia's module system has a many-to-many mapping between files and modules
07:04:09Demosmultiple modules per file and one module can contain multiple files via an include statement (just like in nim)
07:04:25Demosyou import a module by saying using Module
07:04:29VarriountDemos: Does Julia have generic modules? (I think that's what they are called)
07:04:40Demosbut using DOES NOT SEARCH THE SAME DIRECTORY AS THE FILE YOU TYPE IT IN
07:04:44DemosI have no idea
07:04:52VarriountWait, what.
07:04:57DemosI know
07:05:01Demosthe documentation implies it does
07:05:04VarriountWhose idea was that?
07:05:04Demosbut it does not
07:05:07DemosI have no idea
07:05:17Demosthe argument is that files and modules have no relation to each other
07:05:31Demoswhich is like..... I mean sure but have you considered that that's a bad idea
07:05:57Demosso the recomendation is to type include("File.jl") using .File
07:06:02Demoson seperate lines
07:06:09VarriountWell, there has to be *some* connection between them, unless you do something like smalltalk
07:06:20Demosbut then guess what. Order of includes can matter!
07:06:41VarriountDemos: And what about circular dependancies? (which are evil, I know)
07:08:18Demosand then for some bizarre reason the import keyword (which works like python's import) DOES search the current directory
07:09:16Demosand then there's importall which seems to do the sane thing (importing all exported names into the enclosing namespace and searching the current directory) but people say not to use it
07:10:45Demoswait no none of them search the current directory
07:11:15Varriount:|
07:12:11Demosand for some reason you can only add methods to types that you can see using "import" or "importall"
07:12:31Demosidk if you can overload functions based only on usings
07:13:37Demosso the recomendation is to just have one big module and include() everything into it. If you want to use one smaller bit of code from within your project I guess you just assume it was included before you or something idk
07:14:21*yglukhov joined #nim
07:14:40VarriountUgh. C-Like include mechanisms are not something that should be standard use.
07:15:06VarriountNot unless you have a nice 'include once' mechanism.
07:15:27Demoseven then... order of includes
07:15:35Demosat least you do the include inside your namespace
07:15:39Demosso they are not transitive
07:15:40Demossorta
07:15:42Demoskinda
07:16:11Demosoh great! so the fact you can't add methods when using "using" is arbritrary, not because of how multimethods are implemented
07:16:35Demosthey just figure you would not want a module B calling a method foo that you define and that happens to be more specific
07:17:07VarriountDemos: So, you definitely prefer using Julia over Nim then?
07:17:42DemosUnfortinately I do really need the RPEL and graphing functionality
07:18:26VarriountDemos: I wonder if Wolfram Alpha/Mathmatica would be of use.
07:18:34VarriountOr GNU Octave
07:19:01Demoswell mathematica is ever stranger than Julia. Same with matlab
07:19:17DemosI really like the type system julia has set up
07:19:21Demosit's just the modules
07:28:50*pregressive joined #nim
07:41:45*pregressive quit (Remote host closed the connection)
07:44:24Demoshttps://github.com/JuliaLang/julia/issues/6190
07:44:41Demosjulia community on why overloading needs to work the way it does in C++/nim
09:02:03*yglukhov quit (Read error: Connection reset by peer)
09:02:37*yglukhov joined #nim
09:04:25*mahasamoot quit (Ping timeout: 240 seconds)
09:23:12*Demos quit (Quit: Leaving)
09:25:48*yglukhov quit (Remote host closed the connection)
09:44:02*gokr joined #nim
09:52:01*sora joined #nim
09:57:54*sora quit (Ping timeout: 246 seconds)
10:17:47*vendethiel joined #nim
10:26:18*yglukhov joined #nim
10:30:59*yglukhov quit (Ping timeout: 248 seconds)
10:38:49*mrkishi joined #nim
11:01:03*Demon_Fox quit (Ping timeout: 240 seconds)
11:02:14*wuehlmaus joined #nim
11:06:18*Sembei quit (Read error: Connection reset by peer)
11:07:24*Sembei joined #nim
11:18:43*Matthias247 joined #nim
11:29:46dom96Demos: Was hoping Nim would mentioned explicitly
11:51:42cheatfateis there any document which describe right way to pull PR to Nim?
11:55:53dom96cheatfate: this might help https://help.github.com/articles/using-pull-requests/
11:55:59dom96do you have any specific questions?
11:59:39*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:03:54cheatfateThere so many PR without any comments from maintainer...
12:04:10cheatfatejust want to know how properly form PR to get it merged
12:05:13cheatfateis PR must be backed with Issue?
12:05:25cheatfateor something like that
12:07:22dom96no, there are no rules like that.
12:08:16*yglukhov joined #nim
12:08:59dom96We all simply have little time to review PRs
12:16:34*toaoMgeorge joined #nim
12:23:10*toaoMgeorge quit (Quit: Bye)
12:43:43*Trustable joined #nim
13:36:03Araqcheatfate: why is kevent in posix.nim if it's mac specific?
13:48:13*toaoMgeorge joined #nim
13:48:59AraqVarriount: ping me when you're here
14:17:20*Ven joined #nim
14:22:19Araqdom96: I'm finally adding more &= to system. do we want one for sockets too? (would be an alias for 'send')
14:23:19dom96I don't want one at all, but okay.
14:23:29dom96Why is there still no `$` for arrays?
14:24:09Araqtype conflict, we used to have it, it produced bugs
14:24:27Araqit would be preferred for array[N, char] then
14:24:46Araqbut usually the 'cstring' conversion is what the programmer intended
14:25:32Araqwith working concepts we could make it work for everything except array of char ...
14:25:51Araqbut that might bite in generic code, so I dunno
14:26:02dom96I think if the programmer wants a cstring out of a array[N, char] then they should convert it a cstring explicitly
14:26:10dom96$ should give ['a', 'b', 'c']
14:26:30*PMunch joined #nim
14:26:36Araqwell the compiler doesn't even bootstrap then
14:26:58Araqmaybe you're right though. discuss it on the forum?
14:27:46dom96maybe better on github
14:37:23GangstaCatI see that we can activate a real-time mode, so my question is: what are the drawbacks to do this?
14:43:50*PMunch quit (Ping timeout: 250 seconds)
14:46:20AraqGangstaCat: slightly reduced throughput plus it's clear what it means if you simply "enable" it without taking advantage of its API
14:46:27Araq*it's unclear
14:48:34*lslslsls joined #nim
14:49:20*lslslsls quit (Client Quit)
14:55:19GangstaCatAraq, sorry but what do you mean by "throughput"?
15:01:52AraqGangstaCat: overall efficiency
15:03:33GangstaCatalright, but that's not dangerous like risks of memory leaking or things like that?
15:04:23Araqoh that can happen too if your deadlines are too narrow
15:04:33*mrkishi quit (Ping timeout: 244 seconds)
15:06:12GangstaCatalright, thank you
15:08:37AraqGangstaCat: though as far as I'm aware that's usually not a problem with the realtime mode
15:09:13*mat4 joined #nim
15:09:17mat4hello
15:11:00GangstaCatAraq, when I read some languages comparison I know that someone complaned about the Go's GC which stop the world (for 2 seconds every 2 minutes) with an enormous number of concurrent connections (chat service), so I asked myself if that could be avoided in Nim especially with the real-time mode
15:11:07GangstaCatcomplained*
15:11:24GangstaCatand the problem is during this time some messages were lost
15:14:44*Varriount quit (Read error: Connection reset by peer)
15:15:07*Varriount joined #nim
15:15:52AraqGangstaCat: yeah, pretty much. Once I get gc:v2 stable.
15:16:12Araqalso Nim's GC is thread local so it doesn't have to "stop the world" to begin with.
15:16:55Araqthe price is a more complex runtime model.
15:17:14Araqand restricted sharing but that's a good thing IMO.
15:17:52GangstaCatawesome
15:18:38mat4Araq: I've readed you want to rewrite the compiler (to add non-nil behaviour) ?
15:22:17Araqmat4: well I started it but it's so much work
15:22:53Araqit might be easier to migrate other code bases than the compiler itself so I now plan to introduce a .strict mode
15:23:08Araqwhere the defaults change to 'not nil'
15:26:06*ok11 joined #nim
15:26:23*Jesin quit (Quit: Leaving)
15:26:36mat4ok, that add another layer of complexity
15:28:34*mrkishi joined #nim
15:36:55mat4I think finding some free time to assist you for a rewrite if you want
15:41:22*ok11 quit (Ping timeout: 252 seconds)
15:42:36cheatfateAraq, i dont know why kqueue in posix, maybe because epoll in posix too. Kqueue not mac specific but bsd specific (OpenBSD, NetBSD, FreeBSD and MacOS (BSD based))
15:45:42*arnetheduck quit (Ping timeout: 276 seconds)
15:48:43Araqcheatfate: ah ok. well I can trust your PR, right?!
15:51:49dom96cheatfate: have you ensured that the async tests pass on Mac OS X?
15:53:57cheatfateMy kqueue PR is only removing bugs from kqueue.nim, but i have found that there too many things missing in kqueue.nim so i will close it
15:54:32cheatfatedom96, i have tested it only in FreeBSD (which i have)
15:59:46*sorakun joined #nim
16:06:30*sorakun quit (Ping timeout: 244 seconds)
16:09:15*Jesin joined #nim
16:14:54cheatfatedom96, so if i can't test it on MacOS i can't pull PR?
16:15:32dom96cheatfate: You can. As long as you test it on something that supports kqueue :)
16:16:41*dom96 quit (Changing host)
16:16:41*dom96 joined #nim
16:19:44*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:20:25cheatfatedom96, i dont know how's current kqueue.nim working... only because for some reason sizeof(struct kevent) == sizeof(KEvent)
16:20:43cheatfatebut struct kevent's member types are totally wrong
16:24:47Araqcheatfate: that's often due to alignment
16:25:26Araqif you get the size of a field wrong, it's aligned anyway and so the size of the whole struct ends up being fine
16:29:44*boopsiesisaway is now known as boopsies
16:31:17dom96So many opportunities to "get lucky" when programming :)
16:34:05*Ven joined #nim
16:35:40cheatfatei think kqueue.nim will not work properly on BSD systems with GCC compiler
16:35:49cheatfateits only because of CLang
16:36:21cheatfateor maybe only mingw has its own structure pack alignment != 8 bytes
16:39:03Araqcheatfate: usually clang and GCC agree on how to align structs
16:39:33Araqit's part of the C ABI (TM). that's why C is so much better than C++.
16:39:43Araqbecause it has an ABI and C++ doesn't.
16:39:44cheatfateI had problems before when trying to adopt windows IPHLPAPI for nim
16:39:58Araqwhat do you mean it's unspecified in both languages?
16:40:05cheatfatethere was differences between default VCC and MinGW
16:40:12Araqtzzzz facts ...
16:40:31Araqwho cares about facts.
16:44:11cheatfatewhere is Adam Strzelecki (kqueue.nim author)?
17:02:27*yglukhov quit (Read error: Connection reset by peer)
17:02:44*yglukhov joined #nim
17:04:21*filcuc joined #nim
17:04:34filcuchi all
17:07:55mat4hello filcuc
17:08:37filcucgiven an NimIdent of a type can i obtain the type and eventually super type?
17:11:03*OnwardEuler quit (Ping timeout: 240 seconds)
17:12:06filcucand btw is there a sort of compiles trait?
17:12:12filcucsomething like D compiles
17:26:22*drewr joined #nim
17:35:14mat4to my knowledge 'traits' are a Rust specific concept
17:36:29mat4can you please explain what your understanding of a 'trait' is ?
17:41:10*drewr quit (Read error: Connection reset by peer)
17:44:40*drewr joined #nim
17:49:20Araqfilcuc: system.compiles
17:49:33Araqand yeah you can do that with macros.getType()
17:50:03Araqyou can iterate over every field. but note than soonish getType() will be re-worked
17:55:42toaoMgeorgeAraq: what are the plans for getType()?
18:00:26Araqmore consistency and you can retrieve generic parameters
18:01:42mat4the standard library of D includes a 'ForeachType' template. That's nice
18:03:07*darkf quit (Quit: Leaving)
18:07:00*mat4 quit (Quit: Leaving)
18:12:37*vendethiel- joined #nim
18:14:33*vendethiel quit (Ping timeout: 276 seconds)
18:27:40*drewr quit (Read error: Connection reset by peer)
18:30:20Araqwhat's that? Nim's fieldPairs ?
18:31:00*drewr joined #nim
18:33:10*drewr quit (Read error: Connection reset by peer)
18:35:51*Varriount_ joined #nim
18:35:51*Varriount quit (Disconnected by services)
18:40:05*drewr joined #nim
18:47:56*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:50:42*filcuc quit (Ping timeout: 260 seconds)
19:02:01*yglukhov quit (Read error: Connection reset by peer)
19:04:40*yglukhov joined #nim
19:20:47*drewr quit (Read error: Connection reset by peer)
19:26:41*drewr joined #nim
19:52:57*drewr quit (Read error: Connection reset by peer)
19:55:19*dorei joined #nim
20:01:37*yglukhov_ joined #nim
20:01:37*yglukhov quit (Read error: Connection reset by peer)
20:03:47*yglukhov_ quit (Read error: Connection reset by peer)
20:06:49*yglukhov joined #nim
20:09:54*yglukhov quit (Read error: Connection reset by peer)
20:13:44*Demos joined #nim
20:17:11*yglukhov joined #nim
20:19:44*yglukhov quit (Read error: Connection reset by peer)
20:20:00*drewr joined #nim
20:23:28*Varriount joined #nim
20:25:22*Varriount_ quit (Ping timeout: 244 seconds)
20:25:49*yglukhov joined #nim
20:26:03*brson joined #nim
20:32:25Demoshey I'm looking at the subex module right now. It looks like it works like python's format strings. is there any reason it can't just evaluate the code in the substitutions. So like I could write subex"$(1+1)" and get "2"?
20:32:32Demosthat seems possible
20:32:47Demosobviously someone would have to actually implement it
20:33:16Demosbut idk if subex does not do that because of some specific reason or just because nobody thought of it
20:33:52AraqDemos: subex doesn't do macro evaluation.
20:34:07Araqwe could improve it of course but I consider subex slightly over engineered.
20:34:24Araqit's a bit more popular than I expected though
20:34:47Demosyeah, it does not need to be in the standard lib
20:44:12*drewr quit (Read error: Connection reset by peer)
20:45:45*drewr joined #nim
21:00:03*Demos quit (Ping timeout: 240 seconds)
21:01:43*yglukhov_ joined #nim
21:01:43*yglukhov quit (Read error: Connection reset by peer)
21:03:50*Demos joined #nim
21:04:39*drewr quit (Read error: Connection reset by peer)
21:06:44*yglukhov_ quit (Read error: Connection reset by peer)
21:06:47*yglukhov joined #nim
21:09:20*yglukhov quit (Read error: Connection reset by peer)
21:09:37*samdoran joined #nim
21:10:16*drewr joined #nim
21:16:55*yglukhov joined #nim
21:19:06*drewr quit (Read error: Connection reset by peer)
21:19:06*yglukhov quit (Read error: Connection reset by peer)
21:20:27*Demon_Fox joined #nim
21:22:45*Jesin quit (Quit: Leaving)
21:24:09*ics quit (Quit: Connection closed for inactivity)
21:26:02*yglukhov joined #nim
21:40:03*gokr quit (Ping timeout: 264 seconds)
21:44:40*gokr joined #nim
21:46:48cheatfatewhat happens if i instantiate object with ObjectName() is it created on stack? or heap allocated?
21:50:24def-on the stack if it's just an object, on the heap if it's a "ref object"
21:54:04cheatfatedef-, thanks, but is it 100% true, or compiler can decide what it can put in stack and what it can put in heap?
21:56:18cheatfatei mean if i have something like seq[ObjectName] and i declare somevar = ObjectName() and after that i will put it in seq, what comes to seq? stack address? whole object copy?
21:56:21Araqcheatfate: the compiler can perform an escape analysis and move stuff from the heap to the stack, but currently it doesn't do that
21:56:41Araq(the code exists for it though)
21:57:00Araqseqs are allocated on the heap since they can grow
21:58:14cheatfateAraq, i understand seqs are in heap. I want to know if i add stack object to this sequence, how it will be added? like reference to my stack object, or it will copy my object to heap?
22:01:57*yglukhov_ joined #nim
22:01:57*yglukhov quit (Read error: Connection reset by peer)
22:02:12cheatfatemy english is so bad so nobody understands me?
22:03:26cheatfatehttps://gist.github.com/cheatfate/5bb720a2d76f31cf9445
22:03:31def-cheatfate: then the seq on the heap will be resized and the object added without any indirection
22:03:50cheatfatedef-, could you please watch gist
22:03:57def-but you're right, it's not on the stack then
22:04:02def-what's with the gist?
22:04:20cheatfatewhat i have in 24 line
22:04:34cheatfateudata member
22:04:48cheatfateis it pointer to stack of this function?
22:04:56def-yes
22:05:30def-key is on the stack there, if you insert key into a seq all the data is copied into the seq on the heap
22:05:30cheatfateso using this pointer in other function is a bad idea
22:05:33def-right
22:05:46def-that's assuming SelectorKey is an object, not a ref object
22:06:22cheatfatedef-, thank you very much
22:07:08*Varriount quit (Ping timeout: 244 seconds)
22:09:07*yglukhov_ quit (Read error: Connection reset by peer)
22:11:15*Jesin joined #nim
22:12:06*yglukhov joined #nim
22:34:30*\u quit (Ping timeout: 268 seconds)
22:35:51*GaveUp quit (Ping timeout: 276 seconds)
22:39:40*ray_ joined #nim
22:39:59*Kingsquee joined #nim
22:42:43*Matthias247 quit (Quit: Matthias247)
22:44:42*GaveUp joined #nim
22:45:47*Ven joined #nim
22:58:07*boopsies is now known as boopsiesisaway
23:01:59*yglukhov_ joined #nim
23:01:59*yglukhov quit (Read error: Connection reset by peer)
23:11:31*bjz quit (Max SendQ exceeded)
23:12:12*bjz joined #nim
23:27:05*PMunch joined #nim
23:34:42*yglukhov_ quit (Remote host closed the connection)
23:38:50*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:44:01*toaoMgeorge quit (Ping timeout: 240 seconds)
23:47:42cheatfateIs it possible to get current GC reference count of an object?
23:56:17Araqyes but it is worthless