<< 06-01-2015 >>

00:00:55AraqI used to make backups of my git repos before doing conflict resolution
00:00:55*irrequietus quit ()
00:01:17Araqthat's how good these tools really work when you happen to be a mortal
00:01:42flaviuI happen to be a god, so I just did git rebase --interactive and got rid of that commit.
00:02:28BlaXpirit:o
00:03:31Araqflaviu: oh it wasn't even git specific, I did the same with subversion
00:03:42ldleworkgit has the amazing cache thing
00:03:49ldleworkI've fucked up trees really really badly
00:04:02ldleworkgo into the commit log, pick the last commit you recognize, check it out, all is good
00:04:08ldleworkI think the cache lasts like 3 weeks too
00:04:12flaviuAraq: How long did it take with subversion? :D
00:04:42*saml_ joined #nim
00:05:05*rpag quit (Quit: Leaving)
00:07:42Araqflaviu: I am not sure you understand what "backup" means here
00:12:15*Mat4 left #nim (#nim)
00:16:33*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045])
00:37:13*saltylicorice joined #nim
00:45:05renesacflaviu: while you are at it, you could add a drop of documentation to that module... it has aproximatedly zero
00:45:28flaviurenesac: Sure, I can send in a PR for that.
00:50:54*yglukhov____ quit (Quit: Be back later ...)
00:56:29*BlaXpirit quit (Quit: Quit Konversation)
01:05:53*jefus_ is now known as jefus
01:12:22jpoirierHas anyone tried/used Pelles C (http://www.smorgasbordet.com/pellesc/) as Nim's C compiler?
01:12:37Varriountjpoirier: Yes, it should work...
01:12:59jpoiriernice
01:23:02Araqjpoirier: nope, it's completely broken
01:23:16AraqPelles C is so buggy it's not funny
01:23:37Araqwell maybe it's acceptable now, tried it years ago
01:25:40def-jpoirier: tcc works pretty well and compiles so fast
01:26:26*vqrs quit (Quit: Nettalk6 - www.ntalk.de)
01:26:56jpoirierAraq: Oh, didn't know that. Probably just stick with gcc on windows.
01:27:25*superfunc quit (Ping timeout: 246 seconds)
01:27:42dtscodedef-, how is its optimizations?
01:28:27def-dtscode: terrible
01:28:41dtscodelame
01:28:49def-fine for quick debug builds for me
01:29:48def-for the lpath benchmark: gcc: 1881 ms, clang: 1459 ms, tcc: 4265 ms
01:30:37def-and compile times: gcc: 2.6 s, clang: 0.9 s, tcc: 0.3 s
01:31:42Araqtoo bad TCC sucks on windows
01:31:51def-why is that, Araq ?
01:32:01Araqotherwise we would have our winner for the REPL right there
01:32:03flaviudef-: How about clang without opts?
01:32:07jpoirierdef-: yeah, tcc is really fast at compiling but I don't have a lot of faith in it. I hacked on it, on and off, for about a year at work. It is nice for doing some quick prototyping and stuff.
01:32:53def-i only found 3 problems with tcc so far out of hundreds of code pieces
01:33:20Araqdef-: doesn't come with C headers and GCC's have some issues
01:33:37def-Araq: probably like the one I just posted as an issue
01:34:06Araqis that still maintained?
01:34:15Araqlooked moribund the last time I looked at it
01:34:30def-new version 2013
01:34:31jpoirierdef-: I use CH (http://www.softintegration.com/products/chstandard/) to C repl stuff and run small files. Sorry, probably off topic.
01:35:32def-flaviu: clang without opts: 0.8 s compile, 7881 ms runtime
01:35:52flaviuInteresting, tcc still beats it.
01:35:55def-(but that's because of all the debug stuff in)
01:36:06def-i compiled with tcc and -d:release
01:36:27AraqTCC should beat it, clang builds an AST and TCC doesn't
01:36:34def-Araq: i can't imagine how a REPL would work with tcc though
01:37:01Araqdef-: TCC exposes a trivial API to do that
01:37:13Araqlike: runcode(char* code);
01:37:27def-maybe we should use that and get the bugs on windows fixed?
01:38:55Araqdo it if you want to
01:39:06Araqcompiler/tccgen.nim is still in the repo
01:39:10def-i think a working repl would be really useful
01:39:33Araqwell the C codegen needs some "trivial" change to support a REPL
01:39:50flaviu<MyMind> what means that has value semantics?
01:40:14flaviuIt means that when you do `let foo = @[]` you can't change it, but when you do `var foo = @[]`, you can.
01:40:26Araqaccesses to globals need to happen via wrappers
01:40:49Araqso the state can be kept properly
01:41:20MyMindic flaviu
01:41:24MyMindty
01:44:32jpoirierconcerning TCC, do you keep Nim's version in synch with http://repo.or.cz/w/tinycc.git
01:47:25def-oh, looks maintained
01:47:53def-even some windows fixes
01:48:06def-" tcc, libtcc: fix build on windows with latest mingw. "
01:52:00jpoirieryeah, they've done a pretty good job with it, platforms , architectures, compliance, etc... Arm support was okay, but limited, last time I used, which was about a year ago
01:58:16Araqso. I did it. c2nim can parse (basic) templates.
01:59:07Araqand no, it's not harder to parse than the rest of C / C++.
01:59:22Araqit's turtles all the way down
02:02:59VarriountAraq: Reference to Dr. Seuss?
02:03:39VarriountAraq: Java's long classpaths... help yet again: http://stackoverflow.com/questions/199130/how-do-i-increase-the-proc-pid-cmdline-4096-byte-limit?lq=1
02:05:12gokr1Is the Nim VM a dead end?
02:05:22Varriountgokr1: Huh? What do you mean?
02:05:29gokr1For a REPL I mean
02:05:49Araqgokr1: yes. I think so.
02:06:02gokr1Although I would rather see a full dev env with "Workspaces" in it etc :)
02:06:26AraqtinyC seems the old new way to go for a decent REPL
02:07:19Varriountgokr1: I believe Mat3 is working on something.
02:08:02*VinceAddons quit (Read error: Connection reset by peer)
02:17:17Araqgood night
02:21:22*Sergio965 joined #nim
02:26:02*Trustable quit (Quit: Leaving)
02:29:54VarriountHello Sergio965
02:30:02Sergio965Hello!
02:31:00*jadbox joined #nim
02:31:03jadboxhey folkd!
02:31:23jadboxI'm having an issue with enum matching
02:31:37Varriountjadbox: Oh?
02:32:07jadboxIn http://pastebin.com/SWQke13X
02:32:21jadboxI'm getting: calc.nim(14, 4) Error: not all cases are covered
02:32:23jadboxyet
02:32:27jadboxlooks like all the cases are met
02:32:35jadboxwhat am I missing?
02:33:27jadboxPretty much only the top 25 lines are relevant in the pastebin I believe
02:33:44VarriountLet me see...
02:34:01jadboxI'm using the latest nim build from the git repo
02:34:34EXetoCmight be a bug
02:34:54willwillsongokr1: did you see someone else was interested in petitparser? http://forum.nimrod-lang.org/t/722
02:35:38gokr1Ah, cool
02:35:49jadboxI was thinking it was a bug... odd that somehow I might have tripped it.
02:35:51gokr1Yeah, i am hacking on it right now actually
02:36:30willwillsonnice :)
02:36:39xant1Isn't 1.0e9 one billion and not one million? http://nim-lang.org/tut1.html#numbers
02:39:20*yglukhov____ joined #nim
02:39:56reactormonkxant1, yeah, already fixed.
02:39:56*z1y joined #nim
02:40:04*z1y quit (Remote host closed the connection)
02:40:21gokr1willwillson: Replied to him
02:40:34jadboxI even add an "else" to the case statement: still get "not all cases are covered"
02:40:37Varriountjadbox: Yeah, that's weird. I don't even know what's causing it.
02:40:55willwillsongokr1: who needs a mailing list... ;-)
02:41:03def-Hm, I guess this isn't a bug in tcc after all. rather gcc and clang don't behave according to IEEE 754: https://gist.github.com/def-/d86c40de803819d7d535
02:41:25Varriountjadbox: Since I know for sure that there are other places in the standard library that use enums in case statements
02:41:55jadboxI've even added more enum vals and tried changing their names. No good..
02:42:16jadbox(changing the names of the existing enum names)
02:42:20reactormonkxant1, it's somewhere in git, just hasn't made it to the website yet.
02:42:32reactormonkAraq, could you rebuild the website?
02:42:45*z1y joined #nim
02:42:52Varriountreactormonk: He just went to be.
02:42:55Varriount*bed
02:43:03reactormonkVarriount, tomorrow it is
02:43:38*yglukhov____ quit (Ping timeout: 244 seconds)
02:49:05flaviuHas anyone seen Marpa? It's a parsing algorithm and C library, and it's much more advanced than what is currently avalible.
02:50:17flaviuThe C library is unfortunately not very user-friendly, it doesn't hide the complexity of how it works.
02:51:05willwillsonjadbox: i think it is the comma in fkVar
02:51:21willwillsonjadbox: try removing it
02:53:12jadboxyep, got it. It was also that I had an object that had the SAME field names for different cases on the enum.
02:53:34jadboxremoving the comma and making each enum case field have a unique name worked
02:53:58*darkf joined #nim
02:54:07willwillsonjadbox: the error message definitely needs some improvement ;-)
02:54:28jadboxI was really hoping that it was possible to have the same field names depending on the type :/
02:55:19jadboxas it is, you can, but it has to be global for all instances of the object. I.e., you can't have the same field name for just two cases on the enum for the object.
02:56:38renesacjadbox: if you add the {.pure} pragma to the enum, it's fields aren't added to the current scope
02:56:44jadboxOtherwise with duplicate fields depending on the enum (even of the same type): Error: redefinition of 'value'
02:56:53renesac*{.pure.}
02:56:56renesacnot sure if it helps
02:58:09jadboxrenesac, doesn't help but it is nice to know
03:01:14EXetoCI don't know what you mean
03:02:01*saltylicorice quit (Ping timeout: 264 seconds)
03:04:07EXetoCok for variant types. nope not possible
03:05:21*gokr1 quit (Quit: Leaving.)
03:05:48EXetoCsince it doesn't quite work like in rust for example. you just refer to a field name
03:16:04*BitPuffin quit (Ping timeout: 245 seconds)
03:18:55*jadbox quit (Quit: Page closed)
03:20:41*tttt joined #nim
03:31:02*AMorpork is now known as ZzZMorpork
03:32:37*Sergio965 quit (Quit: Bye! :))
03:32:37*Mimbus quit (Read error: Connection reset by peer)
03:32:38*flaviu quit (Read error: Connection reset by peer)
03:35:20*flaviu joined #nim
03:41:14*learningNim joined #nim
03:41:57*Sergio965 joined #nim
03:45:18learningNimQ: I'd like to modify a value in a Table in a child property of an object when I pass the parent object to a procedure. At the moment, I see this - Error: '[](a.tree, current).to' cannot be assigned to
03:45:52def-learningNim: pass the object as var?
03:46:16learningNimI pass the parent object as a 'var'
03:46:35def-can you show the code?
03:46:40learningNimsure, 1 sec
03:46:43def-as a gist or paste somewhere
03:46:46learningNimis pastebin fine?
03:46:49def-yes
03:48:23*willwillson quit (Ping timeout: 240 seconds)
03:49:42learningNimpaste link: http://pastebin.com/gQyZH0DK
03:51:07learningNimI can't figure how to modify the 'to' Table inside the object on line 35 and similar on line 44
03:51:25def-use .mget(current) instead of [current]
03:51:31learningNimi get ahocorasick.nim(35, 21) Error: for a 'var' type a variable needs to be passed
03:51:38def-then mget returns a var value, then you can modify it
03:52:19learningNimdoes the mget procedure return a modifyable value, as in a pointer or a reference ?
03:52:23def-yes
03:52:25def-http://nim-lang.org/tables.html#mget,CountTableRef[A],A
03:52:29learningNimok I'll try it
03:53:25learningNimAh, I see the documentation in tables.nim: ## retrieves the value at ``t[key]``. The value can be modified.
03:54:51def-for modification idenitifiers are generally prefixed with "m", there's also mvalues and mpairs
03:55:21learningNimah, it worked- a.tree.mget(current).to[asInt] = path
03:55:39learningNimand the 'm' prefixed procedures now make a bit more sense. thanks
04:02:07def-that's a common gotcha though, I'm wondering if something can be done about that.
04:02:56*saml_ quit (Quit: Leaving)
04:06:09Varriountdef-: I tried to talk to Araq about changing that. It would make more sense for it to be named something like 'varGet'
04:06:33Varriount'm' is supposed to stand for 'mutable', but that's not really the first thing that comes to mind...
04:07:39def-Varriount: yes, sounds reasonable. what would go wrong if we just replaced [] with mget (and so on)?
04:12:09*BitPuffin joined #nim
04:12:25renesachere something I was working last year: https://gist.github.com/ReneSac/ff983a857dd56209d3bb
04:12:59renesacI stopped halfway, so there can be many functions wrong/incomplete there
04:14:06renesacand for some reason the assert on line #285 isn't working:
04:14:09renesacError: type mismatch: got (int) but expected one of: system.assert(cond: bool, msg: string): stmt
04:15:29renesacok, putting parenthesis around 16 >> 1 solves it
04:16:08learningNimthe mutable part is more obvious now to me by looking at the proceude return type, 'var' being there instead of just the value
04:17:19*BitPuffin quit (Ping timeout: 245 seconds)
04:17:41renesacdef-, Varriount : what you think?
04:18:09renesacit is much easier to translate C/java code that way
04:18:32renesacand most example code for bitwise operations use C conventions
04:19:17renesacof course, even then it is not a simple matter of copy and pasting, as the Celt's ilog2 function shows
04:20:03*z1y quit (Remote host closed the connection)
04:20:09*Demon_Fox quit (Quit: Leaving)
04:21:10*z1y joined #nim
04:21:52def-renesac: could be a library i guess, if people wantto work on bits like that
04:22:15def-the problem with >> is probably because it's handled as an arrow
04:22:37def-was recently added to make -> and => from future module work better
04:23:37def-that makes `>>` right associative
04:25:24ldleworkso, after updating Nim just now, I get a SIGSEV for all my sdl/graphics apps
04:26:35ldleworkI am sad
04:26:38ldleworkno traceback
04:27:08renesacdef-: uh... so my template magic don't work anymore?
04:27:15ldleworkhalp, https://gist.github.com/5bdaa5ce64e8a6fdda8c
04:27:32def-renesac: seems so
04:27:32renesacwith templates I was capable of correcting the precedence of those operators in nimrod 0.9.4
04:27:42def-i don't know
04:28:03renesacas it would be transformed to 'x shr y' before the precedence being computed
04:28:04Varriountldlework: Did you use the traceback switch when compiling the compiler/apps?
04:28:26*yglukhov____ joined #nim
04:28:35ldleworkVarriount: I didn't have to do that last time is that new?
04:28:48ldleworkVarriount: I'm just using the instructions on the website, but with devel instead of master
04:29:39Varriountldlework: I dunno. I thought I read in an issue that --stacktrace isn't on by default for debug builds on linux.
04:30:09ldleworko_o
04:30:24Varriountldlework: Is that true, or did I read wrong?
04:30:57ldleworkI don't know - do you know what issue you're referring to?
04:31:24renesacdef-: your use of ^ as pow in the math library conflicts with my use of it as 'xor'...
04:31:41renesacbut araq don't likes python's ** as pow... that would not conflict
04:31:54def-renesac: I like ^ more too
04:32:22renesacbut then what to do with the poor 'xor'? :(
04:32:32Varriount:<
04:32:32def-I guess they chose ** in Python because ^ was used already. Luckily it's not in Nim
04:32:44renesache wants a real operator too!
04:32:58*yglukhov____ quit (Ping timeout: 244 seconds)
04:36:07ldleworkwow this is a wrench, man
04:36:40ldleworkI can't run my programs anymore :'(
04:38:39*jefus_ joined #nim
04:39:05ldleworkVarriount: I can't find any issue related to what might sound like what you were talking about
04:40:27def-ldlework: could you revert back to the last working commit for now?
04:40:45ldleworkdef-: I removed my Nim install thinking that some artifacts from upgrading or something
04:40:56ldleworkso I did a clean install from devel, all my SDL apps SIGSEV
04:41:06def-do you have one of these apps somewhere?
04:41:14ldleworkI could try reinstalling SDL
04:41:20ldleworkbut I have no idea why that would have broke
04:42:28*jefus quit (Ping timeout: 244 seconds)
04:42:40ldleworkdef-: https://github.com/dustinlacewell/lights-out.git
04:44:37def-to get the stracktrace i do ./koch temp c ~/git/lights-out/lightsout.nim
04:44:46def-crashes for me as well
04:44:54def-do you remember when it last worked?
04:45:02ldleworkdef-: jsudlow has a checkout that compiles it correctly
04:45:12ldleworkI'm waiting for him to cough up the sha
04:45:32ldleworkjsudlow: what's the git sha for your old checkout?
04:45:38*Demon_Fox joined #nim
04:45:53jsudlowldlework: one sec let me log into the github
04:45:54ldlework(use git status)
04:45:58ldleworkjsudlow: no
04:46:02ldleworkyour local install of Nim
04:46:05ldleworkthe one that works on the game
04:46:08ldleworkgo in there
04:46:10ldleworkand type
04:46:13ldleworkgit status
04:46:20ldleworktell us what commit you're on
04:46:28jsudlowe63387d08dd9b9fe3af31ed55c89f55dc4736db1
04:46:44jsudlowthats the last sha commit to my repo
04:46:57ldleworkjsudlow: for Nim?
04:46:59ldleworkor our game?
04:47:21jsudlowoh one sec
04:47:23ldleworkjsudlow: we want to know the last commit where Nim didn't break our game
04:47:31jsudlowldlework: sorry let me get that for you
04:48:22jsudlowldlework: when I say git status in the nim directory that correctly runs the game it does not give me the sha
04:48:41jsudlow~/Nim/bin$ git status
04:48:41jsudlowOn branch devel
04:48:41jsudlowYour branch is up-to-date with 'origin/devel'.
04:48:41jsudlowUntracked files:
04:48:41jsudlow (use "git add <file>..." to include in what will be committed)
04:48:42jsudlow ../csources/
04:48:44jsudlownothing added to commit but untracked files present (use "git add" to track)
04:49:27def-jsudlow: "git log" and look at the top
04:49:55jsudlowcommit 010b8f85c73671782de956c9dcd2cb3e8441041e
04:49:55jsudlowMerge: caf2f6e 32db679
04:49:55jsudlowAuthor: Araq <[email protected]>
04:49:55jsudlowDate: Fri Dec 26 22:43:40 2014 +0100
04:49:56jsudlow Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
04:50:53jsudlowldlework: thats the date when I pulled so I suppose you could go back to that date
04:50:59ldleworktrying now
04:51:02jsudlowldlework: and maybe walk the commits forward until it breaks?
04:51:03def-Crashes for me, but with an error in random
04:51:04*vendethiel quit (Ping timeout: 245 seconds)
04:51:20ldleworkdef-: heh how did you recompile Nim so fast
04:51:30def-./koch temp c ~/git/lights-out/lightsout.nim
04:51:37def-faster than a full build
04:51:41ldleworkdef-: after checking out the commit?
04:51:46def-yes
04:51:53ldleworkI have no idea what that does then :P
04:51:57ldlework"magic"?
04:52:11ldleworkthe game runs for me
04:52:13ldleworkon this commit
04:52:16ldleworkwhen I do a full build
04:52:21def-"creates a temporary compiler for testing"
04:53:28def-I have to go, good night
05:10:05*z1y quit (Remote host closed the connection)
05:10:32*z1y joined #nim
05:16:01*saltylicorice joined #nim
05:22:28*learningNim quit (Quit: Page closed)
05:30:05*z1y quit (Remote host closed the connection)
05:30:53*saltylicorice quit (Ping timeout: 265 seconds)
05:30:54*z1y joined #nim
05:36:20*kapil__ joined #nim
05:41:16*yglukhov____ joined #nim
05:56:42*z1y quit (Remote host closed the connection)
05:57:46*z1y joined #nim
06:01:33*BitPuffin joined #nim
06:05:34*yglukhov____ quit (Quit: Be back later ...)
06:06:39*BitPuffin quit (Ping timeout: 265 seconds)
06:08:23*xant1 quit (Ping timeout: 240 seconds)
06:39:48*gour joined #nim
06:46:47*z1y1 joined #nim
06:47:53*z1y quit (Ping timeout: 240 seconds)
06:56:51*gour quit (Remote host closed the connection)
07:00:35*nande quit (Remote host closed the connection)
07:10:58*gour joined #nim
07:42:47*Sergio965 quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:50:16*BitPuffin joined #nim
07:54:52*BitPuffin quit (Ping timeout: 245 seconds)
08:00:16*yglukhov____ joined #nim
08:08:21*vendethiel joined #nim
08:08:37*ARCADIVS joined #nim
08:09:01*infrashortfoo joined #nim
08:40:19*SplinterOfChaos quit (Ping timeout: 255 seconds)
08:47:56*rainkin joined #nim
08:50:28*rainkin quit (Remote host closed the connection)
08:52:18*hakand__ joined #nim
09:17:20*hakand__ quit (Ping timeout: 244 seconds)
09:19:53*BlaXpirit joined #nim
09:27:27*vendethiel quit (Ping timeout: 256 seconds)
09:29:47Triplefox.eval var bad = array[1,int]
09:30:06*z1y1 quit (Remote host closed the connection)
09:30:21Triplefoxah, gone
09:30:43*z1y joined #nim
09:31:31dtscodelol can it only have one value?
09:32:21*vendethiel joined #nim
09:32:24Triplefoxit gives a terrible error message
09:32:34Triplefoxinternal error: GetUniqueType
09:32:56Triplefoxthe correct syntax is var good : array[1,int]
09:33:55Triplefox(there are some issues already involving that error message)
09:34:16dtscodeoh wait, yeah, you couldnt do that
09:35:52Triplefoxah yeah, it's been mentioned already here https://github.com/Araq/Nim/issues/1131
09:39:02*BitPuffin joined #nim
09:39:33*repax joined #nim
09:43:21*hasenj joined #nim
09:43:54*Sphax joined #nim
09:44:27*BitPuffin quit (Ping timeout: 264 seconds)
09:49:46*vendethiel quit (Ping timeout: 250 seconds)
09:50:19*bjz joined #nim
09:51:33*kapil__ quit (Quit: Connection closed for inactivity)
09:52:23*SplinterOfChaos joined #nim
09:55:27*bjz quit (Read error: Connection reset by peer)
10:01:15*dyu joined #nim
10:05:23*ARCADIVS quit (Quit: ARCADIVS)
10:08:45Triplefoxwhat is the equivalent of the C stdio.h "NULL" (for passing to a C api)
10:10:05brsoni heard that nim does something like ccache during its bootstrap to avoid rebuilds across stages. does anybody have an approximate idea of what the hit rate is? I imagine it's often pretty high, making a really fast bootstrap
10:10:10brsonre https://www.reddit.com/r/rust/comments/2rgjbr/nims_compile_times/
10:10:20brsonthat's a pretty sweet advantage of having a c backend
10:10:55*gokr joined #nim
10:12:28brsonwhat percentage of compile time does nim typically spend in the 'backend' (gcc)?
10:14:51Triplefoxmy rough estimate on this little demo project i'm working on is 50%, but that's of a total compile time of like four seconds
10:15:03*gokr_ quit (Ping timeout: 264 seconds)
10:17:05ekarlso-Triplefox: what's your project =
10:17:47Triplefoxopengl stuff, right now stuck on making things display with vertex array objects
10:18:03*bjz joined #nim
10:21:07brsonTriplefox: thanks
10:24:57EXetoCTriplefox: nil
10:25:48Triplefoxaha, that fixed everything
10:26:48Triplefox(sigh, hours of effort to narrow down the possibilities to a simple question)
10:27:44*gokr quit (Ping timeout: 245 seconds)
10:33:49Araqbrson: the hit rate is actually quite horrible, but it's rather easy to fix and planned for after 1.0 ("deterministic C code generation")
10:35:03Araqalso we do something in the lines of 'make -j8', so you more cores you have the more time is spent in the Nim compiler
10:35:43Araqas that only uses a single core
10:39:31*gokr joined #nim
10:40:05*z1y quit (Remote host closed the connection)
10:40:23brsonAraq: thanks for the info!
10:40:39*z1y joined #nim
10:46:58ekarlso-hmm
10:47:09ekarlso-for the package index thing, should licenses be predefined in a database ?
10:51:08Araqekarlso-: if you allow for "custom" licenses too
10:51:41ekarlso-Araq: atm it's you add whatever you want :)
10:51:59Araqthat's good enough for me
10:52:30ekarlso-as in a admin adds a license to the system
10:52:34MyMindanybody wrote / ported a path tracer to nim ? http://www.kevinbeason.com/smallpt/
10:52:48ekarlso-it shows up in the selection when creating a package Araq
10:53:18ekarlso-Araq: I was wondering if we could somehow use it to make a license dep graph in nimble or smth
10:53:25ekarlso-like npm / node has
10:53:55ekarlso-http://imgur.com/HiQbw2L < there's the license admin bit atm
11:01:28ekarlso-package stuff is becoming more and more advanced :/
11:07:43*gokr_ joined #nim
11:07:55*Matthias247 joined #nim
11:10:06*z1y quit (Remote host closed the connection)
11:10:46*jm116 joined #nim
11:10:51*z1y joined #nim
11:10:51*gokr quit (Ping timeout: 264 seconds)
11:18:47*BlaXpirit quit (Quit: Quit Konversation)
11:20:32*BlaXpirit joined #nim
11:24:31*jm116 quit (Changing host)
11:24:31*jm116 joined #nim
11:24:51*BitPuffin joined #nim
11:30:00*BitPuffin quit (Ping timeout: 265 seconds)
11:30:19*Trustable joined #nim
11:35:12*VinceAddons joined #nim
11:40:54*gsingh93 quit (Quit: Connection closed for inactivity)
11:43:30*Sphax quit (Quit: ZZZZZzzzzz)
11:47:59*kapil__ joined #nim
11:53:38*gokr joined #nim
11:54:12*bjz quit (Ping timeout: 244 seconds)
11:54:30*bjz joined #nim
11:55:26*gokr_ quit (Ping timeout: 250 seconds)
11:55:26*yglukhov____ quit (Read error: Connection reset by peer)
11:55:34*yglukhov____ joined #nim
11:57:07*repax_ joined #nim
11:59:00*z1y quit (Ping timeout: 265 seconds)
11:59:34*nickles joined #nim
11:59:38def-Araq: /names
11:59:42def-oops
11:59:56def-Araq: I still don't get how to do the TCC REPL stuff
12:00:09AraqI'll tell you later
12:00:12*repax quit (Ping timeout: 250 seconds)
12:01:04*nickles quit (Client Quit)
12:01:35def-alright, tried it out a bit here, but couldn't get anything interesting working yet: https://github.com/def-/Nim/blob/tcc-repl/compiler/tccgen.nim#L77-L88
12:01:44def-at least the most recent tcc works now
12:07:51*BitPuffin joined #nim
12:23:51*bjz quit (Ping timeout: 244 seconds)
12:31:34*ZzZMorpork is now known as AMorpork
12:37:32*Sphax joined #nim
12:41:31*BitPuffin quit (Ping timeout: 255 seconds)
12:44:37*bjz joined #nim
12:49:04*gokr_ joined #nim
12:51:54*gokr quit (Ping timeout: 245 seconds)
12:53:09Araqdef-: so what's the concrete question? for a REPL all that counts is that you keep the state in global vars properly. you can pointlessly recompile all of the generated code, nobody can tell the difference
12:53:55def-Let me try that
12:53:59*bjz quit (Ping timeout: 245 seconds)
12:55:10Araqnote that you cannot really use 'nim i' as a starting point as that doesn't pointlessly recompile
12:57:24*willwillson joined #nim
12:58:41def-Araq: How would I keep the state of global vars then?
13:00:30Araqyou need to translate 'someGlobal' to getGlobalMemory("someGlobale", sizeof(typeof(someGlobal))) and then tell TinyC that 'getGlobalMemory' comes from some DLL
13:01:29Araqthe provider of 'getGlobalMemory' can be the nim.exe itself. On Windows at least, I think ELF supports that too
13:02:32Araqso you need to touch the C codegen, but it doesn't seem too hard to do
13:05:06AraqgetGlobalMemory(key, size) needs to alloc the memory if it doesn't know about key yet, otherwise it needs to return its previous pointer ... hrm that also needs GC support. fun.
13:06:05*z1y joined #nim
13:12:54Araqbut for a start you can only care about globals that don't contain GC'ed memory
13:13:06kokozedmanI'm trying to create a hash() proc for a C struct, and I'm not really sure what's in it, but what I want to do is to hash its bytes content
13:13:32kokozedmanhow can I do that? give the fact that the object will not be passed in as 'var', so, I can't get its address
13:14:19Araqkokozedman: ah that's a good point. I think you have to use .emit for now then
13:14:47Araq var p: pointer
13:14:49kokozedmanI was trying hashData(addr x, sizeof(CStruct)) but got 'expression has no address'
13:15:07Araq {.emit: "`p` = &`x`;.}
13:15:17Araq hashData(p, size)
13:15:35kokozedmanAraq: well, I'm new to that construct ... when did that happen?
13:15:55Araqit's been there since forever but we discourage its usage
13:16:24kokozedmanhmm... hence it's not in the manual
13:16:43Araqno, it's in nimc.html instead
13:16:59Araqthe manual doesn't list every pragma, for better or worse
13:17:13kokozedmanah, ok
13:17:33*vendethiel joined #nim
13:18:17*meanfish joined #nim
13:19:23ramneswhere is the source code of nim-lang.org homepage?
13:19:29ramnescause © 2014
13:20:37*bjz joined #nim
13:20:39Araq$nim/tools/website.tmpl
13:20:59Araqand yes, I know it's horrible, but I had to hack it together
13:21:22ramneslol Araq :D
13:22:17Araqramnes: the content (except the snippets) is in web/*.txt though
13:23:37ramnes^M everywhere, argh
13:24:07Araqthat's just your editor though. might want to get one that was released after 1940.
13:26:46ramneswell, not my fault if there is two differents line ending styles
13:27:12Araqit's your fault when you even notice :P
13:27:56ramnesI'm using a Unix-like OS, so I stick with Unix style :)
13:28:17Araqbtw it was Unix which introduced the alternative line ending style
13:29:03Araqthey couldn't abstract over \n. Or maybe they didn't want to.
13:31:25*ahc joined #nim
13:33:55*meanfish quit (Ping timeout: 244 seconds)
13:37:00Araqdef-: I'd prefer if you work on idetools though. MUCH more important than a REPL.
13:39:26*vendethiel quit (Ping timeout: 250 seconds)
13:41:40*bjz quit (Read error: Connection reset by peer)
13:44:32*bjz joined #nim
13:48:08ekarlso-if anyone has some webdesign experience I would like some help with the packages stuff :)
13:48:37*_meanfish joined #nim
13:51:15*vendethiel joined #nim
13:54:02*bjz quit (Ping timeout: 245 seconds)
13:57:23*minciue joined #nim
14:02:34*irrequietus joined #nim
14:06:12ramnesAraq: about line endings, I don't care about what line ending should be use, but it should be consistent
14:06:26ramnesright now two differents styles are in the same file
14:06:39ramnesit's ugly as hell
14:06:57Araqso fix it in your PR
14:07:11ramnesrecursively on the whole repo?
14:07:26Araqno, just for the file you touch
14:07:32ramnesalright
14:07:58Araqalso, things like readme.txt should have windows line endings for the windows users who open with notepad
14:08:43Araqalso I don't consider things "ugly" that I don't even see ...
14:09:52ramneswell, those line endings can break things on Unix systems
14:09:58ramnesso I prefere seeing them :)
14:10:23ramnesjust try a bash script that start with a shebang like #!/bin/bash^M
14:10:39Araqthat's just a bash bug
14:11:49ramneslulz
14:11:52def-Araq: I don't know, I've never used an IDE. Don't even know what idetools does
14:15:48Araqyou never used an IDE? o.O
14:16:07ekarlso-Araq: does aporia work with trunk nim ?
14:16:21ramnesAraq: I've never neither
14:16:32Araqthat implies they didn't make you program Java with Eclipse
14:16:37ramnesI mean, emacs do more than any so-called IDE
14:16:51ramnesI used emacs for java
14:17:00Araqlol
14:17:00ramneseven for android java
14:17:48Araqwell vim with plugins and emacs do count as IDEs for me
14:18:11Araqdef-: what editor do you use?
14:18:25ramnesI don't see the point of using an IDE that needs gigs of RAM and using a mouse when you can do everything without leaving your keyboard, without X, and with less memory
14:18:43Araqchances are ... we have a plugin for it and its idetools is broken for it
14:18:47*nickles joined #nim
14:19:09def-Araq: vim. and for big projects ctags plugin to jump to definition
14:19:35Araqdef-: I'm sure zahary has a vim plugin that uses idetools
14:19:42ramnesAraq: do you want 2014 - 2015 as © in all your headers, or just 2015, or I don't touch it?
14:19:59Araqramnes: just 2015
14:20:41*jez0990_ quit (Quit: No Ping reply in 180 seconds.)
14:22:09nicklesAre there any considerations to implement a static dictionary type like in Perl (i.e. not being dependent on {..}.toTable)?
14:22:33*jez0990 joined #nim
14:23:46ramnesso many trailing whitespaces in the code also
14:24:24ramnesbut "we don't see it so we don't care" ®
14:24:25ramnes:p
14:24:55*hasenj quit (Quit: hasenj)
14:26:38*bjz joined #nim
14:26:45*gmpreussner joined #nim
14:30:52ekarlso-flaviu: sorry for the delay ;)
14:32:08ramnesAraq: there you go https://github.com/Araq/Nim/pull/1889
14:33:23*willwillson quit (Ping timeout: 240 seconds)
14:33:29*Matthias247 quit (Read error: Connection reset by peer)
14:34:17*arekzb joined #nim
14:34:47nicklesAraq: Are there any considerations to implement a static dictionary type like in Perl (i.e. not being dependent on {..}.toTable)?
14:35:47Araqnickles: no. lots of thought was put into this current design
14:37:52Araqnickles: but of course, if you come up with a proposal that we like better, we will consider it
14:38:22ramnesalso Araq, you should fetch/rebase instead of merging from origin to your repo, it would avoid useless commits
14:38:32nicklesAraq: When is the conversion with toTable done - at run time?
14:39:28Araqnickles: yes but in the future not necessarily
14:40:57*nickles quit (Quit: Page closed)
14:44:01ekarlso-Araq: does a proc need to have a return type ?
14:45:07Araqekarlso-: no, and I wish I knew why people write ': void' everywhere, so pointless
14:45:28ekarlso-Araq: so proc foo(): ?
14:45:48ekarlso-ehm : > =
14:45:52gmpreussnerekarlso-: no colon
14:45:52gmpreussnerproc foo() = ...
14:48:57*gkoller joined #nim
14:50:44*Varriount|Mobile joined #nim
14:52:05*bjz quit (Read error: Connection reset by peer)
14:52:42ekarlso-So for any web api folks here
14:54:32ekarlso-when creating a package in the packages api, a License is stored in the db (like MIT, Apache etc), when posting to the api should the license be referenced as {"license": "MIT"} or {"license_id": 1} ?
14:54:32ekarlso-from the single page app a dropdown is shown, u select the license and it doesn't matter anyways
14:55:15Araqekarlso-: don't expose License ids
14:55:54ekarlso-Araq: juist names ? ^
14:56:05Araqekarlso-: yeah
14:56:18ekarlso-I guess I can just make the license name the ID instead since it should be unique
14:56:36ekarlso-like here: http://licenses.opendefinition.org/licenses/groups/all.json
14:59:20MyMindwhich is the oldest C that needs Nim in order to compile?
15:01:13*vendethiel quit (Ping timeout: 265 seconds)
15:01:35ekarlso-Does anyone have a preference on a max package name lengtH?
15:04:45*dyu quit (Quit: Leaving)
15:04:56*vendethiel joined #nim
15:05:03*dyu joined #nim
15:06:24*bjz joined #nim
15:07:13EXetoC64?
15:09:16AraqMyMind: nobody knows
15:09:58MyMindI have an old SGI around and I was wondering if it would compile on IRIX
15:11:32*gkoller quit (Quit: Page closed)
15:13:21dom96ekarlso-: Please make sure you disallow the @ character in package names.
15:14:42Araqhi dom96
15:14:54dom96hey Araq
15:15:04dom96What's up?
15:15:12*ahc quit (Ping timeout: 250 seconds)
15:15:18ekarlso-god illegal storage access is so annoying...
15:15:22ekarlso-is there any way to get where it blows ?
15:15:39Araqekarlso-: I always get a stack trace
15:15:57Araqdom96: having fun teaching c2nim about NEP1
15:16:56*jpoirier quit (Quit: Leaving)
15:17:54ekarlso-sqlite..
15:18:05ekarlso-always forgetting the fk pragma
15:18:27Araqekarlso-: looked at db_sqlite, you should use "" intead of nil for now
15:19:07ekarlso-Araq: yeah, but that's not the same effect -,,-
15:19:12ekarlso-and it's the same for mysql too :D
15:19:30Araqfor mysql it should work
15:19:39dom96Araq: Cool.
15:19:59dom96I need to start studying for my exams unfortunately.
15:20:07dom96But after them i'll have like a week off :)
15:20:40dom96bbl
15:21:17*saml joined #nim
15:21:28ekarlso-Araq: I was using db_mysql before sqlite (someone in here nudged me off of it) and I think it didn't
15:21:34ekarlso-Araq: never the less I can verify that in a bit
15:22:32*bjz quit (Read error: Connection reset by peer)
15:22:56*bjz joined #nim
15:26:53*bjz quit (Max SendQ exceeded)
15:27:34*vendethiel quit (Ping timeout: 255 seconds)
15:27:41*bjz joined #nim
15:29:56*eigenlicht joined #nim
15:31:29*gokr joined #nim
15:31:44ekarlso-dom96: why never allow @ ?
15:31:44ekarlso-:D
15:33:02dom96ekarlso-: Because that's how you specify versions when installing packages in nimble: nimble install [email protected]
15:33:08dom96bbl for real
15:37:23*vendethiel joined #nim
15:43:50*BitPuffin joined #nim
15:45:25*z1y quit (Ping timeout: 256 seconds)
15:48:24MyMindAraq: the link to twitter is not correct http://nim-lang.org/community.html
15:48:57*rpag joined #nim
15:49:02Araqwhat's the correct link?
15:49:09*rpag quit (Remote host closed the connection)
15:49:30MyMindnim_lang
15:49:42MyMindhttps://twitter.com/nim_lang
15:50:10MyMindis @nimlang is an 84 old man with a single tweet
15:50:29MyMindhttps://twitter.com/nimlang
15:51:34*kapil__ quit (Quit: Connection closed for inactivity)
15:53:27*gokr_ quit (Ping timeout: 264 seconds)
15:53:47*gokr_ joined #nim
15:54:39*bjz quit (Ping timeout: 264 seconds)
15:57:23*darkf quit (Quit: Leaving)
15:58:58*vendethiel quit (Ping timeout: 250 seconds)
16:01:06*bjz joined #nim
16:02:19*gokr_ quit (Ping timeout: 245 seconds)
16:02:49*ahc joined #nim
16:03:03*gokr_ joined #nim
16:06:24*goobles joined #nim
16:12:07*hasenj joined #nim
16:13:53*bjz quit (Ping timeout: 240 seconds)
16:22:00*repax_ quit (Quit: repax_)
16:23:39EXetoC`ref` broke at some point?
16:25:14EXetoCnm
16:31:20*bjz joined #nim
16:34:23*jpoirier joined #nim
16:35:04EXetoCI mean, nvm
16:38:07BlaXpiritMyMind, 87 probably by now :|
16:38:43*jefus__ joined #nim
16:39:13*Jesin quit (Read error: Connection reset by peer)
16:39:47*vendethiel joined #nim
16:41:29*Var|Mobile joined #nim
16:42:39*jefus_ quit (Ping timeout: 256 seconds)
16:42:49*bjz quit (Read error: Connection reset by peer)
16:43:50*willwillson joined #nim
16:45:30*Jesin joined #nim
16:45:37*Varriount|Mobile quit (Ping timeout: 265 seconds)
16:52:16*bjz joined #nim
16:52:18*nande joined #nim
16:55:22*repax joined #nim
17:01:13*infrashortfoo quit (Remote host closed the connection)
17:22:27*infrashortfoo joined #nim
17:22:39*bjz quit (Read error: Connection reset by peer)
17:22:47*bjz_ joined #nim
17:25:22*yglukhov____ quit (Ping timeout: 240 seconds)
17:33:30BlaXpiritAt which points whould I change package's version in *.nimble in git repository?
17:33:39*Matthias247 joined #nim
17:34:00BlaXpiritIt seems strange to keep the old version in commits after a release
17:34:10BlaXpiritand changing it right away could be harmful too
17:34:26BlaXpiritNimble does not accept "x.x.x-dev" versions or any other such business
17:34:52BlaXpiritwhich is an issue actually. the whole SemVer thing is important to support
17:39:14BlaXpiriti've heard that tags can be used, but the question is still valid
17:40:45BlaXpiritwell... nimble itself seems to change version simultaneously to tag, which seems like the only good option
17:43:23*dyu quit (Quit: Leaving)
17:54:01*bjz_ quit (Read error: Connection reset by peer)
17:56:41minciueBlaXpirit: I think changing the version in sync with new tag is the way to go
17:56:54*bjz joined #nim
17:57:59minciuehyphenation is supposed to be used for “pre release” stuff (generally the only ones I’ve seen are alpha, beta or pre)
17:58:00*Sphax quit (Quit: ZZZZZzzzzz)
17:58:37ldleworkWhen you have a generic type, can you provide procs for discriminator specific types?
18:01:07BlaXpiritldlework, yes
18:01:40BlaXpirittype B* = A[int] ## lol
18:01:54ldleworkBlaXpirit: ah so you can't define it without creating an alias?
18:02:09BlaXpiritoh you said procs
18:02:14BlaXpiriti read "docs" -_-
18:02:22BlaXpiritthen probably no, you can't
18:02:50dtscodelove it when nim cant find my .cfg file
18:03:12ldleworkBlaXpirit: well it seems like your solution would work for procs too
18:03:19ldleworkseems like it'd be okay to define a proc for B, there
18:03:42ldleworkactually, I think you can specify procs for things like seq[int]
18:03:49ldleworkso I think the answer is yes, you can
18:03:55BlaXpiriti definitely misunderstood a lot here...
18:04:25ldleworksorry
18:04:49BlaXpiritproc test(x: A[int]) = discard totally works
18:04:57ldleworkyeah
18:04:58ldleworkthanks :)
18:06:30*jefus__ is now known as jefus
18:06:38BlaXpiritor does it
18:06:49BlaXpirityes... lol
18:07:05ldleworklol
18:07:16BlaXpiritno
18:08:02EXetoC?
18:08:11BlaXpiritldlework, https://bpaste.net/show/7af77815c315
18:08:56ldleworklame
18:08:57EXetoCwhy did you say no?
18:09:05BlaXpiritEXetoC, see link
18:09:20BlaXpiritand initially I said no because I misread and was confused
18:09:38EXetoCok
18:09:41EXetoCldlework: lame?
18:09:46BlaXpiritwell isn't it?
18:10:29BlaXpiritthat 2nd proc is never called, it seems
18:10:41kokozedmanfor the tables, what is the difference between paris and mpairs in terms? I know it is mentioned that the mpairs returns a modifiable, is that related to the original stored object in the table?
18:11:07EXetoCright
18:11:09kokozedmanI'd like to have a loop, and modify the stored element during the loop
18:12:52ldleworkEXetoC: do you understand why its lame?
18:12:55EXetoCkokozedman: by iterating over the indices, for now
18:13:19EXetoCldlework: yes. it works in simpler cases
18:13:40ldleworkEXetoC: simpler than that?
18:13:40kokozedmanEXetoC: oh, I see ... so I got it all wrong then
18:14:33*bjz quit (Ping timeout: 265 seconds)
18:15:14EXetoCkokozedman: I think we'll get mitems iterators at some point
18:16:03EXetoCldlework: yes, when the parameter is just 'T'
18:17:28dtscodehey dom96 i upgraded my nim compiler, and now when i run nimbus, it says error 404: not found when creating gists
18:17:46BlaXpiritEXetoC, you think it's worth an issue?
18:18:00EXetoCof type 'T' that is, rather than X[T] or something like that
18:18:02EXetoCBlaXpirit: I think so
18:18:11BlaXpiritwill do
18:19:14kokozedmanEXetoC: I'm not following ... let's say I want to modify the stored value on the table, let's say table[key] = object; and object has different properties: is modifying the object yeilded by table.mvalues going to modify the reference in the table? in other words, is the entries stored in the table and the entries returned by mvalues the same?
18:21:08kokozedmanit seems to me, that mvalues return a plain var (in situation where one needs a var instead of a normal variable)
18:21:24*bjz joined #nim
18:21:36kokozedmanthat var seems to be a value copied from the table, not a reference
18:21:41kokozedmanam I right?
18:22:48*gour_ joined #nim
18:23:04*Var|Mobile quit (Ping timeout: 255 seconds)
18:26:04*gour quit (Ping timeout: 245 seconds)
18:31:12ekarlso-flaviu: u up ?
18:34:12*yglukhov____ joined #nim
18:35:51TrustableHi all, can someone explain the compiler warning "use RootObj instead; TObject is deprecated [Deprecated]" ?
18:40:36BlaXpiritTrustable, means exactly that
18:40:45BlaXpiritreplace TObject in your code with RootObj
18:41:12BlaXpiritbecause the T s are going away
18:41:37Trustableok, works, then the documentation is outdated
18:41:53Trustablethanks BlaXpirit
18:42:02ldleworkTrustable: please help and send a pull request for the docs
18:42:21BlaXpirittobject appears once in the manual
18:42:22*goobles quit (Ping timeout: 246 seconds)
18:42:44ldleworkeasy fix then
18:42:53BlaXpiritand many times in tutorial :<
18:43:04BlaXpiritjust 6 in tut2
18:44:03EXetoCkokozedman: it returns a var, so it shouldn't copy
18:44:29EXetoCset it to some value and see what happens
18:46:13*rpag joined #nim
18:48:12TrustableThe documentation in the repo is already updated, but not deployed to the website. I think the website needs updates also between releases.
18:52:34*bjz quit (Read error: Connection reset by peer)
18:53:07*adam_s joined #nim
19:01:08*bjz joined #nim
19:06:58*adam_s quit (Quit: Leaving)
19:13:41onionhammeranyone know of a way to generate a unique identifier?
19:13:47onionhammerwithin a macro
19:15:04*bjz quit (Ping timeout: 264 seconds)
19:15:11BlaXpiritthat... is interesting
19:15:17BlaXpiritand should be part of the language
19:15:42onionhammeri dont mean a GUID, i mean generate a unique ident name
19:15:58Araqonionhammer: gensym?
19:16:15onionhammerAraq can you give an example? I tried it but couldnt figure out how to actually *use* it
19:16:32BlaXpiritcooool stuff
19:16:32onionhammeri.e. what I want is var myIdent = genSym()
19:16:44onionhammerand then I can use myIdent as a var name
19:16:47onionhammeror something
19:17:48Araqit works like you wrote
19:18:00*rpag quit (Quit: Leaving)
19:19:46onionhammerError: internal error: (filename: sem.nim, line: 163)
19:20:13onionhammerhow do i get the name genSym generates?
19:20:45Araqonionhammer: dude pass the proper symbol kind then
19:20:52Araqit defaults to 'let'
19:21:07Araq(but yeah, we should improve the error message)
19:21:22Araqonionhammer: the name is not of your business
19:21:40onionhammerha, okay. guess I cant use it in a parseExpr then
19:28:15jpoirierAnyone have git alias' for fetching origin/upstream pull requests? I seem to have the format wrong.
19:28:57jpoirierNever mind; got it working,
19:29:52onionhammeraraq is PNimrodNode ever getting renamed?
19:30:11*bjz joined #nim
19:30:51*gour_ is now known as gour
19:30:55Araqonionhammer: sure why not.
19:33:10*Sergio965 joined #nim
19:35:27onionhammerAraq got it working, thanks
19:42:50onionhammerso now my 'new' macro is essentially as efficient as using MyRefType
19:44:35*bjz quit (Read error: Connection reset by peer)
19:54:47Araqonionhammer: that doesn't mean I like it :P
19:54:55*bjz joined #nim
19:54:59onionhammerlol
19:55:01onionhammerwhats wrong with it?
19:55:21onionhammerbelieve me - I knew you wouldnt like it, but that doesnt mean I understand why
19:55:31onionhammerbecause it looks too much like C++? :P
19:56:23*gsingh93 joined #nim
19:58:07ekarlso-.eval let i = ""
19:58:14ekarlso-that bot is always dead -,,-
19:58:22*askatasuna joined #nim
19:59:22*askatasuna quit (Client Quit)
20:00:08*BlaXpirit_ joined #nim
20:00:11*askatasuna joined #nim
20:03:39*BlaXpirit quit (Ping timeout: 264 seconds)
20:08:56samlhey should i use release? master? devel branch?
20:22:00BlaXpirit_master works for me
20:24:01*bjz quit (Read error: Connection reset by peer)
20:27:15Araqsaml: if you work on a nimble package, ensure it works with the latest release please
20:27:45samlah i see
20:34:57*bjz joined #nim
20:36:04*jpoirier_ joined #nim
20:36:21*jpoirier_ quit (Client Quit)
20:37:07flaviuekarlso-: I'm here now.
20:39:06*Mat4 joined #nim
20:39:13Mat4hello
20:43:19*bjz quit (Read error: Connection reset by peer)
20:44:33*gmpreussner|work joined #nim
20:44:49gmpreussner|workis there a way to recover/reset the password on the forums?
20:45:00EXetoCno
20:45:02samldef-, are you gonna implement sort? https://github.com/def-/nimutils/
20:46:24Araqgmpreussner|work: unfortunately not. PRs welcome ...
20:48:15def-saml: probably not, i was just playing around a bit
20:50:16gmpreussner|workAraq: ok, i'll have to take a look then, coz otherwise i can't log in anymore :)
20:51:16gmpreussner|workthere is a reply to my Kate syntax highlighting post. someone posted a Github repo that has a script that is much more advanced than mine. we should put that one on the wiki instead.
20:51:29Araqwell maybe dom96 can change the db for you
20:51:29*gokr_ quit (Ping timeout: 245 seconds)
20:52:01*gokr_ joined #nim
20:58:15*VinceAddons quit (Ping timeout: 244 seconds)
20:58:52gokr_Vidare.
20:59:11gokr_oops
20:59:36*VinceAddons joined #nim
21:03:12Mat4Araq: ping
21:03:25*Mat4 is now known as Mat4|work
21:05:14AraqMat4|work: pong
21:05:29*ahc quit (Quit: Leaving)
21:07:12Mat4|workI'm writing on a little documentation about cross compilation for AVR and Propeller MCU's. You will find it on my Git repro on sunday
21:07:23renesacAraq: my template trick for overriding the operators precedence don't work anymore for >>
21:07:27renesacT_T
21:07:39renesachttps://gist.github.com/ReneSac/ff983a857dd56209d3bb <-- remember this?
21:07:49Araqon sunday? I don't even plan to live that long
21:07:51*Sergio965 quit (Ping timeout: 256 seconds)
21:09:21Mat4|work*lol*
21:10:01Araqrenesac: well? what should I do?
21:10:08*pdeuchler joined #nim
21:10:44*bjz joined #nim
21:11:12*Hakaslak joined #nim
21:11:14*Hakaslak quit (Remote host closed the connection)
21:11:54pdeuchlerHey guys, quick n00b question here… does nim support multiple returns? i.e. can I return more than one thing without putting things into an object/array/sequence?
21:12:24Araqpdeuchler: return a tuple
21:13:04pdeuchlerAraq: cool, thanks!
21:14:08renesacAraq: it would be good to have a way to keep using those operators...
21:14:44renesacthe strong space helps, as well as parenthesis
21:15:01renesacbut the precedence is very wrong
21:15:21renesacbecause the new arrow operators
21:15:34Araqrenesac: well you should have been here when we discussed this language change
21:15:42renesacI really think those classic C operators are better for bitwise
21:15:45renesacyeah, I know
21:16:21dtscodedom96, ping
21:18:18Araqrenesac: we can tweak the "arrow like" rule slightly for you
21:18:24renesacAraq: do you have any interest in incorporating any of those operators in the language?
21:18:43Araqno but it sux they don't work anymore for you
21:19:23Araqarrow like could be "last char is '>' and the char before that is ~ or = or -"
21:19:57Araqthen ~> and => and -> are arrows. and eg *> and >> is not
21:20:23Araqa bit arbitrary but these rules are already arbitrary to allow for += etc.
21:20:25renesac~> ? never seen that
21:20:42samlis merge sort hard?
21:20:44renesacis it already used?
21:21:01Araqno, but it's intuitively obvious that it should be an arrow :P
21:21:36Araqsaml: the stdlib's sort is a merge sort
21:21:50renesacnow I forgot what was the problem with '<<='
21:22:37*bjz quit (Read error: Connection reset by peer)
21:22:38samlhttps://github.com/Araq/Nim/blob/devel/lib/stdlib.nimble ?
21:23:09Araqsaml: that's just a dummy package
21:23:45samlhttps://github.com/Araq/Nim/blob/master/lib/pure/algorithm.nim#L151 oh this
21:24:30samli wanna sort (lines of) large files that don't fit in memory
21:25:06Araqsaml: forget about the stdlib then, but you can perhaps look at the algorithm
21:25:22samlis there lazy list?
21:25:59Araqno and even if there were, lists are not what you want
21:27:48Araqin fact, you should look for existing software, it's a nasty problem and if it doesn't fit in memory performance is an issue too
21:29:10AraqI would import the data into a database and use "order by" in the SQL query ;-)
21:30:20samlyah just want to learn to code in 2015
21:30:33samli rarely get to implement sort,hashtable, tree.. etc
21:30:40samlso when i go to job interviews, i fail
21:30:51*bjz joined #nim
21:36:30Araqsaml: ok, but then you shouldn't use the stdlib either.
21:36:44samlyup
21:39:22renesacsaml: http://sortbenchmark.org/ <-- sorting large than memory records remember me of this
21:39:27*bjz quit (Ping timeout: 245 seconds)
21:40:09renesacthe "daytona" category says the sort code must be general purpose, so maybe it can be applied to your problem too
21:42:23*infrashortfoo quit (Remote host closed the connection)
21:42:33Araqrenesac: how many Nimble packages did you contribute?
21:43:59renesaczero
21:43:59renesac:/
21:44:10renesacthe benchmark package is not on nimble index yet
21:45:04renesacas I was going to change away from cpu_time(), but never didt
21:45:44Araqwell perhaps I should request Nimble packages in exchange for language changes ;-)
21:46:05renesac^^'
21:48:23Araqrenesac: change parser.nim line 197 and line 210 and see what suits you
21:48:46Araqand then make a PR with the change that also updates the docs and news section
21:49:24renesacok, I will see
21:49:54AraqI'll give feedback and ultimately will accept it
21:51:45renesacI don't want a too halfassed implementation of those operators, so I want that it as a whole works well
21:51:54renesacI'm not really sure if all the precedences are right
21:52:00renesacI need to test it
21:52:57renesacand mantain it parallel with the evolution of the language is also a bit cumbersome
21:53:26renesacthere is now a pull request in math.nim to use ^ as pow, that conflicts with my use as 'xor'
21:53:32*_meanfish quit (Ping timeout: 244 seconds)
21:53:55renesacand those things tend to accumulate
21:54:07renesacat least it is in a separate module, not on system
21:54:40Araqwell neither will end up in system
21:55:01Araqso IMO it's fine. import bithacks # ok ^ means xor
21:55:09Araqimport math # ok, ^ means pow
21:55:36renesacby the way: Binary operators whose first character is ^ or its last character is > are right-associative, all other binary operators are left-associative.
21:55:49renesacfrom the manual
21:56:10Araqthat doesn't sound right
21:56:37renesacException: The single "greater than" > operator is left-associative too. Operators ending in > but longer than a single character are called arrow like.
21:56:54Araqah, then it's correct
21:57:34renesacwill ^ behave correctly for pow then?
21:58:05Araqyes, that's the intend behind this rule
21:58:54Araqmaybe xor should be ^^ and left associative ...
22:00:35renesachum
22:01:01renesacI will see if my template hack alone solves this
22:01:21renesacbut right
22:01:43Araqwell we can change that too. x^2^3 is not really common is it? it grows too fast for computers
22:02:29renesacfor float it may be used
22:03:25renesacand maybe with bignums
22:03:40Araqbtw I don't get your template hack. you cannot change precedence with templates
22:03:53Araqthey don't use textual substitution
22:03:56renesacyeah, I will check if that really works
22:07:09*gour quit (Remote host closed the connection)
22:10:26*BitPuffin quit (Ping timeout: 264 seconds)
22:13:11*gokr_ quit (Remote host closed the connection)
22:13:28*gokr_ joined #nim
22:16:18*hasenj quit (Quit: hasenj)
22:28:25*goobles joined #nim
22:28:42*rpag joined #nim
22:29:01*rpag quit (Client Quit)
22:31:58*Mat4|work left #nim (#nim)
22:33:45saml.eval let doc = parseJson("""{"a":{"b":[{"c":1}]},"d":2}"""); $doc["a"].fields["b"].elems[0]["c"].num
22:36:13*Mimbus joined #nim
22:36:18flaviusaml: Try again.
22:36:25saml.eval let doc = parseJson("""{"a":{"b":[{"c":1}]},"d":2}"""); $doc["a"].fields["b"].elems[0]["c"].num
22:36:28Mimbussaml: eval.nim(3, 10) Error: undeclared identifier: 'parseJson'
22:36:38saml.eval import json; let doc = parseJson("""{"a":{"b":[{"c":1}]},"d":2}"""); $doc["a"].fields["b"].elems[0]["c"].num
22:36:41Mimbussaml: eval.nim(5, 16) Error: type mismatch: got (seq[tuple[key: string, val: JsonNode]], string)
22:39:33samlwhat's good example of json de/serialization?
22:40:09EXetoC.eval discard newSeq[int]()[0]
22:40:15MimbusEXetoC: Error: unhandled exception: index out of bounds [IndexError]
22:40:23flaviusaml: Try out the marshal module: http://nim-lang.org/marshal.html
22:40:43EXetoCoh yeah that doesn't even segfault. such modern. much wow
22:41:16flaviuEXetoC: It does with -d:release
22:41:49EXetoCright
22:44:40renesachttps://gist.github.com/ReneSac/eb7c26e27ab1d3901df1 <-- bug with strongSpaces?
22:45:07renesacif I remove it, it works as it should
22:47:39EXetoCso, 1 + 16 shl (1 == 1 + (16 shl 1))?
22:47:57Araqrenesac: report it. I'm sure it works according to what I had in mind at the time, but it's weird
22:48:29Araqit's good that at least *somebody* out there uses this feature :-)
22:48:33renesacEXetoC: or the oposite, the shl seems to bind weaker
22:49:16*askatasuna quit (Ping timeout: 264 seconds)
22:50:27renesacAraq: one more reason for you to drop those ridiculous "xor" and "shl" operators!
22:50:28renesac;)
22:50:49*infrashortfoo joined #nim
22:50:50renesacthey really don't mix well with strong spaces
22:51:30renesacI mean, even fixing that, they can't get advantage with strong spaces
22:51:42Araqrenesac: I agree, but when you introduce >> people also expect >>= and then new integer like types need to support all this low level stuff
22:52:35renesacwell, they can not implement it
22:52:41renesacwhat integer like types you mean?
22:52:44renesacbitgnums?
22:53:12Araqyes, or fractions or quaternions or ...
22:53:32renesacI see many small bignum libraries that don't implement even shifting
22:54:01*flaviu likes `shr`
22:54:14renesacand what is the diference to the atual situation?
22:54:30ldleworkflaviu: +1
22:54:36Araqthe actual situation is "wtf ok this works differently from C"
22:54:37*renesac likes >>
22:55:06gmpreussner+1 for shr :)
22:55:24renesacmay I ask why you preffer shr instead of >>?
22:55:26*infrashortfoo quit (Ping timeout: 264 seconds)
22:55:34renesacyou guys
22:56:05gmpreussnerSHift Right... vs. greater greater than :)
22:56:21renesacpersonally, the difference between 'shl' and 'shr' is much more difficult to spot than between ">>" and "<<"
22:57:04gmpreussnerdepends on what you're used to
22:57:13renesacand I'm used to those operators from C (and from almost everywhere that refers to them)
22:57:25Araqrenesac: tbh I often have to look at >> and << and *think* in what direction they point to
22:57:27renesacgmpreussner: where you got used to shr?
22:57:43gmpreussnerassembler for example
22:57:53ldleworkIt isn't about spotting the difference
22:57:53Araqand then I can decide whether it's multiplication or division like
22:57:53renesacright
22:58:00ldleworkIts about guessing the semantic of the operator at a glance
22:58:13ldleworkInstead of having to remember if Nim's >> is a bitshift operator or some other crazy thing
22:58:43renesacwell, I argue that 'shr' is as cryptic as '>>'
22:58:54renesacand the latter at least has a graphical representation of what it does
22:58:58Araqbut it's not for me, read what I wrote
22:58:59renesac(moves things to the right)
22:59:04*rpag joined #nim
22:59:14*rpag quit (Remote host closed the connection)
22:59:14Araqit's the opposite of "graphical"
22:59:41gmpreussnerx << y means 'push y into x' :)
22:59:49AraqI need to translate it back into *words*
22:59:57renesacwell, I don't have this problem...
23:00:16gmpreussnerx << could also mean 'x is A LOT smaller than y'
23:00:18ldleworkrenesac: its only cryptic if you have never ever used Nim before
23:00:20EXetoCI see something pointing towards the right side and think, "right" :p
23:00:24BlaXpirit_operators are fine -_-
23:00:26EXetoCbut to each his own
23:00:36flaviuYeah, I use my hands for shr and shl
23:00:44flaviuI can't remember which way is left and which is right
23:00:48EXetoCbut it's not so obvious with C++ streams
23:00:49renesacand english is not my native language, so english words aren't so immediate for my brain either
23:00:51EXetoCor is it?
23:00:53Araqrenesac: well it's subjective and I got used to it
23:00:55renesac(I know it is not yors)
23:01:23ldleworkrenesac: do you not call >> the "bit shift right operator"
23:01:30EXetoCI like the idea of not having to press shift all the time
23:01:34renesacgmpreussner: not if applied between two integers!
23:01:56flaviuEXetoC: How often do you use bit shifts anyway?
23:02:07EXetoCbut maybe I need a proper programming keyboard :p
23:02:10renesacldlework: but you could say the same for ">>"
23:02:11EXetoCflaviu: I meant in general
23:02:24ldleworkrenesac: say the same what?
23:03:01renesac"its only cryptic if you have never ever used Nim before" <-- if the default was the opposite
23:03:06ldleworkrenesac: if you're saying that >> is equally lexcially informative as 'shr' as to conveying "shift right" then you're getting a little cooky
23:03:08gmpreussnerrenesac: i'm just messing with you :) ldlework had the right argument. it comes down to discoverability. for example, i like your little bit hacks library, but it is not clear by looking at it what 'x *>= y' does. i'd have to memorize all those cryptic symbol combinations.
23:03:18flaviuldlework: no personal attacks please
23:03:30ldleworkthen your argument is getting a little cooky?
23:03:46renesacgmpreussner: yeah, that *>= was supposed to be >>=
23:04:01renesacbut with "shr" you don't have that problem, of course
23:04:10renesacbecause you can't have an equivalent operator!
23:04:13renesac:P
23:04:30ldlework?
23:04:33renesac(another downside of keywords for those operators)
23:04:39ldleworkyou'd just have another keyword
23:04:39renesac'shl='
23:04:51renesacand=?
23:04:56renesacxor=?
23:05:08gmpreussnerseems legit
23:05:10ldleworkyeah
23:05:11gmpreussneris that possible?
23:05:24renesacnim don't have it
23:05:24ldleworkgmpreussner: I think those are special in nim
23:05:37renesacyou can't define it on your own either
23:05:46EXetoCyou would then have to do x.xor = 3, right?
23:05:50renesacit would need to be special cased on the compiler, as the current bitwise operators
23:05:55EXetoChad it been working. I don't know if it does
23:06:01EXetoCguess not
23:06:29gmpreussneri wonder if op= for binary operators should automatically be supported as 'arg1 = arg1 op arg2'
23:06:29renesacEXetoC: I don't follow you
23:07:06EXetoCrenesac: `foo=` means you can do bar.foo = baz
23:07:07ldleworkgmpreussner: but how do you invoke it
23:07:27*repax quit (Quit: repax)
23:07:39gmpreussnerah, you got me :)
23:07:41renesacEXetoC: yeah, it has a different meaning
23:07:55ldleworkEXetoC: I sometimes feel that Nim should implement some other way to support property accessors
23:08:08gmpreussnerthen perhaps we need to enforce a one character white space between tokens
23:08:11ldleworksince it seems to step all over the operator overloading as we see
23:08:20gmpreussnerso it's either op = 3 or op= 3
23:08:23gmpreussner:)
23:08:29EXetoC{.property.}? but there was talk of making it even more convenient
23:08:30ldleworkgmpreussner: get out.
23:08:31EXetoCa la C#
23:08:38gmpreussnerhaha
23:08:46EXetoCor something
23:08:58flaviuAssignment operators are coming "soon", so just wait for those?
23:09:14EXetoCbut just a brief mention, some time ago
23:09:33renesacflaviu: don't you mean overloading the '=' operator?
23:09:36ldleworkgmpreussner: :)
23:09:52EXetoCbut that's for "x = y"
23:11:02flaviurenesac: Yes
23:11:30renesachow is that relevant to the discussion^?
23:13:06flaviuEXetoC: So what about x = +, y shr 123
23:14:04renesacwow, shr 123
23:14:09renesacXD
23:14:23renesacI don't understand your line of code
23:14:28flaviurenesac: I have HP's new memsister computer
23:14:39flaviuso my ints are arbitrary wide :P
23:14:56flaviurenesac: `=`(x, +, y shr 123)
23:16:08*adam_s joined #nim
23:16:17renesacI'm lost
23:16:46*goobles quit (Ping timeout: 246 seconds)
23:16:56renesac:/
23:17:16flaviutemplate `=`(target, op, expression: expr) = target = target op expression
23:18:35flaviuor something similar, I'm sure that syntax isn't exactly valid.
23:18:40renesacso it would translate to x += y shr 123?
23:18:55flaviuno, to x = x + (y shr 123)
23:19:04dom96dtscode: What's up?
23:19:19renesacisn't it the same?
23:19:57flaviurenesac: yep, it's exactly the same.
23:20:15renesacand what is your point?
23:20:17Araqflaviu: when I brought up a syntax for exactly this feature people weren't excited
23:20:55*gmpreussner quit (*.net *.split)
23:20:56*ramnes quit (*.net *.split)
23:20:56*jh32 quit (*.net *.split)
23:20:56*vegai quit (*.net *.split)
23:20:56*biscarch quit (*.net *.split)
23:20:56*joebo quit (*.net *.split)
23:20:56*stonecolddevin quit (*.net *.split)
23:20:57*Amrykid quit (*.net *.split)
23:20:57*dom96 quit (*.net *.split)
23:20:57*wtw quit (*.net *.split)
23:20:57*valberg quit (*.net *.split)
23:20:57*ldlework quit (*.net *.split)
23:20:57*flyx quit (*.net *.split)
23:20:57*xAndy quit (*.net *.split)
23:20:58*lyro quit (*.net *.split)
23:20:58*Boscop quit (*.net *.split)
23:20:59*phI||Ip quit (*.net *.split)
23:20:59*silven quit (*.net *.split)
23:20:59*skroll3 quit (*.net *.split)
23:20:59*ekarlso- quit (*.net *.split)
23:21:00*betawaffle quit (*.net *.split)
23:21:00*reactormonk quit (*.net *.split)
23:21:00*acidx quit (*.net *.split)
23:21:06*valberg joined #nim
23:21:06*vegai joined #nim
23:21:11renesacI'm not understanding what it adds
23:21:13*stonecolddevin joined #nim
23:21:18BlaXpirit_I just wish that += sometimes, somehow, would translate to x = x +
23:21:20*gmpreussner joined #nim
23:21:27flaviurenesac: Even though they have the same result and expand to the same thing in the C code, there might be confusion with +=..
23:21:31*joebo joined #nim
23:21:33*ldlework joined #nim
23:21:47*Amrykid joined #nim
23:21:53*xAndy joined #nim
23:21:53*xAndy quit (Changing host)
23:21:53*xAndy joined #nim
23:21:57*biscarch joined #nim
23:22:02renesacBlaXpirit_: isn't what it does?
23:22:18renesacwhat confusion?
23:22:25BlaXpirit_maybe I misunderstood something, but last time I tried, += doesn't work if you just define +
23:22:35renesacoh
23:22:38*z3744817276842 joined #nim
23:22:41renesacright
23:22:51*lyro joined #nim
23:22:51*Boscop joined #nim
23:22:51*phI||Ip joined #nim
23:22:51*silven joined #nim
23:22:51*skroll3 joined #nim
23:22:51*ekarlso- joined #nim
23:22:51*betawaffle joined #nim
23:22:51*reactormonk joined #nim
23:22:51*acidx joined #nim
23:23:35renesacwell, it can be fixed in the system, the same way that <= is defined when you define >= (or the oposite)
23:23:38renesacI think
23:23:52Araqyup
23:23:53renesacnot sure if there is a reason not to do it, though
23:24:00BlaXpirit_sure it can, but then you'd modify all other things
23:24:18*dom96 joined #nim
23:24:19renesacfor example?
23:24:21Araqsure there is a reason to not do it: "system.nim is bloated"
23:24:44BlaXpirit_I just think the documentation is "bloated" because I can never find anything there
23:24:49renesacI don't see it as more bloat
23:25:04renesacit will probably shave many lines off system.nim
23:25:30renesacif you delete all the individual += (I'm not sure if there are many)
23:25:34flaviurenesac: I'll just drop it, the more I try to explain it, the more confusing it's bound to get :)
23:25:48BlaXpirit_it would be awesome to have an opt-in, say something like "I want the += and all other such things to work on my type"
23:25:51BlaXpirit_and it doesn't seem crazy
23:25:55BlaXpirit_some pragma, some tag
23:26:06BlaXpirit_and then the thing that is defined in system would work only for that
23:26:09flaviuisn't += a template?
23:26:10AraqBlaXpirit_: that's just a template away
23:26:15renesacyep
23:26:23*ramnes joined #nim
23:27:33ekarlso-should duplicate plackage names be allwoed ?
23:28:05*johnsoft quit (Ping timeout: 244 seconds)
23:28:17*irrequietus quit ()
23:28:21Araqekarlso-: yes. people cannot even come up with unique module names in the *same project*
23:28:33*johnsoft joined #nim
23:28:42flaviuAraq: Java, python solve this probem with namespaces...
23:28:51BlaXpirit_Araq, make sure you're not misunderstanding package names vs module names
23:29:01BlaXpirit_I understood it as nimble packages
23:29:10*[dee] joined #nim
23:29:26Araqflaviu: and Nim dares to bound this to a Nimble package
23:30:30ekarlso-?
23:30:41ekarlso-pypi doesn't allow you I think to register foo and foo
23:30:50flaviuAraq: I don't like it, but do whatever you feel is best.
23:31:09BlaXpirit_Araq, I don't understand what you said about "a template away"
23:31:13*yglukhov_____ joined #nim
23:31:21ekarlso-flaviu: nah, i'l disallow it
23:31:31ekarlso-bad idea anyways to allow nimble to mysql@...
23:31:37ekarlso-and there's two packages for it
23:31:45EXetoCBlaXpirit_: that a template is all you need
23:31:49flaviuUnrelated, I saw http://ericsink.com/entries/fsharp_chasm.html on reddit today. It applies to Nim too.
23:31:54BlaXpirit_well yes, but what kind of template?
23:32:18flaviuBlaXpirit_: template `+=`(lhs, rhs: expr): expr = lhs = lhs + rhs
23:32:30BlaXpirit_flaviu, that's for every single type in the world
23:32:34BlaXpirit_which i don't want
23:32:42*Matthias247 quit (Read error: Connection reset by peer)
23:32:43flaviuBlaXpirit_: Nope, see the "expr" part?
23:32:47BlaXpirit_no
23:32:56BlaXpirit_i mean... i see, but what does that change?
23:32:57flaviu`(lhs, rhs: expr)`
23:33:09flaviuthat means that any possible lhs and rhs can go in there
23:33:19flaviuthere is no type checking done until after expansion.
23:33:54*RushPL quit (Remote host closed the connection)
23:33:56*yglukhov____ quit (Read error: Connection reset by peer)
23:34:03BlaXpirit_okay, but it's still for every type that has `+`
23:34:16renesacyes, what you wanted?
23:34:23BlaXpirit_no
23:34:30BlaXpirit_[:25:47] <BlaXpirit_> it would be awesome to have an opt-in, say something like "I want the += and all other such things to work on my type"
23:34:39flaviu{.borrow.}?
23:34:57EXetoCyes for distinct types
23:35:01renesacwhy you would not want it?
23:35:08Varriountflaviu: Regarding that link, yes, I do think it pertains to Nim.
23:35:12BlaXpirit_look
23:35:15renesacbwt, the += in the system.nim is:
23:35:20renesacproc `+=`*[T: SomeOrdinal|uint|uint64](x: var T, y: T) {.magic: "Inc", noSideEffect.} ## Increments an ordinal
23:35:20BlaXpirit_if I make a library
23:35:28Varriountflaviu: But in our case, who are the 'pragmatists in pain'?
23:35:44BlaXpirit_then I don't want to spam people with += template for everything they do
23:35:59flaviuVarriount: I don't know.
23:36:03BlaXpirit_but I do want it to apply to my types
23:36:07renesacis this magic really important, or the expr template trick can be done for it too?
23:36:08EXetoCI told you what araq meant
23:36:10*RushPL joined #nim
23:36:40flaviuBlaXpirit_: So make a template for the template.
23:36:43EXetoCnvm
23:37:03BlaXpirit_I see "template additive" in docs
23:37:09BlaXpirit_manual*
23:37:27flaviutemplate blah(T: expr): stmt = template `+=`(lhs, rhs: T...
23:37:33AraqBlaXpirit_: yes that gives you the basic idea
23:38:05BlaXpirit_I should've grasped that thing, I've read through it twice :s
23:38:31dom96Araq: what? Package names should be unique.
23:38:34renesacBlaXpirit_: but you are not really spamimg it I think
23:38:39Araqdom96: I wasn't serious
23:39:01dom96...right
23:39:14renesacif it is defined globaly in system.nim, it becomes something expected in the language
23:39:14*Trustable quit (Ping timeout: 264 seconds)
23:39:25flaviuAlso, is it really a good idea to use top-level namespaces for non-official projects?
23:39:27BlaXpirit_renesac, I do not think such a += template is good by default
23:39:35renesacwhy?
23:39:42BlaXpirit_I imagine many people do not want += to work with their type while + does
23:39:46flaviuex, see freenode's #foo and ##foo
23:39:47*renesac is also tryng to think why
23:39:56BlaXpirit_yeah, I actually can't come up with an example
23:40:09BlaXpirit_so maybe it's just a good thing in general
23:40:16BlaXpirit_at least if it can be overridden
23:40:31Araqthat has to be possible for efficiency
23:40:38BlaXpirit_Python does it, anyway
23:40:48MyMindis possible to tell compiler to use openmp?
23:41:32renesacAraq: the efficency answer as for us?
23:41:48BlaXpirit_renesac, huh
23:41:58AraqMyMind: use the || iterator but beware
23:42:40Araqthe compiler isn't really aware of the || semantics, so you cannot even 'echo' unless you call setupForeignThreadGc in the for loop
23:42:57flaviuekarlso-: You pinged me earlier today, pong?
23:43:27MyMindAraq: I was thinking to port this http://www.kevinbeason.com/smallpt/ to nim as exercise
23:45:00AraqMyMind: sure go ahead. ask def- for help if you're stuck
23:45:37MyMindhehehe ok
23:47:34MyMindcpp 2 nim comes with c2nim?
23:49:30Araqyeah via the --cpp switch
23:50:47*pdeuchler quit (Quit: pdeuchler)
23:54:06*BlaXpirit_ quit (Quit: Quit Konversation)
23:55:26*flyx joined #nim
23:56:07*wtw joined #nim
23:58:04*areckizb joined #nim