<< 29-11-2014 >>

00:04:52dtsi forgot about the documentation
00:09:57EXetoCit's also simple to search the std lib since the language is greppable
00:15:07EXetoCspeaking of which, are there plans to introduce instant searching for the documentation?
00:18:04Araqnot really
00:20:09EXetoCit sure is convenient
00:20:25*BlaXpirit quit (Quit: Quit Konversation)
00:23:03dtsman rosetta code is awesome
00:23:55EXetoClocal caching might be best then, and then ideally you'd want a parsing API that can be used with the JS target
00:25:50dtswhats the proper way to write to stderr?
00:26:29EXetoCstderr.write?
00:26:45dtsi thought so, but i wasn't sure
00:27:49EXetoCit's easy to try
00:28:28EXetoChaving a shortcut for saving and building is nice
00:32:15EXetoCspeaking of which, I should use conque for vim again
00:33:10Joe_knockI'm presenting tomorrow. A bit nervous
00:34:03dtsok... ive ran into an error, that normally i could figure out, but nimrod errors are new to me especially since it compiles to c code. the code: http://paste.ubuntu.com/9290543/ and the error: http://paste.ubuntu.com/9290539/
00:36:03EXetoCline 3?
00:36:08EXetoCand use true/false instead
00:36:44EXetoCthe target language isn't really of relevance
00:36:52Joe_knockI'm going the "It's similar to Python but Nim gives C-like powers as the point of my topic"
00:38:00EXetoCI think the comparison with Python is a little shallow
00:38:26EXetoCunless maybe it's specifically referring to the syntax
00:38:35EXetoCanyway, good luck
00:38:38Joe_knockThe people I am presenting to are pythonistas
00:39:10Joe_knockI haven't mentioned many of the more advanced stuff (especially language-specific features, which are a bit over my head currently)
00:39:13Joe_knockthanks
00:40:21fowl"var msg: string" no
00:40:22EXetoCC-like powers, ok fair enough
00:40:23fowlthis is not pascal
00:40:56EXetoCah yes
00:41:25fowlmsg: var string
00:44:00EXetoCwhy is it not like with variables?
00:44:08Joe_knockfowl: did you write the Python within Nim code?
00:44:58fowlEXetoC, because this is pascal, god damnit
00:46:08EXetoCsolid argument
00:46:10fowlJoe_knock, i'm going to say, no
00:46:31Joe_knockfowl: https://github.com/nim-lang/python
00:46:48fowlah no, araq did
00:47:51Joe_knockaah okay
00:50:24*Matthias247 quit (Read error: Connection reset by peer)
00:52:54fowlidk what to do about this https://github.com/nim-lang/opengl/issues/10#issuecomment-64858108
00:54:48Araqfowl: I suggested to make these GL_BYTE_RANGE
00:54:57Araqbut people can't read
00:55:12Araqor leave them with the leading 'c' who cares
00:56:21Araq(is there a programmer left who cares about the end result instead of masturbating over his code?)
01:01:08EXetoCI didn't think about those other collisions. might as well just keep that prefix then..
01:01:48AraqI also showed how to check for cs:partial
01:02:02*BitPuffin joined #nimrod
01:31:01fowlAraq, where does _RANGE come from
01:55:47*AFKMorpork is now known as AMorpork
02:10:07Joe_knockDoes anybody know why: sudo ln -s $PWD/nim /usr/bin creates a symlink that goes to Nimrod/nim and not Nimrod/bin/nim ??
02:10:43*darkf joined #nimrod
02:22:20*Joe_knock quit (Quit: Leaving)
02:25:40*johnsoft quit (Ping timeout: 258 seconds)
02:26:43*johnsoft joined #nimrod
02:34:37*saml_ joined #nimrod
02:46:57*saml_ quit (Ping timeout: 245 seconds)
02:57:53*BitPuffin quit (Ping timeout: 240 seconds)
03:00:26*saml_ joined #nimrod
03:10:51*kapil__ joined #nimrod
03:40:38*q66 quit (Quit: Leaving)
03:50:25*ARCADIVS joined #nimrod
04:13:47*boydgreenfield joined #nimrod
04:15:48*EXetoC quit (Ping timeout: 265 seconds)
04:38:24*boydgreenfield quit (Quit: boydgreenfield)
04:53:02*saml_ quit (Quit: Leaving)
05:09:22*milosn joined #nimrod
05:11:04*Epic|gmpreussner quit (Quit: Konversation terminated!)
05:51:01*untitaker quit (Ping timeout: 244 seconds)
05:57:55*untitaker joined #nimrod
06:03:29*AMorpork is now known as AFKMorpork
06:25:56*Boscop_ joined #nimrod
06:26:12*darkf_ joined #nimrod
06:36:05*AFKMorpork is now known as AMorpork
06:37:14*darkf quit (*.net *.split)
06:37:14*rpag quit (*.net *.split)
06:37:15*Boscop__ quit (*.net *.split)
06:37:15*ekarlso- quit (*.net *.split)
06:37:16*skroll1 quit (*.net *.split)
06:37:54*skroll1 joined #nimrod
06:39:10*rpag joined #nimrod
06:40:40*ekarlso- joined #nimrod
06:46:15*darkf_ is now known as darkf
07:00:41*AMorpork is now known as AFKMorpork
07:01:53*ARCADIVS quit (Quit: ARCADIVS)
07:36:43*gour joined #nimrod
07:37:34*dain joined #nimrod
07:41:17*dts quit (Ping timeout: 272 seconds)
07:55:02*gokr joined #nimrod
08:16:52ldleworkhmm
08:17:00ldleworkdo I really have no random module in my nim installation?
08:17:49fowlyea
08:18:31ldleworkfowl: will the package manager supply it?
08:19:02fowlpresumably you want random() from the math module?
08:19:30fowlthere is a package called 'random' too though
08:19:42ldleworkfowl: yeah the package
08:19:50ldleworkany idea how to get it?
08:19:58fowlnimble update; nimble install random
08:20:08*gokr quit (Quit: Leaving.)
08:20:38ldleworkI think nimble just broke itself
08:21:33ldleworkfowl: https://gist.github.com/dustinlacewell/9254874c42392865d400
08:23:24fowlldlework, you just told it to rename ~/.babel to ~/.nimble, now ~/.babel/bin/nimble doesn't exist
08:23:45fowlneed to update your symlink
08:23:55ldleworkfowl: oddly doing "which nimble" doesn't give me anything
08:23:58ldleworkwonder where the symlink is
08:24:51fowlmaybe its an alias or something
08:25:07fowland make sure all of ~/.babel is moved
08:36:45*dain quit (Quit: dain)
08:37:17*dain joined #nimrod
08:37:27*dain quit (Remote host closed the connection)
08:40:41*dts joined #nimrod
08:49:30*BlaXpirit joined #nimrod
08:56:59*milosn quit (Quit: Lost terminal)
09:03:09*gokr joined #nimrod
09:04:01dtsmain.nim(3, 14) Error: ')' expected # does this mean the error is on line 3, column 14?
09:04:53ldleworkyeah
09:05:34dtshmmm... that places it in the middle of var though
09:08:09dtshttp://paste.ubuntu.com/9295936/
09:08:15dtscan you help me with this?
09:08:21dtscause i cant figure out whats wrong
09:09:47fowlyou pasted "main.nim"
09:09:55dtsyeah
09:10:01dtsoops
09:10:05dtsmy bad
09:10:13dtsits been a while since i used pastebinit
09:10:30dtshttp://paste.ubuntu.com/9295944/
09:10:32dtsthere we go
09:11:26Araqdts: as fowl already told you the syntax is proc error(msg: var string, ...)
09:11:56Araqcause 'var T' is its type, msg is still a param, not a variable
09:11:56dtssorry, i had to leave before i could see an answer the first time i asked
09:14:39dtsok well now its saying main.nim(14, 15) Error: type mismatch: got (string, TaintedString)
09:14:59dtsis line not a string?
09:15:50dtsnever mind figured it out
09:16:11*matkuki joined #nimrod
09:16:44matkukiHi, anyone up for a few newbie questions?
09:17:14Araqif you can live with my bad mood, then yes
09:17:51*bjz joined #nimrod
09:17:58*gokr quit (Quit: Leaving.)
09:19:22matkukiNo problem, what is the "size" pragma? From the sdl2 library: "TWindowEventID* {.size: sizeof(byte).} = enum ..."
09:20:20dtswhat does this error mean? main.nim(19, 40) Error: for a 'var' type a variable needs to be passed http://paste.ubuntu.com/9296031/
09:20:50Araqdts: just get rid of your 'var' for parameters
09:20:59Araqand read some tutorial
09:21:30Araqmatkuki: it tells the compiler that the enum's underlying type should be "byte" for C interop
09:22:08Araqdts: also it's 'add', or &=, not += for strings
09:22:17Araqand 'true' instead of 'True'
09:23:35matkukiAraq: ok, thanks.
09:28:52matkukiAraq: in an "enum", when specifying members and only some members have a defined value, how are the other member values assigned?
09:29:26AraqoldValue + 1
09:33:38*vissborg quit (Remote host closed the connection)
09:37:05*milosn joined #nimrod
09:39:13*vissborg joined #nimrod
09:42:30matkukiAraq: how do I add an int and a enum member?
09:43:10fowldts, the tutorial is good for jumping in, the manual shows off all of nimrods features
09:43:59dtsyeah im reading through the one on the site
09:44:43dtsim learning more than the one i was using before, which is what lead to my noobish questions
09:45:18Araqmatkuki: yourInt + ord(yourEnum)
09:46:43matkukiAraq: thanks, is "ord(yourEnum)" equivalent to "yourEnum.ord()"?
09:46:56Araqyeah
09:48:10Araqthough I prefer yourEnum.ord then without the ()
09:49:23matkukino need for ()? good to know
09:52:12gouris there possibility to make the nim docs into ebook (*.epub) which one could put on book reader?
09:54:53Araqgour: that should be a couple oof subs
09:54:55Araqbb
10:03:03*gour is busy learning rpm-stuff, but suse is really great
10:06:03*Matthias247 joined #nimrod
10:10:40*BitPuffin joined #nimrod
10:15:17*matkuki quit (Ping timeout: 245 seconds)
10:21:52*gour quit (Ping timeout: 240 seconds)
10:29:51*gour joined #nimrod
10:42:00dtsis there a bot that evaluates nim code?
10:45:53*BitPuffin quit (Ping timeout: 240 seconds)
10:46:00*dom96_ quit (Read error: Connection reset by peer)
10:46:26*gokr joined #nimrod
10:48:30gokrAraq: Bad mood? Are you ok?
10:48:48*gokr about to put furniture back into house...
10:49:18gokrI will revisit my OO articles btw, to make them up to date regarding procCall.
11:07:55*dts quit (Ping timeout: 255 seconds)
11:40:29*EXetoC joined #nimrod
12:00:39fowlAraq, I think this is a bug actually https://github.com/Araq/Nimrod/issues/1683#issuecomment-64941019
12:04:17fowl()s are needed for `.=`, `[]=` in discard (if, while, when, etc)
12:09:35*dom96_ joined #nimrod
12:11:01*BitPuffin joined #nimrod
12:24:32*xcombelle joined #nimrod
12:32:23Araqfowl: I don't think so, but will have a look
12:33:08Araqdom96_: dunno how the API should look like for "configurable smileys"
12:38:54*Araq implements a smileyFormat string
12:53:54*dom96_ quit (Ping timeout: 250 seconds)
13:09:09NimBotAraq/Nimrod devel 80b8361 Araq [+0 ±3 -0]: smileys configurable; safer image attribute handling
13:09:09NimBotAraq/Nimrod devel c2e04ab Araq [+0 ±2 -0]: fixes regression that caused pegs to not compile
13:15:03ekarlso-does nim have a DNS module / lib ?
13:22:52EXetoCcan't find one
13:26:43*dom96_ joined #nimrod
13:27:22dom96_Araq: A hash table. Smiley enum to smiley path.
13:28:08*BitPuffin quit (Ping timeout: 250 seconds)
13:30:18dom96_or better yet an array
13:30:40dom96_or if you want to give more customizability then allow me to specify arbitrary smileys
13:30:52dom96_so smiley string (":)") to smiley path "smiley.png"
13:33:04*dom96_ quit (Quit: Leaving)
13:50:11*milosn quit (Remote host closed the connection)
13:52:49*q66 joined #nimrod
14:01:46*Matthias247 quit (Read error: Connection reset by peer)
14:59:18*xcombelle is now known as xcombelle_afk
15:08:13*AFKMorpork is now known as AMorpork
15:10:40*xcombelle_afk is now known as xcombelle
15:26:16*darkf quit (Quit: Leaving)
15:55:40*irrequietus joined #nimrod
15:56:44EXetoCAraq: so, check for NimVersion in the opengl module?
16:01:23*kapil__ quit (Quit: Connection closed for inactivity)
16:09:20*xcombelle quit (Ping timeout: 250 seconds)
16:26:59EXetoChas nimfix been applied to any packages yet?
16:45:08*milosn joined #nimrod
16:49:48*gour quit (Quit: Konversation terminated!)
16:52:18*gour joined #nimrod
17:14:42*Jesin quit (Quit: Leaving)
17:21:23AraqEXetoC: yes, I converted thousands of lines with it
17:25:07*matkuki joined #nimrod
17:37:50AraqEXetoC: yeah check for NimVersion
17:44:28*flaviu quit (Remote host closed the connection)
17:45:06Araqdom96: you got some format string instead to influence the smileys, don't complain
17:45:29Araqit's much easier this way
17:46:42*xcombelle joined #nimrod
17:52:08*gokr_ joined #nimrod
17:54:41*Matthias247 joined #nimrod
17:57:40*quasinoxen quit (Ping timeout: 250 seconds)
17:59:21*quasinoxen joined #nimrod
18:09:37*Jesin joined #nimrod
18:23:57*johnsoft quit (Read error: Connection reset by peer)
18:25:21*Varriount quit (Ping timeout: 244 seconds)
18:31:27*SkuulSockit joined #nimrod
18:33:06*SkuulSockit left #nimrod (#nimrod)
18:37:57*dom96_ joined #nimrod
18:41:33*BlaXpirit quit (Ping timeout: 264 seconds)
18:41:51*BlaXpirit joined #nimrod
18:42:36*Boscop__ joined #nimrod
18:43:55matkukiwhat is the 'pointer' type?
18:45:19*Triplefox quit (Ping timeout: 256 seconds)
18:46:18*Triplefox joined #nimrod
18:46:22*Boscop_ quit (Ping timeout: 256 seconds)
18:50:05*xcombelle is now known as xcombelle_afk
19:02:49EXetoCmatkuki: it's the untyped equivalent of 'ptr T'
19:02:50*AMorpork is now known as AFKMorpork
19:04:24matkukiEXetoC: I see a lot of uses of it in C bindings like SDL, what is it used in this context for?
19:05:34*BitPuffin joined #nimrod
19:05:48EXetoCmatkuki: opaque types
19:06:50matkukiEXetoC: oh, like void pointer in C?
19:07:11EXetoCbut it's better to use either empty objects or 'distinct pointer' instead, so as to be able to differentiate between different opaque pointers
19:07:21EXetoCmatkuki: yes
19:08:19EXetoCso that you don't accidentaly pass around pointers referring to the wrong data type
19:08:32*johnsoft joined #nimrod
19:08:47matkukiEXetoC: got it, thanks
19:12:56*flaviu joined #nimrod
19:14:40*flaviu quit (Read error: Connection reset by peer)
19:16:29*flaviu joined #nimrod
19:21:47*flaviu quit (Read error: Connection reset by peer)
19:24:17*flaviu joined #nimrod
19:28:44*Jesin quit (Ping timeout: 272 seconds)
19:31:51*BitPuffin quit (Ping timeout: 258 seconds)
19:34:10*dts joined #nimrod
19:35:15*xcombelle_afk is now known as xcombelle
19:40:04*BitPuffin joined #nimrod
19:49:06*gour quit (Quit: Konversation terminated!)
19:49:48*perturbation joined #nimrod
19:59:09*Jesin joined #nimrod
20:05:14*will joined #nimrod
20:05:30*Mat4 joined #nimrod
20:05:36Mat4hello
20:06:40willhi mat4, when's the push to github coming? ;D
20:07:40*matkuki quit (Quit: ChatZilla 0.9.91 [Firefox 33.1/20141106120505])
20:07:59Mat4I have a Github repro already
20:09:09willyeah, I've been checking it out... 2 months since the last commit!
20:10:03Mat4wait until next friday and check out
20:10:18Mat4or check up ?
20:10:28willlook forward to it :D
20:18:08*Jesin quit (Ping timeout: 256 seconds)
20:24:45*dts quit (Read error: Connection reset by peer)
20:35:12*dts joined #nimrod
20:37:01*Jesin joined #nimrod
20:41:57ldleworkEXetoC: hi
21:01:26*superfunc joined #nimrod
21:09:51*jhc76 joined #nimrod
21:21:07*milosn quit (Quit: Lost terminal)
21:34:58*xcombelle quit (Ping timeout: 265 seconds)
21:40:13*superfunc quit (Ping timeout: 252 seconds)
21:44:10ldleworkHow do I wrie a proc that doesn't return a value
21:44:48EXetoCproc p = ...
21:46:02ldleworksimple enough
21:51:30*Trustable joined #nimrod
21:57:36AraqTrustable: hi
21:57:43TrustableHi Araq
21:57:52Araqare you familiar with "git bisect"?
21:58:16Trustableno
21:58:37Araqwant to learn about it?
21:59:03Araqwhich commit broke https://github.com/Araq/Nimrod/issues/1684 ?
22:01:19TrustableAraq: I will try it when I find time.
22:09:28*Mat4 quit (Read error: Connection reset by peer)
22:10:16*Mat4 joined #nimrod
22:11:10*Boscop_ joined #nimrod
22:11:20*Boscop_ quit (Read error: Connection reset by peer)
22:11:43*Boscop joined #nimrod
22:11:43*Boscop quit (Changing host)
22:11:43*Boscop joined #nimrod
22:14:17*Boscop__ quit (Ping timeout: 240 seconds)
22:44:31ldleworkWhy is it telling me that game.screen is not assignable on line 24: https://gist.github.com/4b8c11838602c8c6e551
22:46:33EXetoCbecause game is not a var parameter
22:47:23ldleworkokay that makes sense
22:47:36ldleworkEXetoC: now it is saying that addr(game.key) has no address
22:48:20ldleworkah probably because they are not var either
22:48:41ldleworkhmm
22:48:57ldleworknow it says that draw() is an unknown identifier on line 39
22:49:05ldleworkeven though I have it defined as a proc taking TGame
22:50:27ldleworkInvalid type TGame
22:51:48ldleworkhmm why is my type invalid?
22:52:23EXetoCsymbols must be declared before the point at which they are used
22:53:00ldleworkThe error is on line 56 but I define TGame type at the top
22:53:59EXetoCthere's draw too
22:54:18EXetoCand you can lose that T prefix
22:55:04ldleworkEXetoC: this is what I have, https://gist.github.com/eee5fc2d8416b2d3d3db
22:55:29ldleworkWhy does line 53 indicate that Game is an invalid type if it is defined at the top
22:55:34ldleworkwhat did you mean "there's draw too"
22:57:57ldleworkAm I instantiating it wrong?
22:58:28Araqldlework: you cannot have 'var T' in an ojbect
22:58:39Araqit's only for parameters
22:58:56ldleworkAraq: how do I make the attributes of an object assignable?
22:59:31ldleworkhelloworld.nim(24, 6) Error: 'game.screen' cannot be assigned to
23:00:42EXetoCby making said var 'var'
23:00:54Araqmake your game param 'var'
23:01:39EXetoCthere's no per-field mutability
23:03:54*Hakaslak quit (Quit: TODO: Generate 'Part & Quit Message')
23:04:36ldleworkah
23:04:48ldleworkwait
23:04:51ldleworkgame is var
23:04:56ldleworkvar game = Game()
23:05:13ldleworkoh in the procs
23:06:05ldleworkit works!
23:08:39EXetoCwee
23:21:06ldleworkEXetoC: where can I put the build nim-libtcod so I don't have to reference it's path manually
23:21:12ldleworkis it in ~/.nimble
23:23:11*Hakaslak joined #nimrod
23:24:29ldleworkeh I'll just make a makefile
23:25:10*Hakaslak quit (Client Quit)
23:26:07ldleworkoh yeah nim's compiler has config files
23:26:40EXetoCI'll make it a package soon
23:31:18*Mat4 left #nimrod (#nimrod)
23:32:45ldleworkEXetoC: I'm getting Error: argument for command line option expected: '--path'
23:32:58ldleworkin my nim.cfg I have, --path:/home/dlacewell/dev/nim/nim-libtcod/src/libtcod
23:33:37EXetoCit's path=. --path= also works IIRC
23:33:58ldleworkyeah neither of those worked
23:34:00*Stefan_Salewski joined #nimrod
23:35:03EXetoCpath="..."
23:35:10EXetoCsee nim.cfg
23:35:18ldleworkquotes...
23:35:30*BlaXpirit quit (Quit: Quit Konversation)
23:35:36Stefan_Salewski{.hint[LineTooLong]: off.} seems to be accepted, but
23:35:42Stefan_Salewski{.hint[SmallLshouldNotBeUsed]: off.}
23:36:09Stefan_SalewskiError: invalid pragma: hint[SmallLshouldNotBeUsed]: off
23:36:12*superfunc joined #nimrod
23:38:16ekarlso-NimBot: foo
23:43:09ldleworkDoes nim support submodules?
23:43:37Stefan_SalewskiI think not.
23:43:47ldleworkpoop
23:44:52ldleworkSeems like we're asking for namespace problems?
23:45:56EXetoCwhy?
23:46:12EXetoCpeople haven't complained about this limitation much
23:46:34EXetoCnamespace collisions can be resolved by qualifying symbols
23:46:38ldleworkWell the ecosystem is small
23:47:22ldleworkEXetoC: I'm thinking more like I rely on a package named X and X is the natural name for my own module
23:47:36ldleworkBut my own X can't be namespaced under a larger parent module for my whole package or whatever
23:48:09ldleworkfrom bots.random import someproc
23:48:37ldleworkinstead, I have to do from random import someproc, but now that might conflict with the package 'random' I have installed via nimble
23:48:41EXetoCyou can have a hierarcy and do import foo/bar/baz
23:48:50EXetoCwhich is similar I guess
23:48:54ldleworkoh really?
23:49:04ldleworkthose are just path names?
23:49:17EXetoCI was thinking more about submodules residing in the same file as the parent
23:49:19EXetoCyes
23:49:34ldleworkoh that is totally sufficent
23:49:40EXetoCit should be libtcod/libtcod for my lib for example
23:51:04ldleworkEXetoC: hmm an annoying thing I just realized
23:51:13ldleworkEXetoC: if you do from foo import SomeType
23:51:30ldleworkyou don't have access to any of the procs on that type!
23:53:16EXetoCright. selective imports are not often used though
23:53:30ldleworkI'm really used to them from Python
23:53:54EXetoCmostly when only a small number of things will be imported, and I guess you have to take "member procs" into account
23:54:23ldleworkfrom foo import SomeType*
23:54:41ldleworkwould be convienent syntax for importing all the exported procs for that type too
23:54:50*johnsoft quit (Read error: Connection reset by peer)
23:57:09*superfunc quit (Ping timeout: 264 seconds)
23:59:02Stefan_SalewskiHm, grep tells me that LineTooLong is a hint, but SmallLshouldNotBeUsed is a warning. Have to read the manual, bye.