<< 24-03-2015 >>

00:13:49*Matthias247 quit (Read error: Connection reset by peer)
00:16:00*HakanD______ quit (Quit: Be back later ...)
00:18:28*rzzz1 quit (Quit: Leaving.)
00:23:31*rzzz quit (Ping timeout: 255 seconds)
00:31:48*reem joined #nim
00:33:48*brson quit (Quit: leaving)
00:37:06*kjo1 quit (Quit: Leaving.)
00:46:05*gokr quit (Quit: Leaving.)
00:53:46*Mandar quit (Quit: WeeChat 1.0.1)
00:54:58*jholland quit (Quit: Connection closed for inactivity)
01:01:07*fizzbooze joined #nim
01:01:08*irrequietus quit ()
01:06:59*pipeep_ is now known as pipeep
01:17:25*gmpreussner joined #nim
01:41:35*darkf joined #nim
01:43:39*gmpreussner quit (Ping timeout: 244 seconds)
01:43:49*gmpreussner joined #nim
01:50:06*Sornaensis quit (Excess Flood)
01:50:40*Sornaensis joined #nim
02:18:38*saml_ quit (Ping timeout: 246 seconds)
02:27:05*reem quit (Remote host closed the connection)
02:28:54*reem joined #nim
02:35:45*reem quit (Remote host closed the connection)
02:43:04*gmpreussner quit (Ping timeout: 244 seconds)
02:43:49*reem joined #nim
02:44:58*gmpreussner joined #nim
02:51:02*reem quit (Remote host closed the connection)
02:53:23*bonsairobo joined #nim
02:53:41*reem joined #nim
02:53:47bonsairobois it possible to iterate over a set[int]?
03:03:44*fizzbooze quit (Ping timeout: 252 seconds)
03:07:59*bonsairobo quit (Quit: Page closed)
03:29:19*rzzz joined #nim
03:29:37*mwbrown quit (Ping timeout: 265 seconds)
03:47:26*rkj-b joined #nim
03:48:19*rkj-b quit (Client Quit)
04:01:34*dtscode is now known as PreggtorOmegga
04:02:02*PreggtorOmegga is now known as dtscode
04:06:57*johnsoft quit (Ping timeout: 250 seconds)
04:07:28*johnsoft joined #nim
04:13:29*gmpreussner quit (Ping timeout: 244 seconds)
04:13:29*gmpreussner_ joined #nim
04:15:39*filwit quit (Quit: Leaving)
04:19:16*rzzz quit (Ping timeout: 252 seconds)
04:27:41*Demos joined #nim
04:28:14DemosIs there a way to override the dot operator for array accesses, so like we have `.()` but what about `.[]`?
04:28:24Demosand similarlarly for `.[]=`
04:34:09*reem quit (Remote host closed the connection)
04:34:43*reem joined #nim
04:35:06*bonsai joined #nim
04:36:24*bonsai quit (Client Quit)
04:39:22*rzzz joined #nim
04:40:17*Demos quit (Quit: Lost terminal)
04:40:40*elbow_jason joined #nim
04:40:57*elbow_json joined #nim
04:48:29*gsingh93 quit (Ping timeout: 246 seconds)
05:02:44*reem quit (Remote host closed the connection)
05:03:16*reem joined #nim
05:03:52*gsingh93 joined #nim
05:09:09*Demon_Fox quit (Quit: Leaving)
05:11:32*Demon_Fox joined #nim
05:12:58*gmpreussner_ quit (Remote host closed the connection)
05:13:32*gmpreussner_ joined #nim
05:19:25*john_smith joined #nim
05:22:53*john_smith quit (Client Quit)
05:23:09*john_smith joined #nim
05:58:11*HakanD______ joined #nim
06:09:34*john_smith quit (Quit: Page closed)
06:11:05*HakanD______ quit (Read error: Connection reset by peer)
06:11:26*HakanD______ joined #nim
06:17:08*HakanD_______ joined #nim
06:20:25*HakanD______ quit (Ping timeout: 250 seconds)
06:21:44*bjz joined #nim
06:22:57*reem quit (Remote host closed the connection)
06:26:09*elbow__ joined #nim
06:26:18*elbow_json quit (Read error: Connection reset by peer)
06:26:48*elbow_jason quit (Read error: Connection reset by peer)
06:27:00*elbow_jason joined #nim
06:27:36*bjz quit (Ping timeout: 252 seconds)
06:35:35*rzzz quit (Ping timeout: 250 seconds)
06:36:49*irrequietus joined #nim
06:37:34*reem joined #nim
06:42:28*merc_ joined #nim
06:43:50*gmpreussner_ quit (Ping timeout: 244 seconds)
06:44:01*gmpreussner_ joined #nim
06:44:49merc_quick question: can nim objects have static fields?
06:45:43fowlno
06:46:00merc_didnt think so, thanks
06:47:14reactormonkmerc_, static fields are nothing more but global variables, so either use const <variable> or avoid it
06:48:07merc_yeah I will avoid it, not a fan of bare globals
06:52:45*bjz joined #nim
07:02:12*rzzz joined #nim
07:03:30*reactormonk quit (Quit: WeeChat 1.1)
07:03:41*reactormonk joined #nim
07:07:06*rzzz quit (Ping timeout: 272 seconds)
07:13:32*reem quit (Remote host closed the connection)
07:14:09*reem joined #nim
07:21:57*MightyJoe is now known as cyraxjoe
07:41:12*gokr joined #nim
07:41:14*gokr quit (Client Quit)
07:41:24*Demon_Fox quit (Quit: Leaving)
07:41:24*milosn_ joined #nim
07:41:27*gokr joined #nim
07:41:43*milosn quit (Read error: Connection reset by peer)
07:43:10*milosn_ is now known as milosn
07:43:40*gmpreussner_ quit (Remote host closed the connection)
07:44:13*gmpreussner_ joined #nim
07:53:50*Ven joined #nim
08:04:48*Ven quit (Read error: Connection reset by peer)
08:05:43*reem quit (Remote host closed the connection)
08:06:25*Trustable joined #nim
08:08:17*gsingh93 quit (Ping timeout: 246 seconds)
08:15:00*merc_ quit (Quit: Page closed)
08:23:51*reem joined #nim
08:25:38*reem quit (Remote host closed the connection)
08:26:49*reem joined #nim
08:37:47*BlaXpirit joined #nim
08:51:11*reem quit (Remote host closed the connection)
08:58:01*Ven joined #nim
09:05:04*reem joined #nim
09:08:25*tumult joined #nim
09:11:43*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:13:48*gmpreussner__ joined #nim
09:14:11*gmpreussner_ quit (Ping timeout: 244 seconds)
09:20:22*johnsoft quit (Ping timeout: 255 seconds)
09:20:30*johnsoft joined #nim
09:26:10*john_smith joined #nim
09:28:46*BlaXpirit_ joined #nim
09:31:04*BlaXpirit quit (Ping timeout: 245 seconds)
09:47:50*dashed joined #nim
09:48:41*reem quit (Remote host closed the connection)
09:48:45*elbow_jason quit (Quit: Leaving)
09:49:06*elbow__ quit (Quit: Leaving)
10:13:52*gmpreussner__ quit (Remote host closed the connection)
10:14:26*gmpreussner__ joined #nim
10:22:01*flaviu quit (Ping timeout: 264 seconds)
10:22:19*Mimbus quit (Ping timeout: 245 seconds)
10:32:11*flaviu joined #nim
10:34:23*arnetheduck joined #nim
10:44:49*johnsoft quit (Ping timeout: 264 seconds)
10:45:02*johnsoft joined #nim
10:47:09*BlaXpirit joined #nim
10:53:43*john_smith quit (Ping timeout: 246 seconds)
11:00:11*BlaXpirit quit (Quit: Quit Konversation)
11:01:09*BlaXpirit joined #nim
11:28:29*BlaXpirit quit (Quit: Quit Konversation)
11:41:19*allan0 quit (Quit: WeeChat 1.1.1)
11:43:56*gmpreussner___ joined #nim
11:44:32*gmpreussner__ quit (Ping timeout: 244 seconds)
12:03:26qfiren 3
12:06:02*Woflox quit (Ping timeout: 272 seconds)
12:08:17*Sembei joined #nim
12:10:39*gmpreussner___ quit (Quit: Konversation terminated!)
12:24:14*dashed quit (Quit: Connection closed for inactivity)
12:29:23*john_smith joined #nim
12:31:56*rzzz joined #nim
12:40:49*mwbrown joined #nim
12:42:45*a5i joined #nim
12:49:18*reem joined #nim
12:53:46*reem quit (Ping timeout: 244 seconds)
12:53:52*kjo2 joined #nim
12:55:09*mpthrapp_ joined #nim
13:01:47*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:02:13*mwbrown quit (Ping timeout: 264 seconds)
13:02:53*johnsoft quit (Quit: Leaving)
13:03:06*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:20:58*john_smith quit (Quit: Page closed)
13:29:26*saml_ joined #nim
13:42:19*jfchevrette joined #nim
13:44:35*kjo2 quit (Quit: Leaving.)
13:46:17*johnsoft joined #nim
14:11:21*Ven joined #nim
14:30:30*jholland joined #nim
14:35:00*HakanD_______ quit (Quit: Be back later ...)
14:39:59*untitaker quit (Ping timeout: 246 seconds)
14:46:12*untitaker joined #nim
14:53:25*bcinman joined #nim
15:05:01*darkf quit (Quit: Leaving)
15:06:30*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:10:07*Ven joined #nim
15:20:16*jfchevre_ joined #nim
15:22:08*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:23:23*jfchevrette quit (Ping timeout: 250 seconds)
15:27:48*ChrisMAN quit (Remote host closed the connection)
15:29:26*jfchevre_ quit (Quit: Textual IRC Client: www.textualapp.com)
15:31:28*BitPuffin joined #nim
15:38:10*ChrisMAN joined #nim
15:48:32*banister joined #nim
15:48:37*banister quit (Max SendQ exceeded)
15:56:31*rzzz quit (Ping timeout: 252 seconds)
16:17:41*brson joined #nim
16:23:13*Demon_Fox joined #nim
16:23:55*arnetheduck quit (Ping timeout: 265 seconds)
16:27:09*rzzz joined #nim
16:36:36*shodan45 quit (Quit: Konversation terminated!)
16:37:09*shodan45 joined #nim
16:41:38*Matthias247 joined #nim
16:50:42*HakanD_______ joined #nim
16:51:31*HakanD________ joined #nim
16:54:58*HakanD_______ quit (Ping timeout: 252 seconds)
16:58:36*pafmaf joined #nim
17:00:52*tumult quit (Ping timeout: 246 seconds)
17:04:02*banister joined #nim
17:04:06*banister quit (Max SendQ exceeded)
17:28:09*CryptoToad joined #nim
17:31:43*bretthart joined #nim
17:32:49*cyraxjoe quit (Ping timeout: 264 seconds)
17:34:33*MightyJoe joined #nim
17:38:58*MightyJoe quit (Ping timeout: 244 seconds)
17:43:46*shodan45 quit (Quit: Konversation terminated!)
17:44:29*banister joined #nim
17:44:33*banister quit (Max SendQ exceeded)
17:53:27*banister joined #nim
17:53:31*banister quit (Max SendQ exceeded)
17:56:28*banister joined #nim
17:58:07*keypusher quit (Read error: Connection reset by peer)
18:13:53*key_ joined #nim
18:23:11*saml_ quit (Ping timeout: 252 seconds)
18:38:31*whatevernickname joined #nim
18:41:09whatevernicknameCould a kind soul try this and tell me if it crashes for you as well? (obv compile with --threads:on) ---> http://pastebin.com/kDeK9aiv
18:41:41whatevernicknamesegfault is what I get
18:41:54def-whatevernickname: segfaults for me as well on Linux x86-64
18:41:59def-with current Nim devel branch
18:42:40*gsingh93 joined #nim
18:43:02whatevernicknameok, could be the underlying cause of bug #2374
18:44:22whatevernicknameanyone else give a try?
18:45:19whatevernicknameI'm on x86-64 as well
18:46:28*pafmaf quit (Quit: This computer has gone to sleep)
18:48:58def-whatevernickname: same on x86
18:49:44whatevernicknamethanks
18:49:52whatevernicknameI have updated the bug
18:56:28*bretthart quit (Ping timeout: 256 seconds)
18:57:59*UberLambda joined #nim
19:02:39*BitPuffin quit (Ping timeout: 250 seconds)
19:06:48*HakanD________ quit (Ping timeout: 265 seconds)
19:16:22*bretthart joined #nim
19:17:31BlaXpirit_can i find out how much memory an object takes up?
19:17:33BlaXpirit_like a table
19:19:40def-that could be difficult when refs and ptrs are involved
19:21:32EXetoCmaybe not so difficult
19:22:05EXetoCperhaps with the help of the typeinfo module
19:23:17BlaXpirit_nim: if work.hasKey(r): result.add(work[r]) else: add(result, r) python: result.append(work.get(r, r))
19:23:31BlaXpirit_i think this "get" function is absolutely necessary
19:24:42BlaXpirit_actually: result.add(if work.hasKey(r): work[r] else: r)
19:24:56BlaXpirit_but it's still 2 lookups when only 1 is needed
19:26:05*HakanD________ joined #nim
19:26:10flaviuBlaXpirit_: Why does that matter?
19:26:22BlaXpirit_twice slower performance?
19:26:33flaviuno, not anywhere near 2x slower.
19:27:04flaviuArithmetic and bitops are practically free.
19:27:29flaviuThe expensive part is cache misses, and the cache line is already in place by the time the second access is used.
19:27:42flaviu*the line is already in cache
19:28:12EXetoCwhat about mispredictions?
19:28:34flaviuIf it's hot enough, there won't be mispreditions.
19:28:46BlaXpirit_whatever.
19:28:49flaviuAnd anyway, this is exactly where "premature optimization" should be said.
19:28:51BlaXpirit_it's unnecessary operations
19:29:05BlaXpirit_and there is no way to optimize it
19:29:11BlaXpirit_even if it wasn't premature
19:30:06def-flaviu: last time I checked it made quite some difference, but maybe on my old machine operations just aren't free yet
19:30:46flaviudef-: Did your benchmarks include lots of random memory access?
19:31:03def-don't remember honestly, it was in some real program
19:31:08EXetoCthe thing is, this is a library that will be used for many different applications. granted, it should very rarely matter, so just report it or fix it and be done with it
19:31:29*brson quit (Ping timeout: 245 seconds)
19:33:03flaviuEXetoC: Another thing I've found: there's no point in worrying about small stuff like this until someone complains.
19:33:21BlaXpirit_small stuff at the very core -_-
19:37:26TrustableHi, what is the Nim way to do what in C is "#define myCompilerSwitch"?
19:38:44BlaXpirit_pass argument to compiler...
19:39:26def-more specifically, -d:myCompilerSwitch, and you can add that to a project config as well of course
19:39:49whatevernicknamehow can I manually compile the code in nimcache to generate an executable? or alternatively, get the compiler to show me the full gcc commands it uses to assemble a binary from nimcache/*.c
19:39:55EXetoCany flag can go there basically, and -- can be omitted
19:40:12def-whatevernickname: there is --parallelBuild:1 but the linking part isn't printed
19:41:36whatevernicknamethat does not seem to work for me def-
19:42:26def-maybe because the obect files are already built and nothing changed?
19:42:42EXetoC--verbosity:1?
19:43:03def---verbosity:2 does it, nice
19:43:31EXetoCyeah :2
19:43:39whatevernicknamethanks
19:43:48def-Otherwise I would have suggested just looking at the templates in https://github.com/Araq/Nim/blob/devel/compiler/extccomp.nim
19:44:18TrustableWhat I was looking for was a user defined pragmas, also called pragma pragma.
19:44:18*shodan45 joined #nim
19:45:35EXetoCpush and pop will do enough to reduce repetition, assuming that you want to apply it to many symbols at once
19:47:09flaviuwhatevernickname: --genscript, see http://nim-lang.org/nimc.html
19:47:22BlaXpirit_hmm i want to talk to Jehan
19:54:31*pafmaf joined #nim
20:02:59*HakanD________ quit (Quit: Be back later ...)
20:06:44*dtscode is now known as charmander
20:09:25*charmander is now known as dtscode
20:09:33*brson joined #nim
20:20:34*dtscode is now known as charmander
20:22:04*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:22:05*kulelu88 joined #nim
20:22:12kulelu88hellooo
20:26:49EXetoChi
20:28:04kulelu88how has Nim progress been going? I see that Go is becoming the next big thing for systems
20:32:46*irrequietus quit (Ping timeout: 252 seconds)
20:34:24EXetoCNim has many big features that Go does not have, so I'm fairly sure that Nim will have sufficiently large user base at some point
20:37:02*rational joined #nim
20:37:15*gmpreussner|work quit (Read error: Connection reset by peer)
20:37:59reactormonkkulelu88, Go is a bit too simple imo, it's similar to Java in that regard
20:38:01fowlsorry but go is useless to me without metaprogramming. i've tasted from the golden cup and i won't go back
20:38:31EXetoCkulelu88: the work on the compiler is done mostly by one guy, but Araq usually fixes several things each day https://github.com/Araq/Nim/commits/devel
20:39:39kulelu88EXetoC: how is the downstream though? People are building loads of things on top of Go
20:42:11*gmpreussner|work joined #nim
20:43:07EXetoCkulelu88: I haven't seen too many applications that aren't part of the language ecosystem (compiler, website, package manager..)
20:44:05def-You can check this out for some projects: https://github.com/trending?f=transform&l=nimrod&s=ImageAlter&since=monthly
20:44:11EXetoCmany of those applications are backed by a lot of code though, so we are eating our own dogfood
20:44:16kulelu88Nim gets big response from HN postings, but the community doesn't share much AFAIK
20:44:34def-kulelu88: I think the community is pretty small, rather
20:44:55EXetoCwe are developing libraries at a decent rate though
20:45:41kulelu88maybe my needs are too simple for this powerful language
20:46:35gokrkulelu88: There is a nice aspect to Nim and that is that although its smack full of stuff - you can do quite well with just learning some basics.
20:47:22kulelu88I tried learning it previously, but Nim wasn't as easy as I thought
20:47:23gokrI have done a bit of non trivial coding but I haven't really bothered with macros yet for example.
20:48:27TrustableI'm finding new computer bugs
20:48:37TrustableExample 1: https://gist.github.com/trustable-code/19f68848b718d6c44b72
20:48:48EXetoCkulelu88: it might be a little difficult if you aren't familiar with static typing and/or low level aspects
20:49:01def-Trustable: well, a method without arguments doesn't make much sense, does it?
20:49:46def-Trustable: should still fail more nicely of course
20:49:56TrustableI know, but the compile should give an error
20:50:02TrustableExample 2: https://gist.github.com/trustable-code/67a23d532deed837936c
20:50:03wbNim is hard if you're used to languages like python or C# with extensive documentation and books written and such, that's probably nim's biggest issue imo
20:50:46Trustablewb: true
20:50:55kulelu88heh, words taken out from my mind wb
20:51:38gokrBut that's more or less true for all "smaller" languages.
20:52:31gokrWe do have an active forum, an active IRC with people responding quickly, a relatively informative compiler (IMHO) when you goof up, quite a lot of library code to read and so on.
20:52:41TrustableBut fortunately we have people in this IRC channel, who answer every question :D For me this means a log.
20:52:44Trustable*lot
20:53:09gokrAnd more and more articles are being written too.
20:53:20kulelu88but still no wikipedia reference :P
20:53:26gokrThere is now.
20:53:36Trustablegokr: 10 second faster than me :D
20:53:51fowlTrustable, you should report those
20:54:22*mpthrapp_ quit (Remote host closed the connection)
20:54:51kulelu88is there a way to make the slow parts of Python quicker with a Nim binding?
20:55:22Trustablefowl: ok, I'm a bit more careful now, since my last bug report was a duplicate.
20:56:07TrustableTherefore I asked here first
20:56:10fowlTrustable, duplicate reports can be a good motivator :p
20:56:39EXetoCdef-: I'll remember to browse that list more often. Do you know of any third-party apps though?
20:57:20Trustablebtw, what is the planned time for the next release?
20:57:47def-EXetoC: HastyScribe is written in Nim for example: https://h3rald.com/articles/hastyscribe/
20:58:21kulelu88would be nice to see a nimtracker bot that finds all articles concerning Nimrod
20:58:25kulelu88*nim
20:59:04gokrI was meant to put up a planet, but ... got way too busy.
20:59:06EXetoCdef-: was it ever announced?
20:59:19def-EXetoC: yes, on the nim forum iirc
21:00:09EXetoCthere's gradhas documentation app. it's basic IIRC, but it's something
21:00:24fowlkulelu88, you can interface with python through the c wrapper, but "make slow parts quicker" i guess you would do that by replacing some method in the std lib with a function from nimrod, i'm not sure thats doable
21:00:27gokrI wrote blimp, a git utility.
21:00:37gokrAnd then we have Urhonimo of course.
21:00:45EXetoCdef-: was it recently? I was absent for about a month
21:00:59gokrkulelu88: blimp: https://gitlab.3dicc.com/gokr/blimp
21:01:11def-EXetoC: probably longer ago
21:02:03EXetoCgokr: not an app though, right? but I should try it some time
21:02:13EXetoCurhonimo
21:02:37gokrWell... its a game engine framework - and it has some playable samples. :)
21:02:41kulelu88seeing your gitlab site, I recall somebody writing a gitlab clone in Go :D
21:02:48*banister is now known as banisterfiend
21:02:50gokrIt all depends on what you mean by "app"
21:03:56EXetoCgokr: oh ok
21:04:35EXetoCgokr: does it do physics?
21:04:41gokrYou bet. Bullet.
21:04:51gokrIts pretty darn awesome really.
21:04:51kulelu88gokr: are you a professor?
21:04:58gokrNo?
21:05:12kulelu88doh!
21:05:56gokrkulelu88: Don't follow
21:06:20kulelu88EXetoC said does it do physics, so I thought you may be a physics professor
21:06:54gokrHe, no. Urhonimo is a full wrapper of Urho3D - a game engine. It includes full physics and much more.
21:07:09*bretthart quit (Ping timeout: 265 seconds)
21:07:37*irrequietus joined #nim
21:09:39fowlgokr, glossolalia will get a grammar generator like this soon https://gist.github.com/fowlmouth/ea7ab3798f9aa7b9d469
21:10:02*bretthart joined #nim
21:10:08flaviurecursive descent, right?
21:10:42fowlyes
21:11:03fowlits depends on how well it works at compile time
21:11:03gokrfowl: Nice!
21:11:22gokrI dropped my PP stuff immediately when I saw your glossolalia.
21:11:26gokrHaven't had time to play though
21:11:56*Sembei quit (Ping timeout: 246 seconds)
21:13:11*a5i quit (Quit: Connection closed for inactivity)
21:16:12flaviuhope you don't mind if I mention libmarpa, which can parse in reasonable time anything that can be expressed with BNF.
21:17:06*reem joined #nim
21:19:45*UberLambda quit (Quit: Leaving)
21:19:50*bretthart quit (Ping timeout: 256 seconds)
21:21:12TrustableI have a problem with user-defined pragmas. Why does this not work: https://gist.github.com/trustable-code/2cecb5ca6f981dfaf8b7 ?
21:27:59fowlflaviu, mine requires less perl
21:28:08fowl:P
21:28:34fowlTrustable, myPragma is not a defined symbol it only exist inside {. .}
21:28:46fowlno pragma is afaik
21:29:10Trustablefowl: Then I have understood it wrong.
21:29:41fowlTrustable, when you see "when defined(xx):" it refers to a symbol defined at compile time (nim c -d:xx myapp)
21:29:58fowldefine(debug) #=> -d:debug
21:30:05fowldefined*
21:30:07*kulelu88 left #nim ("Leaving")
21:30:31flaviufowl: yep, I'm not a big fan of the perl. libmarpa can be used without perl, but you have to put in the rules by hand and it's a PTIA.
21:33:54*pafmaf quit (Quit: Verlassend)
21:39:13*whatevernickname quit (Quit: Leaving)
21:48:24*polde quit (*.net *.split)
21:48:25*Guest67437 quit (*.net *.split)
21:48:25*reloc0 quit (*.net *.split)
21:48:25*dom96 quit (*.net *.split)
21:49:51*polde joined #nim
21:49:51*Guest67437 joined #nim
21:49:51*reloc0 joined #nim
21:49:51*dom96 joined #nim
21:50:03*polde quit (Max SendQ exceeded)
21:50:53*polde joined #nim
21:50:58*bretthart joined #nim
21:54:05fowlflaviu, got a small marpa example? I want to compare performance
21:54:52flaviufowl: Sure, https://github.com/jeffreykegler/kollos/blob/master/components/json/json.c
21:55:14flaviuI'll save you the trouble though: It runs out of memory at json files > 10MB
21:55:45fowlthis is worse than perl
21:56:00flaviuWell, yeah. It generates the rules manually.
21:58:05*Matthias247 quit (Read error: Connection reset by peer)
21:59:13*ldlework quit (Ping timeout: 264 seconds)
22:00:12*reloc0 quit (Ping timeout: 276 seconds)
22:00:27*reloc0 joined #nim
22:04:29fowlflaviu, why?
22:06:28flaviufowl: not sure, but here is some context: http://irclog.perlgeek.de/marpa/2014-12-25
22:07:12flaviualthough jk figured out a way (unimplemented) to use constant memory, https://github.com/jeffreykegler/kollos/blob/master/notes/misc/constant_space.md
22:07:59flaviuActual math: https://github.com/jeffreykegler/kollos/blob/master/notes/misc/strand.md
22:08:12*ldlework joined #nim
22:21:25fowli'll generate a 10MB json file and see if it parses
22:22:34BlaXpirit_fowl, maybe flaviu has one?
22:22:54flaviuNah, I just grabbed a file off the internet.
22:23:21fowlit'll be quicker to do this than make xjson fully json compliant
22:23:56*rzzz quit (Quit: Lost terminal)
22:28:13*mpthrapp quit (Quit: Konversation terminated!)
22:34:56*HakanD________ joined #nim
22:39:05*HakanD________ quit (Ping timeout: 246 seconds)
22:46:43fowlflaviu, lol xjson takes 55 seconds to try the whole document then doesnt match -_-
22:52:32*dhasenan quit (Read error: Connection reset by peer)
22:59:08*Woflox joined #nim
23:07:33*Trustable quit (Remote host closed the connection)
23:08:27*brson quit (Quit: leaving)
23:13:32gmpreussner|workare there any guidelines on how to organize larger frameworks? i'm undecided whether i should have lots of module that are potentially highly dependent on each other, or have one large module with lots of subfolders of which some apps only use a few (i.e. like Boost)
23:14:44gmpreussner|workin my day job we use lots of modules, but that's not always great as the module dependencies tend to not be cycle free graphs
23:15:04gmpreussner|workand by modules i mean packages
23:15:45gokrgmpreussner|work: Cool stuff you got there btw
23:15:53gmpreussner|workthe Nim standard library uses lots of packages, but those packages are also pretty self-contained
23:16:03gmpreussner|workhow to deal with highly interconnected code bases?
23:16:37gmpreussner|workgokr: you mean Nim I/O?
23:16:41gokryeah
23:16:50gmpreussner|workah yes, there's a lot more coming :)
23:16:50gokrI live about 20 min from Tobii btw
23:17:12gmpreussner|workcool, i met those guys for the second time this year
23:17:27gmpreussner|worki'm helping them with a UE4 plug-in
23:17:32gokrAll that stuff is perfect for us btw
23:18:06gmpreussner|work:)
23:18:18gmpreussner|workkinect / freenect, steamvr, leap are coming up next
23:18:42gokrit would be fun to hook one or two with Urhonimo
23:18:47gmpreussner|workthen maybe Virtuix (they haven't decided about their API yet) and possibly TacticalHaptics
23:19:53gmpreussner|workoooh... and i totally forgot about the philips Hue
23:19:57gmpreussner|workthat's gonna be a fun project
23:20:09gmpreussner|workthey're sending me a kit this week. have you seen those?
23:20:13gmpreussner|workremote controlled light bulbs
23:21:42BlaXpirit_so i asked earlier "can i find out how much memory an object takes up?"
23:21:58BlaXpirit_EXetoC got an idea that something relevant may be in marshal module
23:23:43EXetoCit demonstrates the typeinfo interface
23:24:11BlaXpirit_but think about it
23:24:16BlaXpirit_i can just write an object to stream
23:24:20BlaXpirit_and get length of stream
23:24:26BlaXpirit_and that's basically it
23:24:39flaviuBlaXpirit_: Why do you need to know how much memory an object takes?
23:24:53BlaXpirit_for crazy memory efficiency benchmarks, of course!
23:25:02def-except if a ref occurs multiple times inside the object
23:25:37EXetoCwhy can't typeinfo be used for that? (continuing a discussion that originated in #nim-offtopic)
23:25:39def-no idea if marshal can even handle that
23:26:03BlaXpirit_typeinfo gives size of a type
23:26:10*jefus joined #nim
23:26:11flaviuBlaXpirit_: Easy way: measure baseline, run benchmark, assign to global, run GC, measure new memory usage.
23:26:13BlaXpirit_marshal stores an object and data it owns
23:26:32BlaXpirit_yes, i should've asked more directly, now that i think about it
23:26:44EXetoCI'm just saying that marshal shows how it can be used
23:27:18BlaXpirit_well obviously if marshal uses typeinfo, then typeinfo can be used for this
23:27:26BlaXpirit_just not trivially
23:27:30gokrgmpreussner|work: Your house must look like a toy store :)
23:28:16EXetoCyeah you get a rough estimate
23:33:29gmpreussner|workgokr: yeah, i got a lot of stuff :)
23:33:34EXetoChave most type names had their T/P prefixes removed?
23:35:04EXetoCit doesn't seem that difficult to automate, but maybe I'm wrong
23:42:29BlaXpirit_how costly are exceptions?
23:42:47flaviueven a try: catch: is pretty expensive.
23:42:51BlaXpirit_considering try: table[j] except KeyError: j
23:43:08BlaXpirit_would an extra hasKey really be better?
23:43:20flaviuVery much so.
23:43:32BlaXpirit_another reason to have table.get(j, j)
23:44:08flaviuHave you even measured hasKey?
23:44:26EXetoCflaviu: you mean with the C target? the most efficient implementation isn't too far off from return code checking, is it?
23:44:57flaviuEXetoC: Nim uses setjmp and longjmp, not return code checking.
23:45:31EXetoCI wasn't saying that
23:45:49*reem quit (Remote host closed the connection)
23:46:19EXetoCI was comparing the C way with the most efficient code for dealing with exceptions
23:46:41EXetoCthat's the impression I got, but yes most users use the C target atm
23:46:42flaviuAh, the most efficient implementation costs nothing unless the exception is thrown.
23:47:03flaviuthe cpp target takes advantage of that, IIRC.
23:47:53*reem joined #nim
23:48:26BlaXpirit_yes, pretty sure
23:48:42BlaXpirit_but i'm talking about a case when exception is thrown like 1/4 times
23:48:46EXetoCsomething has to be checked, and then it's a cost isn't it? but possibly the least amount of cost apart from not performing the check in the first place :p
23:53:07EXetoCjust that there's always an implicit try/catch that encapsulates all the code. perhaps it should be possible to omit that, in case someone wants maximum performance at all cost ;)
23:54:34EXetoC--yolo:0|1
23:55:52flaviuEXetoC: That's a one-time cost.
23:58:05*brson joined #nim
23:58:32*rational quit (Quit: Lost terminal)