<< 21-11-2014 >>

00:10:25*Joe_knock left #nimrod ("Leaving")
00:13:52*flaviu quit (Ping timeout: 240 seconds)
00:15:48*Trustable quit (Quit: Leaving)
00:27:40*kniteli quit (Ping timeout: 258 seconds)
00:39:40*BitPuffin joined #nimrod
00:39:59*kniteli joined #nimrod
00:41:32*vendethiel quit (Ping timeout: 245 seconds)
00:45:41*kniteli quit (Ping timeout: 258 seconds)
00:55:57*johnsoft quit (Ping timeout: 240 seconds)
00:56:09*vendethiel joined #nimrod
00:56:10*johnsoft joined #nimrod
00:58:07*kniteli joined #nimrod
01:10:02*bjz quit (Read error: Connection reset by peer)
01:10:03*bjz_ joined #nimrod
01:16:32*darkf joined #nimrod
01:25:53*willwillson quit (Remote host closed the connection)
01:27:11NimBotAraq/Nimrod devel 5ab3542 Araq [+0 ±1 -0]: fixes #939
01:27:11NimBotAraq/Nimrod devel 326bdae Araq [+0 ±6 -0]: fixes #837
01:37:43*silven quit (Remote host closed the connection)
01:39:44*kniteli quit (Ping timeout: 258 seconds)
01:39:56*silven joined #nimrod
01:51:08*superfun1 joined #nimrod
01:51:40*kniteli joined #nimrod
02:06:00*superfun1 quit (Ping timeout: 264 seconds)
02:21:28*q66 quit (Quit: Leaving)
02:21:32*dom96_ quit (Ping timeout: 245 seconds)
02:23:53*vendethiel quit (Ping timeout: 264 seconds)
02:26:36*vendethiel joined #nimrod
02:27:07*dom96_ joined #nimrod
02:30:20*kniteli quit (Ping timeout: 258 seconds)
02:42:34*kniteli joined #nimrod
02:45:52*mko quit (Ping timeout: 240 seconds)
02:48:06*brson quit (Quit: leaving)
02:49:19*vendethiel quit (Ping timeout: 255 seconds)
02:50:25*nande quit (Remote host closed the connection)
02:51:03*vendethiel joined #nimrod
03:00:30*bjz_ quit (Ping timeout: 250 seconds)
03:26:14*BitPuffin quit (Ping timeout: 244 seconds)
03:27:51*bjz joined #nimrod
03:35:22*vendethiel quit (Ping timeout: 240 seconds)
03:36:28*brson joined #nimrod
03:38:18*vendethiel joined #nimrod
03:41:47*bjz_ joined #nimrod
03:45:05*bjz quit (Ping timeout: 258 seconds)
03:47:00*kniteli quit (Ping timeout: 258 seconds)
03:59:10*kniteli joined #nimrod
04:05:46*perturbation joined #nimrod
04:12:20*brson quit (Quit: leaving)
04:18:17perturbationI was playing around with creating sequence/array assignment from slices a la Fortran's implied do loops
04:19:10perturbationi.e., C3 = (/(I, I=1, 4)/) in Fortran <=> var a: seq[T] = newSeq[T](1..4) in Nim
04:20:07perturbationI came up with something here (https://gist.github.com/singularperturbation/476ebc90432a9c2c7822) using templates... does this look reasonable?
04:21:12perturbation(It works directly as overloading newSeq with a slice if I make it a procedure, but if I have it as a template, I can't overload anymore)
04:38:15fowlperturbation, why not use proc `@` [T] (some:Slice[T]): seq[T]
04:39:07fowl@(-8 .. 8)
04:43:49perturbationI wanted to have it as a template instead of proc to avoid overhead of the function call
04:43:52perturbationthat's cleaner syntax though
04:45:33fowlif you want inline code use the inline pragma
04:47:25*vendethiel quit (Ping timeout: 272 seconds)
04:49:06perturbationwhat I really want is the moral equivalent of: a = @[1..4] (*magic*) -> a = @[1,2,3,4] as if I had written it long hand (AFAIK inlined procs aren't evaluated at compile-time)
04:53:39perturbationactually let me check that
04:58:06*vendethiel joined #nimrod
05:13:16perturbationit looks like it does (about) the same thing with inline as with the template except that the inner newSeq[int] call isn't inlined
05:13:38perturbationthough the generated C is kind of tough (for me) to follow
05:14:06fowl(AFAIK inlined procs aren't evaluated at compile-time) neither are templates
05:15:40perturbationI thought templates *had* to be evaluated at compile time
05:15:47perturbationsomething something AST magic
05:17:13fowlno templates are a substitution mechanism
05:17:25fowlyou could do what you want with macros though
05:18:32*BlaXpirit joined #nimrod
05:18:37*vendethiel quit (Ping timeout: 240 seconds)
05:19:00perturbationhmmm... thanks fowl
05:20:30fowlgood night and good luck
05:21:18*kniteli quit (Ping timeout: 258 seconds)
05:24:19Varriountdom96: Wouldn't it be prudent to run the forum via a daemon? If your local internet connection drops, then the forum will go down.
05:26:29*vendethiel joined #nimrod
05:32:48*kniteli joined #nimrod
05:38:06*perturbation quit (Quit: Leaving)
05:43:42*ARCADIVS joined #nimrod
05:49:45*bjz joined #nimrod
05:50:14*bjz_ quit (Ping timeout: 256 seconds)
05:50:22*untitaker quit (Ping timeout: 250 seconds)
05:50:45*vendethiel quit (Ping timeout: 272 seconds)
05:54:42*vendethiel joined #nimrod
05:56:02*untitaker joined #nimrod
06:07:55*gokr_ quit (Remote host closed the connection)
06:08:09*gokr_ joined #nimrod
06:10:18*Demos joined #nimrod
06:17:13*vendethiel quit (Ping timeout: 255 seconds)
06:18:48*kniteli quit (Ping timeout: 258 seconds)
06:30:59*kniteli joined #nimrod
06:34:35*vendethiel joined #nimrod
06:54:50*kniteli quit (Ping timeout: 258 seconds)
06:56:22*vendethiel quit (Ping timeout: 240 seconds)
07:03:37*gokr_ quit (Ping timeout: 240 seconds)
07:04:04*gokr_ joined #nimrod
07:07:00*kniteli joined #nimrod
07:21:19*gokr_ quit (Read error: Connection reset by peer)
07:21:26*gokr_ joined #nimrod
07:25:40*gour joined #nimrod
07:27:22*vendethiel joined #nimrod
07:30:03*ekarlso- joined #nimrod
07:31:06ekarlso-So what other "new language" does nimrod compare to ?
07:33:16*bjz quit (Ping timeout: 255 seconds)
07:39:51Varriountekarlso-: Hm?
07:40:32Varriountekarlso-: Could you clarify your answer?
07:41:04*gokr_ quit (Remote host closed the connection)
07:47:42ekarlso-Varriount: I mean how does it compare to say Golang or alike
07:49:53*bjz joined #nimrod
07:50:15*vendethiel quit (Ping timeout: 244 seconds)
07:50:16gokrekarlso-: I wrote a bit about this, at http://goran.krampe.se/category/nim
07:52:33gokrCompared to golang - although I know go too little - I think : nim is faster and generally more capable/advanced while still as easy to read/write.
07:53:07gokrThen nim has a real exception model. Nim has native multithreading in a thread pool. Nim has very powerful AST based macros.
07:53:10ekarlso-gokr: does nim have objects and crud or ?
07:53:34gokrobjects if you like, see my articles in that URL - I have 3 articles on OO in Nim.
07:53:40ekarlso-ok :)
07:53:58ekarlso-gokr: so it's on the same level as go then vs rustlang which is moer a sys lang I guess ?
07:54:00*vendethiel joined #nimrod
07:54:39gokrI would say its closer to Rust when it comes to being able to do system level work - but still "practical" as go.
07:55:08ekarlso-gokr: who's behind Nimrod also ? :)
07:55:09gokrRust doesn't have GC at all, Nim has a very efficient and lightweight GC "per thread".
07:55:35gokrThere is no company behind Nim (its being renamed to "Nim") but a very friendly and capable community.
07:55:53gokrAraq here is the primary author and lead.
07:56:00ekarlso-gokr: hmm, anyone sponsoring it then or ?
07:56:13gokrNope, its a "true" open source project.
07:56:21bjzAraq, with his love and passion :)
07:56:23bjz<3
07:56:34gokrAlso, a big difference in implementation - is that Nim compiles via C/C++ (or js).
07:56:44ekarlso-gokr: vs ?
07:56:51bjzdirect to llvm IR
07:57:00gokrvs compiling directly to native or via llvm etc.
07:57:01ekarlso-is llvm bad or ? ^^
07:57:12bjzGo goes to the Plan 9 compiler I think
07:57:23bjzekarlso-: just different
07:57:42bjzekarlso-: Nim is probably more flexible in its backend
07:57:44bjzthan Rust or Go
07:58:19gokrNot "bad" per se, but if you target llvm you limit yourself a bit I would say. Also, Nim is quite flexible as bjz says - for example, if you need to integrate with lots of C/C++ libraries its not hard to do.
07:58:50ekarlso-how big of a community is nimrod vs rust / go ?
07:59:02bjzof course once enscripten is updated (finally!) to the latest clang, you can go via that with Rust, where as Go you can't. But thant's not quite the same as compiling to actual JS
07:59:05ekarlso-reason I ask is because typically the bigger community the more libs it has
07:59:12bjzwell, more ideomatic JS
07:59:20bjzGo > Rust > Nim
07:59:30bjzRust is exploding pretty rapidly
07:59:42bjzthough
07:59:45bjzbut still quite behind
08:00:14gokrIts worth noting though that Nim has a fairly good eco system already.
08:00:19bjzbut it depends on what you want out of a language
08:00:25bjzgokr: yep
08:00:39gokrAnd wrapping C stuff is fairly trivial.
08:00:45gokrAs one of my articles show.
08:01:00ekarlso-heh, the language wars ;)
08:01:18bjzyeah, both Go, Rust and Nim benenifit from being able to piggyback off C
08:01:26gokrNow... my take is: Rust is just too low level, immature as a language and... hurts my eyes generally.
08:01:50gokrI love the effort - but I just can't see myself writing/reading lots of Rust code and having fun at the same time.
08:01:58ekarlso-so bad with rust ? :d
08:02:03gokrThe lack of GC etc, is a deal breaker for me.
08:02:16gokrAnd the error handling model? yikes.
08:02:31gokrIn fact, both go and rust seem to suck compared to Nim in that area.
08:03:00gokrNow... go is popular, and I think its probably a very good choice for "network services" stuff.
08:03:09gokrLike servers etc, and well, probably more than that too.
08:03:37gokrAnd some parts in go are really neat - for example, I hope Araq will borrow the idea of delegation in go objects.
08:04:12gokrBut... some parts suck, like error handling. And... I have read several articles from people "moving away" from go after a brief "love affair".
08:04:27gokrIMHO kinda like nodejs :)
08:05:02gokrDeceptively easy for small examples. Some slick concepts dragging you in. Then you realize that shit... how do I write something substantial without going INSANE?
08:05:33Triplefoxfor some reason language hype is never about productivity
08:06:07gokrDid you guys see that WAT presentation on js?
08:06:09ekarlso-i dont like the error handling in go tbh
08:06:10gokrSuper funny.
08:06:19ekarlso-if error != nil all over
08:06:29gokrexactly. Nim has nice and simple exceptions.
08:08:35gokrhttps://www.destroyallsoftware.com/talks/wat
08:08:36gouri was playing with go wanting to use its static-site-generator, and for my Nim is modern Ada and more which first of all means 'type safety'
08:08:40gokrInsanely funny.
08:10:37ekarlso-that's one reason I like Python atm for the work I do, try: except: ...
08:10:47ekarlso-vs doing 100k if error != nill
08:10:51gokrOh, if you like Python, then Nim should be perfect.
08:11:49ekarlso-gokr: is nimrod statically typed or ?
08:11:55gokrI wrote about lots of languages a year ago (but I missed Nim, so wrote a followup to that): http://goran.krampe.se/2013/09/07/new-languages-this-century/
08:12:16gokrIts statically typed, but you also have multimethod dynamic dispatch on objects.
08:12:26ekarlso-gokr: yeah, not like there's too few of them :p
08:13:17gokrMy followup for Nim is here: http://goran.krampe.se/2014/10/20/i-missed-nim/
08:14:02gokrSo yes, its statically typed. But I am a Smalltalker at heart and Nim is one of the first statically typed languages for me that actually feels comfortable working in.
08:14:37*vendethiel quit (Ping timeout: 240 seconds)
08:17:15gokrekarlso-: So my advice - read my articles and then hop in, the water is fine.
08:17:48gokrAlso, in the Nim community you can easily get involved and make a difference.
08:17:58gokrI don't think go and rust offers that as readily.
08:21:34ekarlso-gokr: pratar ni svenska btw ? :)
08:21:44gokrJepp, jag iaf :)
08:22:09gokrGissade nästan att "ekarlso" kunde vara svenskt, eller?
08:22:38ekarlso-gokr: norbagge eller hur man skriver det på svenska ;)
08:22:53gokrah!
08:23:06gokrVar i Norge?
08:23:33ekarlso-gokr: Sandnes ved Stavanger ca :)
08:23:42ekarlso-west-coast
08:24:04ekarlso-gokr: can you re-post the articles in a pm btw? I can't see all the links :p
08:24:14gokr23 years ago me and a friend drove up to Lofoten and sailed with out Hobie 18 Formula for a week :)
08:24:21gokrour
08:25:28gokrekarlso-: Got it?
08:26:50*kniteli quit (Ping timeout: 258 seconds)
08:31:30ekarlso-gokr: yap
08:37:03*vendethiel joined #nimrod
08:42:51gokrekarlso-: Just ask btw, we try to help
08:43:01ekarlso-gokr: sure
08:45:41*kniteli joined #nimrod
08:57:37*vendethiel quit (Ping timeout: 240 seconds)
09:00:51*vendethiel joined #nimrod
09:07:58*Trustable joined #nimrod
09:37:29*Demos quit (Read error: Connection reset by peer)
09:44:13*vendethiel quit (Ping timeout: 265 seconds)
09:46:24*vendethiel joined #nimrod
09:49:15*kniteli quit (Ping timeout: 258 seconds)
10:01:38*kniteli joined #nimrod
10:06:53*kniteli quit (Ping timeout: 258 seconds)
10:08:22*vendethiel quit (Ping timeout: 240 seconds)
10:10:00VarriountSo, I was playing around with powershell script parameters today. The approach is very... interesting.
10:10:07*vendethiel joined #nimrod
10:11:21*khmm joined #nimrod
10:19:06*kniteli joined #nimrod
10:20:40gokrdom96: The 0.9.6 binary from the site doesn't have MSVCR100.DLL in it, I needed to suck that down separately
10:20:44gokrFor Aporia.
10:31:35*vendethiel quit (Ping timeout: 265 seconds)
10:35:10*bouliiii quit (Quit: Page closed)
10:57:29*kniteli quit (Ping timeout: 258 seconds)
11:01:27*vendethiel joined #nimrod
11:06:55*q66[lap] quit (Read error: Connection reset by peer)
11:07:36*q66[lap] joined #nimrod
11:09:22*kniteli joined #nimrod
11:11:00Varriountgokr: Unfortunately, I don't think licensing allows distribution of MSVCR100.DLL
11:13:09*bjz quit (Ping timeout: 265 seconds)
11:21:57*vendethiel quit (Ping timeout: 240 seconds)
11:22:20*bjz joined #nimrod
11:25:47*vendethiel joined #nimrod
11:46:00*ARCADIVS quit (Quit: ARCADIVS)
11:47:17*vendethiel quit (Ping timeout: 264 seconds)
11:49:16*vendethiel joined #nimrod
11:53:42gokrah ok
11:54:38gokrDamn I ... truly despise windows. I mean... ok, so I want to set the PATH var. control panel->system->advanced->find it->edit it in a tiny textbox-> save, save, apply, apply blabla.
11:55:20gokrAnd completion in the command prompt? Why is that disabled out-of-the-box on win7? And finding it... aargh, deep down in the registry. sigh.
11:55:30gokrSorry for the rant.
12:10:52*vendethiel quit (Ping timeout: 240 seconds)
12:12:44*vendethiel joined #nimrod
12:12:46*Araq0 joined #nimrod
12:13:24Araq0gokr: just install "Rapid Environment Editor" and a better terminal ...
12:14:01Araq0though it's not yet clear what better terminal means, the ones I tried are too buggy ... ;-)
12:14:36Araq0well there is always powershell
12:14:51gokrI know, I haven't read up on all that stuff.
12:15:09gokrI just feel that... it could be slightly smoother out of the box. Win7 is not THAT old.
12:15:38gokrI mean copy paste in the command prompt. aaaargh.
12:16:48Araq0yeah the defaults are crap
12:17:57*BitPuffin joined #nimrod
12:21:46Araq0I hope they finally throw cmd.exe away for windows 10, but I doubt it
12:22:34Araq0on the other hand, cmd.exe supports the UP/DOWN keys out of the box for every program no gnu readline library crap
12:27:22gokrYou really don't like Linux/Unix do you? :)
12:28:10*BitPuffin quit (Ping timeout: 250 seconds)
12:30:31Araq0it's barbaric
12:31:01Araq0and the creators agree with me and came up with Plan 9
12:31:17gokrAnd that's better?
12:31:28Araq0for them
12:33:14Araq0I consider everything that builds upon *untyped* one way interprocess communication barbaric
12:33:17*vendethiel quit (Ping timeout: 240 seconds)
12:36:24*BitPuffin joined #nimrod
12:41:43Araq0btw how do I even set environment vars permanently in unix? .bashrc only affects newly created terminals
12:46:04Araq0never mind, found it, it's /etc/profile
12:50:34*dom96_ quit (Ping timeout: 258 seconds)
12:50:52*vendethiel joined #nimrod
12:52:59gokrIs there code somewhere to convert "c:\foo\bar" to "/c/foo/bar" etc? Probably not, just realized it could be somewhere.
12:53:18gokrIt was easy to hack of course, just curious
12:57:47*BitPuffin quit (Ping timeout: 245 seconds)
13:02:15Araq0you can use a cygwin shell to get that feature
13:02:40gokrI am calling scp from Nim - on a windows box with msysgit installed.
13:03:00gokrAnd scp in msysgit wants those kinds of paths. Its working and all, just curious if I could have reused something
13:03:48Araq0are you sure about that? usually the ported software at least knows about windows' paths
13:04:08Araq0except when it's cygwin ...
13:05:09gokrWell, I presume the git distro for windows is some kind of cygwinish thingy, I dunno.
13:05:13gokrBut now it works.
13:05:34Araq0my git understands \
13:05:46gokrI am talking about scp.
13:05:51gokrWhich is included.
13:08:03Araq0maybe try putty's pscp
13:08:57*BitPuffin joined #nimrod
13:08:57gokrIt works now. And git I need anyway.
13:10:37Araq0putty is a useful addition to git anyway :P
13:10:57gokryeah, I am just sick of fiddling with this.
13:11:08gokrIt worked fine with rsync on Linux/OSX. Then Windows... argh.
13:11:17gokrSo gave up and thought ok, curl then...
13:11:29gokrThen realized that download fine, upload? Not so fine.
13:11:53gokrBah, so then ... scp. Sure, I can't delete a file, but I don't care.
13:12:43*dom96_ joined #nimrod
13:12:49gokrEither way its in a conf file so... one should be able to use whatever.
13:13:07dom96_Araq0: Windows 10 will include significant improvements to cmd.exe
13:13:23gokrDid they skip 9?
13:13:27gokrOr did I miss 9?
13:13:32*vendethiel quit (Ping timeout: 255 seconds)
13:13:33dom96_http://arstechnica.com/information-technology/2014/09/windows-10-command-prompt-finally-gets-dragged-into-the-21st-century/
13:13:37dom96_They skipped 9.
13:13:44gokrHa! cool subject line.
13:13:57gokrCatching up with OSX :)
13:14:12Araq0too much code uses version.startsWith("9") # win 95 or 98
13:14:22Araq0so they had to skip version 9
13:14:23gokrAh, right, I read that
13:14:41EXetoC-.-
13:15:09EXetoCdom96_: powershell isn't a separate thing? you can't use that all the time?
13:15:42*vendethiel joined #nimrod
13:15:50dom96_EXetoC: hrm?
13:16:13dom96_PowerShell doesn't make copying stuff from the command line any easier.
13:19:26Araq0dom96_: what?!
13:20:02Araq0dom96_: powershell comes with its own terminal
13:26:22*johnsoft quit (Ping timeout: 240 seconds)
13:26:57*johnsoft joined #nimrod
13:47:50NimBotdom96/jester new-async e886d22 Joe2244 [+0 ±1 -0]: Cleaned up utils.nim file, more info in description below.
13:47:50NimBotdom96/jester new-async c190f1d Joe2244 [+0 ±1 -0]: Cleaned up patterns.nim file. More info below.
13:47:50NimBotdom96/jester new-async 71b1191 Joe2244 [+0 ±1 -0]: Fixed jester.nim - removed most deprecation warnings - not all, see below.
13:47:50NimBotdom96/jester new-async 812b538 Dominik Picheta [+0 ±3 -0]: Merge pull request #17 from Kentoseth/new-async... 2 more lines
13:56:23*bouliiii joined #nimrod
14:14:53*spookley quit (Ping timeout: 272 seconds)
14:16:10*dom96 quit (Ping timeout: 272 seconds)
14:17:10*Spookley_ joined #nimrod
14:18:26*Joe_knock joined #nimrod
14:18:55*Spookley_ is now known as Spookley
14:19:53*dom96 joined #nimrod
14:23:23*Trustable quit (Quit: Leaving)
14:29:27*Spookley quit (Quit: Spookley Says Bye)
14:34:55gokrSo... it seems when I use readAll(stdin) - that works fine on Linux/OSX. But not on windows
14:35:23gokrNot entirely sure why yet.
14:35:52*Joe_knock quit (Ping timeout: 240 seconds)
14:39:00Araq0last time I checked readAll(stdin) doesn't work anywhere
14:43:01*vendethiel quit (Ping timeout: 255 seconds)
14:43:05gokrIt fiddles around with seek etc in the beginning there.
14:43:13gokrThat might be tripping up windows.
14:43:21Araq0exactly
14:43:51gokrOk, so basically we should... is the readAllBuffer exported?
14:44:27gokrOk, gotta go - but... hopefully that's the last issue before I can declare blimp working for all 3 platforms.
14:44:31Araq0I don't really see a problem though
14:44:41Araq0what does readAll(stdin) even mean?
14:46:56gokrWell :)
14:47:01gokrok, later
14:51:28*Etheco joined #nimrod
14:53:08*vendethiel joined #nimrod
14:57:37*gokr_ joined #nimrod
14:57:40*johnsoft quit (Ping timeout: 250 seconds)
14:58:33*johnsoft joined #nimrod
15:05:12*Araq0 quit (Quit: Page closed)
15:07:52onionhammerARaq0 they're upgrading the default cmd a lot in 10 i've heard
15:09:23*darkf quit (Quit: Leaving)
15:10:16onionhammernm late to the party ;)
15:10:37*BlaXpirit quit (Read error: Connection reset by peer)
15:11:18*BlaXpirit joined #nimrod
15:12:53onionhammerVarriount afaik you can redistribute msvcr100.dll etc numbered DLLs, just not the debug versions of the dlls
15:13:03onionhammerif i recall
15:14:20onionhammerthose files are meant to be redist dll
15:14:22onionhammers
15:14:32onionhammerhttp://msdn.microsoft.com/en-us/library/ms235299.aspx
15:15:24onionhammerhttp://support.microsoft.com/kb/326922
15:15:41*vendethiel quit (Ping timeout: 272 seconds)
15:17:31*vendethiel joined #nimrod
15:17:40*dom96_ quit (Ping timeout: 246 seconds)
15:30:48*kniteli quit (Ping timeout: 258 seconds)
15:47:14*gokr_ quit (Remote host closed the connection)
15:47:29*gokr_ joined #nimrod
16:04:30*bjz quit (Read error: Connection reset by peer)
16:04:52*bjz joined #nimrod
16:05:41*gokr_ quit (Ping timeout: 258 seconds)
16:06:53*gokr_ joined #nimrod
16:33:04*mko joined #nimrod
16:39:00*bjz quit (Read error: Connection reset by peer)
16:39:13*bjz joined #nimrod
16:47:24*Matthias247 joined #nimrod
16:50:42gokrAraq: The piping worked if I hacked my own readAll that is a copy of readAllBuffer
16:50:56gokrHmmm, perhaps readAllBuffer was exported, not sure.
16:51:40gokrNo, it wasn't
16:51:48*nande joined #nimrod
16:51:53gokrSo... that should be an issue to file
17:29:35*khmm quit (Ping timeout: 255 seconds)
17:43:01*nd` joined #nimrod
17:43:05*nd` left #nimrod ("Leaving")
17:53:23*gokr_ quit (Ping timeout: 272 seconds)
17:53:48*gokr_ joined #nimrod
18:01:03*q66 joined #nimrod
18:03:43*brson joined #nimrod
18:06:22*bouliiii quit (Ping timeout: 246 seconds)
18:19:00*Visaoni quit (Read error: Connection reset by peer)
18:22:47*dom96_ joined #nimrod
18:26:14*AMorpork is now known as AFKMorpork
18:27:48ldleworkIn using c2nim, I have lines in my .h's like "TCODLIB_API char *TCOD_strdup(const char *s);" It doesn't like the TCODLIB_API token which is defined as: https://gist.github.com/dustinlacewell/1c200c3f47a37220afd6
18:28:00ldleworkIf I delete all the "TCODLIB_API" tokens it converts successfully
18:28:15ldleworkIs there anyway to do something to the source or c2nim so I don't have to remove all these tokens?
18:29:17EXetoCthe manual should hint towards defining those symbols with #def, usually to nothing
18:29:22*vendethiel quit (Ping timeout: 240 seconds)
18:29:32ldleworkOkay
18:30:49EXetoCand there's that c2nim article somewhere
18:34:05*vendethiel joined #nimrod
18:39:47*gokr_ quit (Ping timeout: 258 seconds)
18:39:48*shodan45 joined #nimrod
18:40:32*Matthias247 quit (Read error: Connection reset by peer)
18:41:12*perturbation joined #nimrod
18:41:33*gokr_ joined #nimrod
18:42:29perturbationfowl: Just FYI - I made some post-bigbreak fixes to your nimrod-sfml package (mostly case sensitivity stuff)
18:42:43perturbationassuming you're fowlmouth - if not, please disregard -.-'
18:43:27perturbation!seen fowlmouth
18:43:27NimBotfowlmouth was last seen on Thu Nov 13 02:02:13 2014 quitting with message: Read error: Connection reset by peer
18:45:00ldleworkIt doesn't seem to do anything.
18:45:02ldleworkEXetoC:
18:45:26ldleworkEXetoC: the docs say that existing #ifdef defines should be converted to where clauses in the nim
18:45:37ldleworkBut that doesn't solve nim refusing to parse the rest of the document
18:46:20EXetoCyou still have to do something like #ifdef C2NIM\n#def TCODLIB_API\n#def....\n#endif I think
18:48:22EXetoCbut chances are other issues will appear
18:50:20*gour quit (Disconnected by services)
18:50:21*gour_ joined #nimrod
18:51:12ldleworkyeah it literally doesn't affect it at all
18:51:33ldleworkhttps://gist.github.com/dustinlacewell/d671a72de82f2ff43e6e
18:51:36ldleworkfails on line 10
18:51:44EXetoCthere's no direct link to the c2nim article anywhere?
18:52:08EXetoCdef, not define
18:53:00EXetoCthe def directive will be processed by c2nim, and not by a C preprocessor, hence the associated guard
18:53:00ldleworkEXetoC: that worked
18:53:02ldleworknice
18:53:17ldleworkhttp://nimrod-lang.org/c2nim.html
18:53:20ldleworkdoesn't mention #def at all
18:53:57EXetoCit does. the article covers more things though
18:54:17ldleworkI don't see #def mentioned
18:54:23ldleworkoh there it is
18:54:32ldleworkthanks EXetoC
18:54:46ldleworkIts too bad I can't provide this globally
18:54:51ldleworksince I want to convert just about 100 files
18:54:57ldleworkand so I will have to add these three lines to 100 files
18:56:48EXetoCthere's the cmerge tool in the nim distribution, but it's a little inconvenient to merge C files rather than headers
18:56:57EXetoCso I merged the headers manually one time
18:58:22ldleworkEXetoC: what do you mean merged, just concatenate them together
18:59:00EXetoCyes
18:59:30ldleworkcrazy
19:02:27EXetoCa separate file would be convenient, but I think you can specify all these things as program arguments
19:02:48*AFKMorpork is now known as AMorpork
19:03:16EXetoCI guess not, but the header flag might be relevant
19:05:44ldleworkEXetoC: c2nim doesn't like the :1 stuff here https://gist.github.com/dustinlacewell/f57863943c5df804ce78
19:10:26*will joined #nimrod
19:13:44*Mat4 joined #nimrod
19:13:49Mat4hi all
19:15:11EXetoChi
19:15:19EXetoCldlework: yeah, we don't have that
19:17:13ldleworkwoah it just worked on the whole shebang
19:17:28EXetoCand that? you converted it to a single char?
19:17:57*vendethiel quit (Ping timeout: 240 seconds)
19:18:46ldleworkEXetoC: a single file, you mean?
19:20:28*vendethiel joined #nimrod
19:21:06EXetoCthe bitfields
19:22:33ldleworkI just deleted the :1
19:22:46ldleworklol
19:24:43EXetoCthe size of the original struct will be 1 byte so it won't be binary compatible
19:25:26*gour_ is now known as gour
19:27:48ldleworkI have a feeling that this is hopeless
19:29:44EXetoCit's a very boring process for large inputs, but it's often better than manually creating bindings
19:30:49EXetoC*quicker
19:32:42ldleworkhttps://gist.github.com/dustinlacewell/8110d9389f2063b8a619 on the middle line
19:32:48ldleworkany idea what it is complaining about?
19:35:19ldleworkWho can I pay to do this nim binding? :)
19:40:01EXetoCis 'type' the issue? if so, escape it (`type`), because it's a keyword
19:41:56EXetoCthere's this https://github.com/Vladar4/libtcod-nim, but it hasn't been updated in some time, but some issues can be fixed with nimfix
19:42:48EXetoCthe plan has been to update all the packages, but that one hasn't been touched apparently
19:43:10*vendethiel quit (Ping timeout: 255 seconds)
19:43:16ldleworkThere are many issues
19:43:20ldleworkAnd I just started deleting things
19:43:34ldleworkBut I probably just don't know enough to convert the whole time
19:43:48ldleworkand yeah that package is from before bigbreak
19:43:51ldleworkIt doesn't work at all anymore
19:44:08ldleworks/whole time/whole thing
19:44:21EXetoCmanual intervention is usually necessary
19:44:22ldleworkI would pay a reasonable amount if someone wanted to do the conversion though
19:44:36EXetoCit's up to you if you think it's faster to rewrite it
19:44:53ldleworkEXetoC: I did consider maybe just binding what I need as I need it
19:45:02ldleworkI just want to start writing a game :(
19:45:17ldlework#rust-gamedev makes me so jealous lol
19:45:31*vendethiel joined #nimrod
19:47:46ldleworkDo we know who Vladar4 is?
19:53:20ldleworkoh well
20:00:13EXetoCyou can pay me if you want. I'm free in about 2 hours
20:00:17EXetoCor do you want to bind it selectively?
20:00:39ldleworkEXetoC: have you seen the scope of the library? Do you have an offer?
20:00:45ldleworkI mean its not ginormous
20:01:05ldleworkits like 3k lines
20:03:51EXetoC*shrug*
20:04:14ldlework$50? $100?
20:05:28ldleworkEXetoC: think about it, I have a meeting
20:05:31ldleworkbb in about an hour
20:11:07Araqhi ldlework, what's the problem with c2nim?
20:11:23EXetoCgenerous offer. it shouldn't take very long
20:12:15AraqI can implement a "load #def stuff from file" feature
20:12:26Araqit's been on my todo for some time
20:12:31EXetoCbut he used --header for that. is it not sufficient
20:13:21Araq--header is stupid
20:13:26Araqhe should use --dynlib
20:14:24EXetoCI thought he had #def directives in a separate file and then used headers. does that not work?
20:14:49Araqhow should it? c2nim doesn't follow #include
20:15:07Araqnor does it provide an #incl
20:15:25EXetoCI don't know what he was doing then
20:15:46EXetoChe might have just thought it worked
20:16:46*Trustable joined #nimrod
20:16:48EXetoCAraq: what about using program args for all that?
20:19:40EXetoCor allow for both options
20:20:51Araqmeh command args are always affected by stupid quoting rules
20:21:24EXetoCescaping isn't so hard
20:21:33Araqit is
20:25:18AraqI once matched parts of URLs with a regex and this regex had to be in an xml file
20:25:27Araqit made me mad
20:25:45EXetoC:E
20:25:49EXetoClovely
20:27:22EXetoCnice fixing spree
20:28:14Araqwhat works much better than quoting is indentation
20:28:20Araq.. code-block:: nim
20:28:26Araq echo "nim code here"
20:28:40Araq*that* is far superior
20:29:04EXetoCyeah
20:34:46Araqso ... I'm special casing the identifier 'it' in the language ...
20:34:59Araqany objections?
20:35:59Araqreason for it: https://github.com/Araq/Nimrod/issues/1337
20:37:38Araqthe alternative is to add top-level 'mixin' statements to the language
20:39:20VarriountAraq: What would the 'it' statement do?
20:39:50AraqVarriount: it doesn't do anything
20:40:12Araqthe problem is when you have:
20:40:44Araqproc gen[T](x: T) = sequtils.mapit(x, it * 2)
20:41:07Araqthe compile tries to bind 'it' in the symbol lookup pass for generics
20:41:13Araqbut doesn't find any
20:41:29Araqand it cannot expand 'mapIt' either since that can be overloaded
20:41:47Araqand for generics the real type T is known only later
20:43:57VarriountSo, essentially, the compiler doesn't have enough information to expand mapIt?
20:44:08Araqyes
20:44:33VarriountSo why not do what you said in the comment, and expand it later?
20:44:39*gour is now known as gour__
20:46:21Araqwe do that but by then it's too late
20:46:54VarriountWhy?
20:50:03*gour__ is now known as gour
20:52:30Araqthe compiler does some sanity checking for generics
20:53:26Araqin other words it performs symbol lookup
20:53:46Araqnote that this is done for the generic itself, not its instantation
20:54:04Araqso it looks up 'it', doesn't find an 'it' and fails
20:54:45Araqit looks up 'sequtils.mapIt' too and this works, but it cannot expand it to see the injected 'it'
20:55:10VarriountWait a sec... why can't you expand the template to use the type 'T'
20:55:43VarriountJust have a placeholder type, or something
20:57:16Araqtemplate foo(x: int) = ... # injects
20:57:29Araqtemplate foo(x: float) = # doesn't inject
20:57:46Araqproc ingeneric[T](x: T) = foo(x) # well?
20:58:11VarriountIsn't that what immediate templates are for?
20:59:09Araqyeah
20:59:16Araqbut mapIt is not immediate
21:00:09Araqit's actually a very hard problem
21:00:27Araqdom96's => macro also does symbol injection I think
21:01:28Araqbut that's immediate
21:01:50VarriountWhat about allowing the generic sanity check to peek at all the possible overloads, and the symbols they inject?
21:02:16Araqthat almost works
21:02:38Araqbut to "peek" it also needs to run macros which can inject non-declaratively
21:03:05VarriountThis is like going down a rabbit hole.
21:03:11Araqso it ends up expanding *all* macros at the same time without considering types
21:03:21*dom96_ quit (Ping timeout: 255 seconds)
21:04:04VarriountAnd macros can affect compile time vars...
21:04:21Araqwell zahary has a good solution
21:04:52Araqhe thinks we should screw this symbol lookup pass and perform it later for instantiation
21:05:17Araqbut this is too much work to change now and the consequences are not obvious either
21:06:30Araqwhat we can do is enforce a prefix like !it to mark injected symbols at callsite
21:07:12Araqor maybe allow (let it)
21:07:31AraqmapIt(sequence, (let it) * 3)
21:07:34VarriountAraq: Uh, I was about to voice the same solution as zahary.
21:08:20AraqI mean, symbol injection IS rare and quite hacky anyway
21:10:20VarriountAlso, remind me why mixin doesn't work? Is it because the identifier is only in the template call?
21:10:31Araqyes
21:10:37Araqthis works:
21:10:46Araqproc gen[T](x: T) =
21:10:49Araq mixin it
21:10:58Araq mapIt(..., it * 3)
21:11:14Araqhence my idea of global 'mixin'
21:11:26Araqin sequtils there can be a top level
21:11:29Araqmixin it
21:11:46Araqand then that's exported and again, things work
21:12:00Araq(unless you use from sequtils import mapIt ... *cough*)
21:14:50Araqwell I still prefer to special case 'it' in the compiler, this means it becomes keyword-like. This discourages any symbol injection unless you name it 'it'
21:15:06VarriountAraq: So... why not just let mixin be used in the generic body?
21:15:16VarriountIsn't that what it was for?
21:15:46Araqthat's a gotcha for newbies
21:16:31VarriountAnd !it isn't?
21:17:01Araqyeah
21:17:12Araqbut this isn't my proposal
21:17:24Araqmy proposal is to special-case 'it'
21:18:37VarriountAnd what happens when someone uses 'it' for something other than it's intended purpose? How is 'it' different from 'mixin'?
21:18:57Mat4good question
21:19:07Araqthat it simply works
21:19:47VarriountAnd what if the macro or template has more than one identifier to inject?
21:20:33Araqwell then you need a mixin :P
21:20:54Araqbut again
21:21:09Araqsymbol injection is not something we should encourage too much
21:21:21VarriountAlso, this depends on the user using the identifier 'it' - if you're counting on them not knowing enough to use 'mixin' properly, how do you know they will know enough to use 'it'?
21:21:42Araqno, that the point
21:21:54Araqthe user uses the existing mapIt etc. and it works
21:22:33Araqhe writes his own and uses 'it' because it's the convention -- and it works
21:22:59Araqhe writes a template that injects 2 symbols and then he needs to learn about these details
21:23:14Araqbut by then he should reconsider his design
21:23:21AraqIMHO
21:25:46VarriountAraq: So... it will be the original writer of the template to use 'it' for the first injected symbol?
21:26:01Araqyes.
21:26:08Varriount*it will be the responsability
21:27:00Araqhowever we can also deprecate the sequtils.foo*It templates
21:27:21Araqor document the 'it' gotcha really well ...
21:27:50Araqbut I quite like them :-/
21:28:53VarriountAraq: I'm sorry, but I really don't like this idea. It anticipates too much what both the user and the writer of the template are going to do, and adds another bit of complexity into a situation that can already be solved by 'mixin'
21:29:36Araqwell for me 'mapIt' is all about convenience
21:30:00Araqand 'mixin it' in a generic is a gotcha and not convenient
21:30:56VarriountAraq: This also assumes that the user of the template and the writer of the template are not the same people.
21:31:15Araqwell that's exactly what happened
21:31:27AraqI got 3 bug reports about this gotcha
21:31:37*johnsoft quit (Ping timeout: 240 seconds)
21:31:44AraqI'm not really assuming anything here
21:31:47*johnsoft joined #nimrod
21:31:52Araqit happened in the real world
21:32:26Araqalso I'm looking for a good compromise for version 1.0
21:32:37Araqbetter solutions can be tried later
21:33:15VarriountWhat about improving the error message?
21:34:02Araqthat helps but ultimately 'mixin it' feels like babysitting the compiler
21:35:32VarriountAraq: Are you sure better solutions can be tried later? This change could permanently make 'it' a special identifier.
21:36:06Araqas I said, we can always introduce a toplevel mixin statement for this
21:36:27*dom96_ joined #nimrod
21:36:42Araqwe can also change symbol lookup rules in generics later and implement zahary's solution
21:36:56Araqwhich is fully backwards compatible ... for now
21:37:09dom96_hello
21:37:11Araqwell it's hard to say
21:37:22Araqit surely looks compatible
21:37:42VarriountI'd still rather have an error message that suggests that the user add a mixin statement when the compiler detects that it doesn't have enough information about the possible identifiers.
21:38:54VarriountHave the user learn from their mistakes.
21:39:06Mat4hi dom96
21:39:14dom96_hey Mat4
21:39:28Araqdef-: any opinion? it's your bug report after all ... :P
21:40:17dom96_Araq: IMO special casing 'it' is a bad "quick fix"
21:40:45Araqnah, it's 1 line of code in the compiler. that's makes it a good quick fix :P
21:41:08Araqbut it might be questionable design
21:41:10dom96_I would go as far as saying that these *It templates are a hack which works around the fact that => isn't usable enough.
21:41:46AraqI have a fix for => though
21:42:44dom96_It would be nice if the compiler could rewrite x.map(x => echo x) into a for loop.
21:43:17Araqbut it can
21:45:18dom96_ok, so how will you improve =>?
21:45:35*gour quit (Quit: WeeChat 1.0.1)
21:45:48Araqchange its precedence and make it right-associative
21:46:09Araqin fact, I plan to do this for every operator symbol that ends in '>'
21:46:38Araqso => is not like == anymore, but an arrow
21:46:53dom96_ok
21:47:14dom96_That's not going to help with type inference though.
21:48:24Araqwell the 'auto' as return type will be fixed too
21:49:18def-Araq: i don't like the idea of special-casing "it". As dom96_ said, I used *It templates because of limitations in =>.
21:49:44*dom96_ quit (Quit: Leaving)
21:50:01*dom96_ joined #nimrod
21:50:03Araqdef-: ok, but the problem is more fundamental than that
21:51:14Araq=> itself does symbol injection and works because it's an immediate
21:51:41dom96_Perhaps we should implement => in the compiler?
21:52:13AraqI still prefer (a,b :: a+b) as a syntax over => then
21:52:34Varriountdom96: But then you deny all other library writers the chance to use =>
21:52:48dom96_Varriount: Why would they need to?
21:53:22dom96_Araq: Why? That's Haskell's "type is" operator.
21:53:22Varriountdom96: For macros, templates, and procedues, same as you.
21:53:58dom96_Varriount: I'm not sure what you mean.
21:54:14dom96_Are you saying they won't be able to write their own `=>`?
21:54:32Varriountdom96: If you implement it as a compiler operator, yes.
21:54:47dom96_Varriount: It would end up in system.nim anyway, preventing its reuse.
21:54:58Varriountdom96: Exactly!
21:55:38dom96_oh, so you're talking about people who would like to reimplement the whole stdlib?
21:56:12EXetoCREWRITE REWRITE REWRITE!
21:56:37Varriountdom96: Not reimplementing the stdlib, but implementing their own libraries and frameworks.
21:56:56dom96_bbl
21:57:25VarriountHow does C++ do precedence?
21:57:37VarriountI mean, with regards to operators.
21:58:03Varriount(Wait, can you even define custom operators in C++?)
22:01:40AraqVarriount: no you can't
22:01:40*dom96_ quit (Read error: Connection reset by peer)
22:01:57AraqScala provides this feature and does it quite like Nim
22:04:43perturbationOh dear: "C++ has no native support for adding new operators, but this article shows how, with macros and some clever overloading, it is possible to easily add your own anyway."
22:05:11*Joe_knock joined #nimrod
22:09:36onionhammerVarriount... i think its worthwhile. => means lambda to so many people
22:10:01onionhammeri wouldnt want some library overriding that
22:10:57Varriount*grumble*
22:17:29Mat4ciao
22:17:42*Mat4 left #nimrod (#nimrod)
22:21:31*dom96_ joined #nimrod
22:25:34*BlaXpirit quit (Quit: Quit Konversation)
22:25:49*BlaXpirit joined #nimrod
22:28:47Araqwell if nobody likes my hack ... I won't do it
22:29:10Araqbut the current situation sucks
22:31:52*Joe_knock quit (Ping timeout: 240 seconds)
22:49:40*bouliiii joined #nimrod
22:50:05bouliiiiFor custom operators, would it be possible to get user defined precedence as in SML or haskell?
22:51:01Araqbouliiii: it's possible, but it's horrible
22:51:14bouliiiibecaus it makes things too much non context free?
22:51:27AraqHaskell performs precedence rewriting after types have been figured out afaict
22:51:47Araqbouliiii: yes.
22:53:06bouliiiiInteresting than ocaml does not do it and has ocamlp4 (similar to nim macros). Seems they also ended up to the same conclusion :-(
22:54:21bouliiiiI was playing with mlton yesterday. I am not sure how they implement used defined precedence here
23:00:32Araqbouliiii: check out #! strongSpaces for a more flexible approach
23:01:00Araqit's a special parsing mode that IMO works best for these things
23:05:17*def- quit (Ping timeout: 264 seconds)
23:07:21*johnsoft quit (Ping timeout: 258 seconds)
23:07:39*johnsoft joined #nimrod
23:08:07*boydgreenfield joined #nimrod
23:08:12*vendethiel quit (Ping timeout: 250 seconds)
23:08:38*saml quit (Quit: Leaving)
23:12:19*vendethiel joined #nimrod
23:15:07bouliiiiAraq: hahaha. Very nice and naughty at the same time :-)
23:25:38EXetoCuh oh, signature mismatch hell again :)
23:35:16*kniteli joined #nimrod
23:52:01*Etheco quit (Quit: Leaving)
23:57:34boydgreenfieldIs the warning in the docs about Channels being slow still current? / Can anyone point me to a good example of current “Nim idiomatic” threading/concurrency with the new threadpool implementation? Having a bit of trouble deciding what pattern to use by default here. Thx!
23:59:46*Matthias247 joined #nimrod