<< 03-02-2015 >>

00:00:20*Matthias247 quit (Read error: Connection reset by peer)
00:01:10*davidhq joined #nim
00:05:00*davidhq quit (Client Quit)
00:07:37*greshick joined #nim
00:08:09*greshick quit (Client Quit)
00:13:15*davidhq joined #nim
00:18:01*BitPuffin joined #nim
00:21:32*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:28:44*gunn joined #nim
00:31:03*davidhq joined #nim
00:43:39*sampwing quit (Ping timeout: 252 seconds)
00:47:33*sampwing joined #nim
00:48:25*BlaXpirit quit (Quit: Quit Konversation)
01:07:40*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:09:04*endou______ quit (Ping timeout: 265 seconds)
01:10:09*CARAM__ quit (Ping timeout: 276 seconds)
01:11:08*davidhq joined #nim
01:11:52*davidhq quit (Client Quit)
01:12:46*Demon_Fox joined #nim
01:13:09*endou______ joined #nim
01:14:27*davidhq joined #nim
01:14:40*nande quit (Remote host closed the connection)
01:15:14*davidhq quit (Client Quit)
01:21:51*AtomicBool joined #nim
01:22:04AtomicBoolwhen will nim be in the benchmarks game?
01:24:05*CARAM__ joined #nim
01:34:25def-AtomicBool: how do you get in there?
01:35:55*davidhq joined #nim
01:36:13*nande joined #nim
01:36:25*davidhq quit (Client Quit)
01:38:09*davidhq joined #nim
01:38:11*davidhq quit (Client Quit)
01:40:53def-I read somewhere that they don't want to add languages, so I didn't bother writing the benchmarks in Nim
01:44:31*dts|pokeball quit (Ping timeout: 256 seconds)
01:46:52*fizzbooze joined #nim
01:48:13AtomicBoolreally?
01:48:15AtomicBoolwhere?
01:49:10*Sornaensis quit (Max SendQ exceeded)
01:50:16*Sornaensis joined #nim
01:50:39def-http://benchmarksgame.alioth.debian.org/play.html#languagex
01:51:13def-They even mention Nim there now, oh
01:51:27def-I'll try to do the measurements I guess
01:54:21*dts|pokeball joined #nim
01:57:31*gsingh93 quit (Quit: Connection closed for inactivity)
02:01:59def-there are a few people working on nim benchmarks though
02:04:16*brson quit (Quit: leaving)
02:09:51*Demon_Fox quit (Ping timeout: 250 seconds)
02:13:45*d3m1gd quit (Ping timeout: 250 seconds)
02:21:31*Demon_Fox joined #nim
02:22:52*akiradeveloper joined #nim
02:22:56akiradevelopercannot evaluate at compile time: EINTR ?? what's is this?
02:25:02flaviuakiradeveloper: You're trying to run code that takes too long, and the compiler is stopping you from hanging it.
02:25:33EXetoCit's not the fact that it's a symbol taken from a C header then?
02:25:48EXetoCEINTR* {.importc, header: "<errno.h>".}: cint
02:26:04akiradeveloperyes. in posix module
02:26:53*Demon_Fox quit (Ping timeout: 265 seconds)
02:26:56akiradeveloperimported symbol can't be used in case statement?
02:27:14flaviuC FFI doesn't work at compile time.
02:27:47*sampwing quit (Ping timeout: 252 seconds)
02:29:36*darkf joined #nim
02:29:40*Demon_Fox joined #nim
02:31:31akiradeveloperI see. thanks
02:33:47*VinceAddons quit (Read error: Connection reset by peer)
02:52:59*fizzbooze quit (Quit: WeeChat 1.1.1)
02:58:39*fizzbooze joined #nim
02:58:50*Demon_Fox quit (Quit: Leaving)
03:04:25*fizzbooze quit (Quit: WeeChat 1.1.1)
03:04:38*fizzbooze joined #nim
03:05:08*Demon_Fox joined #nim
03:09:31*Demon_Fox quit (Ping timeout: 256 seconds)
03:10:36*Demon_Fox joined #nim
03:12:43*BitPuffin quit (Ping timeout: 264 seconds)
03:29:21gmpreussner|worki just discovered term rewriting macros. holy crap are those awesome :D
03:30:19gmpreussner|worknow i have to unlearn C++ expression templates
03:30:24*sampwing joined #nim
03:35:31*hguux__ quit ()
03:35:47*hguux__ joined #nim
03:36:22*gunn_ joined #nim
03:36:39*EXetoC quit (Ping timeout: 264 seconds)
03:36:58*nande quit (Read error: Connection reset by peer)
03:37:58*gunn quit (Ping timeout: 252 seconds)
03:39:45flaviuAraq, Varriount_, dom96: More spam on the forum
03:44:31def-flaviu: every night the same spam even
03:54:18Demosgmpreussner|work, I know right, yet another nim feature where you learn it and thing "well OBVIOUSLY that is how this should be done"
04:01:21*Guest51733 is now known as adam12
04:01:46*FusionGaming quit (Ping timeout: 255 seconds)
04:06:46*FusionGaming joined #nim
04:18:13def-AtomicBool: the nim implementations i could find: https://github.com/def-/nim-benchmarksgame
04:20:51*Demon_Fox quit (Ping timeout: 246 seconds)
04:23:17*sampwing quit (Ping timeout: 252 seconds)
04:25:51dts|pokeballhow come i cant see the threads im involved in on the forum and only the current ones
04:28:22*Demon_Fox joined #nim
04:30:38*akiradeveloper quit ()
04:35:33*sampwing joined #nim
04:35:56*Demon_Fox quit (Ping timeout: 245 seconds)
04:49:57*adam12 quit (Ping timeout: 265 seconds)
04:56:21*adam- joined #nim
05:15:01*dapz joined #nim
05:17:11*sampwing quit (Ping timeout: 252 seconds)
05:23:58*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:38:37*fizzbooze quit (Quit: WeeChat 1.1.1)
05:39:01*gunn_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:40:15*gunn joined #nim
05:48:44*Fusion_Gaming joined #nim
05:51:13*Demon_Fox joined #nim
05:52:03*FusionGaming quit (Ping timeout: 245 seconds)
05:54:04*jon____ joined #nim
05:54:09jon____hi
05:54:36def-hi jon____
05:55:37jon____so if i want to learn nim the documentation availabe is sufficient ?
05:55:54def-These resources are good for learning Nim: http://nim-lang.org/learn.html
05:56:44jon____this is a stable release yes?
05:56:51dts|pokeballjon____, no one recommends the tutorial. ive been considering writing a begginer one
05:57:35jon____so if i want to learn the basics with the examples where would i need to look up?
06:00:36def-I actually like the tutorial, so I would say, start here: http://nim-lang.org/tut1.html
06:05:03def-still looking forward to see your beginner tutorial, dts|pokeball
06:05:32*gtrundle quit (Ping timeout: 272 seconds)
06:07:08*dapz joined #nim
06:08:55*BitPuffin joined #nim
06:09:59dts|pokeball:D
06:11:36*dts|pokeball quit (Quit: Leaving)
06:12:05*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:13:34*BitPuffin quit (Ping timeout: 265 seconds)
06:13:53*dtscode joined #nim
06:18:25jon____when would the beginner tutorial come out?
06:18:40*bjz joined #nim
06:19:47def-no idea, i think it was just an idea of dts|pokeball
06:19:58jon____hmm
06:20:03*gtrundle joined #nim
06:20:11def-do you have experience with other programming languages?
06:20:27jon____i know a bit pf python java and c
06:20:58def-sounds like you would do fine with the existing tutorial
06:21:13jon____thank you
06:21:49jon____would nim work with eclipse ide or is there a saparate ide for that?
06:22:09jon____when would Nim go stable?
06:22:51*Angry quit (Ping timeout: 244 seconds)
06:23:19def-There's the Aporia IDE. Other editors can also be used: https://github.com/Araq/Nim/wiki/Editor-Support
06:23:26dtscodei need to get my site working on it before i start the tut
06:23:34def-I haven't heard of eclipse support, no idea
06:23:58jon____ok
06:25:19def-Nim is stable enough to use. Most changes are bug fixes. 1.0 will hopefully be out in the next months
06:26:27jon____in most of the news which i have seen on the internet many users are talking about D,Go,Rust but there seems not too much of Nim users out there
06:28:36jon____in the tutorial Nim part 2 is obsolete and been referred to manual will there be an update for part 2 of Nim tutorial or should i go through manual for advanced language features
06:29:36*Demos quit (Read error: Connection reset by peer)
06:30:50def-hm, i guess the manual is fine too, but it's quite big, have to read selectively
06:34:26*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:39:08*dapz joined #nim
06:39:08*dapz quit (Client Quit)
06:44:36*dtscode quit (Quit: ZNC - http://znc.in)
06:45:45*Demon_Fox quit (Quit: Leaving)
06:46:58*dtscode joined #nim
06:55:12*dtscode quit (Quit: Leaving)
06:56:19*dumdum joined #nim
06:56:47*dtscoder joined #nim
06:57:20*dtscoder is now known as dtscode
06:58:02*bjz joined #nim
07:01:56*jon____ quit (Quit: Page closed)
07:15:26*dymk quit (Ping timeout: 265 seconds)
07:16:03*dymk joined #nim
07:20:39*interested_user joined #nim
07:21:03*Grauwolf quit (Ping timeout: 264 seconds)
07:21:52*interested_user quit (Client Quit)
07:37:55*nueh joined #nim
07:50:17*chemist69 joined #nim
08:08:28*dapz joined #nim
08:11:58*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:14:18*nueh joined #nim
08:15:13*DemonOne quit (Read error: Connection reset by peer)
08:21:23*dapz quit (Quit: Textual IRC Client: www.textualapp.com)
08:27:53*kniteli quit (Ping timeout: 240 seconds)
08:35:44*kniteli joined #nim
08:39:56*Trustable joined #nim
08:46:36*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:54:05*VinceAddons joined #nim
09:11:43*nueh joined #nim
09:11:46Triplefoxnimble seems to be having trouble with bitbucket repos? http://hastebin.com/hezobuvobo.tex
09:12:11Triplefoxor maybe i have a badly configured build
09:18:29Triplefoxwelp, that library seems to have rotted anyway
09:20:00*sillesta joined #nim
09:32:07*BlaXpirit joined #nim
09:33:51*d3m1gd joined #nim
09:34:08*gtrundle quit (Ping timeout: 245 seconds)
09:45:56*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:50:39*NimBot joined #nim
09:52:20*gtrundle joined #nim
10:09:05*d3m1gd quit (Ping timeout: 246 seconds)
10:18:25*biscarch quit ()
10:18:44*biscarch joined #nim
10:39:27*dumdum quit (Ping timeout: 256 seconds)
10:41:22*clone1018 quit ()
10:41:35*clone1018 joined #nim
10:44:22*nueh joined #nim
10:55:57*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
10:56:04*akiradeveloper joined #nim
10:56:29akiradeveloperDo you have some sample code to convert seq[T] to ptr T?
10:57:25akiradeveloperaddr(myseq[0])?
10:58:14akiradeveloperis it guaranteed that the internal memory blocks of seq is contiguous in virtual address?
11:02:51*silven quit (Ping timeout: 250 seconds)
11:04:53*silven joined #nim
11:06:50*valberg left #nim (#nim)
11:08:07*Angry joined #nim
11:11:06*nueh joined #nim
11:16:00akiradevelopersorry, resolved myself
11:16:04*akiradeveloper quit ()
11:20:59gtrundle
11:22:11gtrundle By
11:34:01*dumdum joined #nim
11:38:57*kashyap_ quit (Quit: Page closed)
11:40:26*kashyap_ joined #nim
11:43:34*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
11:56:34*nueh joined #nim
12:04:53*d3m1gd joined #nim
12:05:27*MajorWork joined #nim
12:09:41*EXetoC joined #nim
12:21:20reactormonkdef-, if you close an issue, imo slap it in as a test. Let's see if Araq thinks that inflates the test base.
12:26:23def-reactormonk: can you tell me how to run a single test or category?
12:30:22*MajorWork quit (Changing host)
12:30:22*MajorWork joined #nim
12:31:34reactormonkdef-, b) is answered by --help
12:37:02*JinShil joined #nim
12:39:01*JinShil quit (Client Quit)
12:41:03*d3m1gd quit (Read error: Connection reset by peer)
12:41:19*nueh quit (Quit: Textual IRC Client: www.textualapp.com)
12:57:05*g4rg4m3|_ joined #nim
12:57:23*sillesta quit (Ping timeout: 250 seconds)
12:57:23*jasondotstar quit (Ping timeout: 250 seconds)
13:20:46def-reactormonk: doesn't work for me, i try testament/tester --print c stdlib
13:20:49def-and nothing happens
13:20:56reactormonkhmmm
13:21:01reactormonk./koch tests c stdlib
13:21:30def-ah, never knew koch has the testers, nice
13:27:08AngryI'm not sure what's wrong "Error: internal error: GetUniqueType" http://pastebin.com/PHdcyQTM
13:29:47EXetoCthe fact that a variable is an openarray perhaps. they're for parameters only
13:30:03EXetoCeither way, such errors always indicate compiler bugs
13:30:05Angryhow would I aproximate a c++ vector in a class then
13:30:50EXetoCuse seq instead
13:31:23Angrysame erro replacing openArray with seq
13:31:41EXetoCok I see what's wrong
13:32:07EXetoCother than that
13:33:33EXetoCchances are you don't want "var b = bf", because b will then be a type description. you want something like "var b = bf(...)"
13:34:20Angrywhat would the ... be? I haven't defined a constructor
13:34:29EXetoCapparently you can't do typedesc that way, but it's not what you want in any case
13:34:46EXetoCbf(ip: x, ...)
13:37:24AraqAngry: use a 'seq' instead of 'openArray' and 'var b: bf' instead of 'var b = bf'.
13:38:48EXetoCsome or all fields can be omitted though
13:39:20Angryafter "var b=bf(ip:0)" or "var b: bf" the line "echo $(b.ip)" fails to compile. Any help?
13:41:08EXetoCyou would have to do "echo($b.ip)", but "echo b.ip" is preferable
13:41:52Angrythanks, that worked. What is the difference between var b : bf and var b = bf() ?
13:42:05EXetoC"var b: T" means that b is of type T
13:43:09AngryI see. And the = bf(ip:4) after that works. Makes far more sense now.
13:44:35EXetoCthe type is inferred in this case: "var b = bf()". "var x: bf = bf()" is identical
13:45:19EXetoC"var x: bf" gives it the type 'bf' but the whole structured is now zero-initialized since no specific value is given
13:45:53Angryso with bf() I could have trash in the structure?
13:46:52EXetoCthat should zero-initialize too
13:47:10Angryis there a way to not initialize it?
13:47:35EXetoCeverything is first zero-initialized unless the noInit pragma is applied ("var x {.noInit.}: T" IIRC)
13:48:41*AtomicBool quit ()
13:48:45EXetoConly do that if speed is a concern
13:48:56*AtomicBool joined #nim
13:49:25def-and even then, measure that it actually makes a difference
13:49:50def-don't need to fill code with useless micro-optimizations
13:49:53EXetoCand the convention for type names is FooBar (pascal case)
13:51:13AngryThanks for the help, and I normally use that casing speed, but this is just a brainfuck interpreter for learning the language. I'll likely be back since I'm trying to hit as many language features as possible, but it's time to go.
13:51:28Angryscheme not speed
13:51:41*Angry quit (Read error: Connection reset by peer)
14:07:52*sepisoad joined #nim
14:09:32sepisoadhow to import a module from a nested something like this: "import doc/subdoc/module"
14:09:56sepisoador somethig like this: "import ../../moduleA"
14:14:19Araqlike this:
14:14:26Araqimport doc/subdoc/module
14:15:34sepisoad@Araq thanks, it works now, i'm trying to rewrite one of my applications in nimlang
14:16:07*askatasuna joined #nim
14:16:13sepisoadis it not possible to have two exported functions with same names in two different modules
14:16:40sepisoadlike ModuleA.MyProc() and ModuleB.MyProc()
14:16:58dom96it is
14:18:55sepisoadhow about two modules with same names in different sub directories
14:22:09sepisoadlike "/a/x/moduleX" and "/a/y/moduleY"
14:25:47EXetoCI think you have to do "import foo as bar" then
14:31:53Araqyou have to use pseudo-nimble packages for that, but IMHO it's a PITA to do that on purpose
14:32:07Araqbetter come up with different names for different modules
14:32:26sepisoadok, got it
14:33:26Araqthink about poor Araq. he might want to read your code without paying attention to your directory layout.
14:42:08sepisoadhaha, ya, i'm just convinced
14:42:33EXetoCso why support sub-directories in the first place? would people complain too much otherwise?
14:46:38AraqEXetoC: for nimble packages it's essential everybody can have their own utils.nim module
14:50:54*BitPuffin joined #nim
14:56:40reactormonkAraq, have fun with all the PRs :-P
14:56:56Araqreactormonk: does it boot on windows again?
14:57:13reactormonkAraq, right... lemme fire up EC2
15:05:58*darkf quit (Quit: Leaving)
15:06:21reactormonkwow, I need a few more ram sticks
15:06:44Varriount_Meep
15:06:50*Varriount_ is now known as Varriount
15:07:20VarriountAraq: Ever considered using SIMD instructions with Nim's GC?
15:07:31reactormonksooo how do I setup a dev environment in windows? I have zero dev experience on windows
15:07:45VarriountApparently memcpy-like procedures can be sped up considerably.
15:08:06AraqVarriount: the GC doesn't use memcpy afaik
15:08:21Varriountreactormonk: Depends. Do you want to work with primarily open-source software? Are you planning on developing for both 32 & 64 bit?
15:08:36Araqand C's builtin memcpy should use these extensions anyway
15:08:38reactormonkVarriount, I wanna test the nim build on windows
15:08:54Varriountreactormonk: Generally, I install Mingw-w64, add GCC to path, then boot Nim.
15:09:15VarriountThat's the simplest (though not the most flexible) way to set up things.
15:09:34reactormonkVarriount, 32bit
15:10:05Varriountreactormonk: The '-w64' just means that it *supports* 64 bit architectures. There's a 32-bit version as well.
15:10:10reactormonkok
15:10:22reactormonkoh right, windows. mixed archs common.
15:10:33*BlaXpirit quit (Read error: Connection reset by peer)
15:11:00*BlaXpirit joined #nim
15:11:01VarriountThe actual difference between Mingw-w64 and Mingw is more of a development ideology split.
15:12:09VarriountAraq: Is there a way to invoke 'check' with a dirty file?
15:12:22Araqno
15:12:27Varriount:<
15:12:33Araqdirty files are for nimsuggest only
15:13:25onionhammerhey, devel bootstrapping fixed?
15:14:14reactormonkVarriount, win-builds or mingw-builds?
15:14:45Varriountreactormonk: You do know we have a Nim installer, complete with Mingw compiler, on the website, right?
15:14:55reactormonkVarriount, nope. Never bothere to look
15:15:04onionhammervarriount are you working on nimlime?
15:15:11VarriountMany hours have been spent developing it, solely for your convenience.
15:15:45Varriountonionhammer: Yes. I've had nothing but the NimLime source files open in Sublime Text for the past week.
15:16:06onionhammercool
15:16:12onionhammeri started adding in nimsuggest
15:16:22VarriountI saw.
15:16:57reactormonkVarriount, manually install git too?
15:17:00onionhammeralso i added in hot-reloading (from one of wbonds packages)
15:17:23onionhammerso you dont need to restart st for tweaks
15:17:24Varriountreactormonk: Or you could download master from Github
15:18:12Varriountonionhammer: Which file did you add that too? I'm not sure I like adding external packages to the repo.
15:18:19VarriountWe have Package Control for a reason.
15:18:21*mwbrown joined #nim
15:18:32onionhammerexternal packages?
15:18:49onionhammerI didnt add an external package, I just stole what wbond did for his package
15:18:51onionhammerit's in Nim.py
15:19:19onionhammerit's only for development/debugging purposes; for you and me mainly
15:19:52*sepisoad quit (Quit: Leaving)
15:20:12VarriountAh, I see. Ok.
15:20:28onionhammerset auto_reload to true, but dont check it in
15:20:39onionhammerwe can probably make that a setting
15:20:42reactormonkAraq, oh, I see. I get "The system cannot find the file specified" when I try to run c koch.nim
15:20:43Varriountonionhammer: When you said 'from one of wbonds packages', I thought you meant you just copied one of his package repos
15:20:50onionhammerah
15:21:03*kuzy000_ joined #nim
15:21:05onionhammerno, I googled how to redo that and I saw a forum post from wbond saying "look what i did for sftp and blah blah"
15:21:37reactormonkwhich doesn't seem to be an error text generated by nim...
15:21:57onionhammerso anyway; nimsuggest is a lot lot faster, but there's still some issues with it when it comes to ambiguous project files
15:21:57Araqreactormonk: nim cannot find gcc.exe
15:22:13onionhammerand we need to reimplement the suggest stuff
15:23:08onionhammervarriount i'm hoping araq will make nimsuggest a bit more idiotproof :)
15:23:30Araqonionhammer: will work on it again, soon
15:23:49onionhammerno worries
15:24:20reactormonkAraq, oh, thanks
15:30:21reactormonkAraq, might just be the installed, it's apparently not in PATH
15:33:28Araqyep
15:33:31Araqbbl
15:34:28*Angry joined #nim
15:46:51reactormonkanyone can fix that? I have no idea about dev environments in windows.
15:50:09*elie is now known as Guest20112
15:52:42*johnsoft quit (Read error: Connection reset by peer)
16:03:04AngryIf I have a type with sequences ("tape : seq[uint8]" ) is there a way to default initialize them to a valid sequence. Assigning each seq the value @[] works, but it feels like something that should be automatic
16:09:02EXetoCdynamic allocation is never implicit though
16:10:15EXetoCAngry: but, 'add' will allocate if necessary at some point
16:10:48*kapil__ quit (Quit: Connection closed for inactivity)
16:12:42Angryreplacing a @[] with an .add(5) causes a segfalt when accessing the variable. What am I missing?
16:13:17EXetoC"at some point" meaning some time in the future
16:13:35Angryhttp://pastebin.com/wHBmrXcD
16:13:48EXetoCI guess it'll be like what safeAdd is now
16:14:38EXetoCI'm saying that "add" will work like that at some point, but it doesn't now
16:14:44Angryby 'at some point' do you mean in the compiler life
16:14:48EXetoCso that should catch most mistakes
16:14:54Angryas in a not implimented feature
16:15:20EXetoCyes
16:16:25EXetoCyou can also do "var x = newSeq[T]()". perhaps it'll become newSeq(T) one day
16:16:32AngrysafeAdd works as expected thanks.
16:16:57Angryin a type declaration?
16:18:49EXetoC"var x = newSeq(YourTypeHere)", which is a little nicer imo
16:21:02EXetoCthe prototype would then be "proc newSeq(T: typedesc, len = 0): seq[T]" rather than "proc newSeq[T](len = 0): seq[T]". the former would allow it to be called like in the example above
16:22:17EXetoCI might be going off on a tangent here, but I hope that explains it :-P
16:25:09Angrysince we are talking about changes, I'm not sure add should check for a nil seq. If I know it won't help I shouldn't pay the price for it. It feels like something that should only be done in debug mode and throw an exception when it occurs. addSafe seems like a great alternative when you can not make any guarantees
16:27:17EXetoCit's very rarely going to make appends unacceptably slow, and we will of course have an unsafeAdd at that point
16:28:33Angrywait, does add not resize the array when neccisary? if not then you are right it should by default. It just 'felt' like the null check every add would be unneccisary.
16:31:20EXetoCit does, if there isn't enough capacity
16:51:04*chemist69 quit (Quit: leaving)
16:59:44*brson joined #nim
17:14:52*matkuki joined #nim
17:16:52AtomicBoolwell it would be nice to see nim on the benchmarks game, cya!
17:16:56*AtomicBool left #nim (#nim)
17:19:05*johnsoft joined #nim
17:22:20*adam- is now known as adam12
17:24:45*MajorWork quit (Quit: Leaving)
17:34:43*sampwing joined #nim
17:36:19*NimBot joined #nim
17:39:38*Demos joined #nim
17:40:04*Matthias247 joined #nim
17:43:07*kashyap__ joined #nim
17:43:19*dumdum quit (Ping timeout: 256 seconds)
17:44:37kashyap__Hi ... I am trying to traslate xv6 (unix kernel) to Nim ... Iam stuck with trying to translate C here - https://github.com/swetland/xv6/blob/master/include/proc.h#L39 (where gcc is told to use %gs:0 for cpu symbol)
17:45:02BlaXpirit:o
17:45:49kashyap__perhaps I have to just use a global variable for now and see if it is really an issue or not
17:50:29Angryhow do you compare a uint8 to 0? u8_variable != 0'u8 is giving type errors
17:51:19kashyap__Angry - you can perhaps try import unsigned
17:51:58Angrythat was it.
17:59:37*UberLambda joined #nim
18:08:38def-kashyap__: what about nim's asm statement?: http://nim-lang.org/manual.html#assembler-statement
18:13:20def-that kernel looks fun
18:16:49matkukiIs there a macro that can make a namespace inside a module, so you can use "MyModule.MyNamespace.MyProc(x)" from another module?
18:18:31matkukiI should actually ask if this can be done or not?
18:26:12BlaXpiriti have never seen it done
18:30:45matkukiBlaXpirit: Thanks for the info.
18:37:18matkukiBlaXpirit: You seem to know something about games. Which 2D physics engine would you recommend? I'm looking for simplicity.
18:37:47BlaXpiriti've considered only Box2D and Chipmunk
18:37:55*BitPuffin quit (Ping timeout: 264 seconds)
18:37:56BlaXpiritand chose Chipmunk
18:40:14BlaXpiritthere are some bindings, seem to work, but i haven't really tried
18:40:36matkukiI'm also looking at Chipmunk. Tried compiling the demo in the D programming language and looks nice. How would you rank it in simplicity? I haven't looked at the guts of it yet.
18:41:00BlaXpiritthere isn't much choice anyway
18:41:06BlaXpiriti don't think there are nim bindings for anything else
18:42:42BlaXpiritonce i wanted to rewrite my nice example game to nim but gave up quickly
18:43:02matkukiWhy?
18:43:47BlaXpiritdon't remember
18:44:00BlaXpiritoh yerah.. it included SVG parsing
18:47:02*mytrile joined #nim
18:57:20*Etheco quit (Quit: Leaving)
19:06:38*Demos quit (Ping timeout: 245 seconds)
19:15:01def-BlaXpirit: i also started writing a game and needed svg parsing: https://github.com/def-/nim-rsvg
19:15:37BlaXpiritwhat does this do
19:15:50def-that's a wrapper for librsvg
19:15:55BlaXpiritthis is not svg parsing
19:15:57def-oh wait
19:16:01def-now i understand parsing
19:17:09*lgfkewnfkjewf joined #nim
19:17:26lgfkewnfkjewfHow do I get system time?
19:17:43lgfkewnfkjewfLike unix time.
19:18:36Araqtimes module
19:20:48*Angry quit (Ping timeout: 245 seconds)
19:24:01*lgfkewnfkjewf quit (Ping timeout: 246 seconds)
19:36:34*Demos joined #nim
19:37:50VarriountAraq: How would you feel about the 'check' command growing a new argument that determines whether it reads from stdin or from a file?
19:38:19Araqwe don't support stdin for nimsuggest either
19:38:33VarriountUh... yes you do?
19:38:42*lknflkewnflkewnf joined #nim
19:38:49Araqno. you can give the commands via stdin
19:38:55Araqbut not the dirty buffer itself
19:39:14lknflkewnflkewnfOne more question; how much performance overhead is there for methods as opposed to procs?
19:39:41Varriountlknflkewnflkewnf: Methods incur a O(n) overhead, where 'n' is the number of types to dispatch to.
19:39:57DemosVarriount, that is not a very useful statement
19:39:58Varriountlknflkewnflkewnf: You are so lucky I have name-completion.
19:40:41Demosif that n gets big enough to display asymptotic behavior something is very wrong
19:40:48Araqlknflkewnflkewnf: hard to say. 3x perhaps. if you blindly type 'method' instead of 'proc' and don't use the dynamic binding, there is no direct overhead.
19:41:25Araqsince then the compiler can optimize the dispatching away
19:41:49DemosAraq, I wonder what nim's methods look like compared to vtables wrt to cache effects
19:42:11VarriountAraq: I ask because integrating an IDE with the 'nim check' command is a bit akward at the moment. When the check command is run, I have to save the dirty buffer somewhere.
19:42:38lknflkewnflkewnfAraq, so by dunamic binding you mean something similar to Javascript's prototyping, correct?
19:42:40AraqVarriount: yes, that's unavoidable. but you should use temporary files for that
19:42:59Araqlknflkewnflkewnf: no, I mean that you actually use inheritance and stuff
19:43:12DemosI forget how I did that in VS, I think I used temp files but I recall having trouble with the dirty buffer support
19:43:12VarriountI can either save it to the original file (which the user may not want), to a 'dirty' file (which can cause errors due to circular dependancies), or implement some sort of file swap mechanism
19:43:23DemosI think the main problem was with nim suggest though
19:43:35lknflkewnflkewnfAraq, okay, I see.
19:44:07AraqVarriount: the proper solution is to make nimsuggest support the 'check' command
19:44:37Araqthen dirty files work as they do for 'sug' and 'def'
19:45:07AraqDemos: I fixed the dirty buffer support
19:45:13Demosallright
19:46:07lknflkewnflkewnfI don't know much about Nim internals, but would proc pointers incur less overhead than method calls?
19:50:30Demosbootstraping seems broken again looks like rstgen is calling algorithm.sort and overload resolution is failing
19:54:51def-Demos: on windows?
19:54:57Demosyeah
19:55:09def-that's what the builder also said, but i don't understand why
19:55:13Demosbut it is not a c compiler issue
19:55:19Demosas far as I can tell
19:55:21def-any chance of debugging or fixing it?
19:55:30DemosI can try
19:55:30def-yeah, it was introduced by my changes, but i don't understand how they did that
19:55:36def-because it only affects windows
19:55:44def-and the changes were not windows-specific
19:56:17Demosdo you mean commit 11a5a4
19:56:18Araqlknflkewnflkewnf: yes, in general they do.
19:56:34Varriountlknflkewnflkewnf: Yes
19:56:37AraqDemos, def- I can fix it
19:56:43def-Araq: alright, great
19:56:59Varriountlknflkewnflkewnf: If you look at C++ internals, proc pointers are how vtables are implemented.
19:57:45VarriountOf course, the downside with vtables is that they require a pointer inside the structure that points to the vtable. Or you embed the vtable in the structure, which takes up space.
19:57:56Demoslknflkewnflkewnf, note that nim's proc() types are closure by default, and have an extra environment pointer, c++ style vtables share the environment pointer among all functions in the vtable
19:59:19AraqDemos: well that depends on the calling convention
19:59:32Araqif you don't use .closure, there is no such overhead
19:59:53DemosI thought that variables of type proc(...) were closure by default
20:00:01Araqbut you have to watch out as .closure is the default
20:00:09AraqDemos: exactly
20:00:10*EXetoC quit (Remote host closed the connection)
20:00:22Demoswhich is what I said
20:01:19DemosAraq, care to share what broke bootstrapping
20:01:36Araqwell I dunno
20:02:06Araqbut my educated guess is that foo[T](a, b) depends on the arbitrary order in the symbol table from working
20:02:16Araqand since symbols have been added
20:02:20Araqthe order changed
20:02:41Araqthe symbol table is really fucked up, it was never really updated
20:02:49Araqto deal with the language spec changes
20:03:49Araqbut hey, slowly but steadily the symtab learns about Nim's requirements ;-)
20:05:01Demosit does seem to work if I go back to an earlier commit and then boot, then go to devel and boot again
20:05:17Demosab5b8f5 is the commit I went back to
20:06:58*EXetoC joined #nim
20:07:21EXetoCdamn imagemagick hanging the OS
20:08:12matkukiAre there "padLeft/padRight" procs for strings? Only found "align".
20:09:08*dymk quit (Ping timeout: 245 seconds)
20:16:04def-matkuki: not in the standard library. you can easily add padRight yourself with repeatChar, or take a look at http://lyro.bitbucket.org/strfmt/
20:16:09*nande joined #nim
20:16:37matkukidef-: Great thanks
20:16:45*xeizlif quit (Ping timeout: 244 seconds)
20:20:29Araqlknflkewnflkewnf: proc pointers also have the advantage that they work much better with Nim's effect system
20:21:50Demosand methods are not used very much in real code, so are more likely to be buggy
20:22:17Demosproc pointers will also work across modules (executable modules, not nim ones) better
20:23:54*dymk joined #nim
20:24:38Araqand they work better with generics too ... hrm
20:29:38AraqDemos: I'm not aware of any bug wrt methods though. except that according to Jehan the effect system is broken for them. But I never understood why that is.
20:30:14DemosI have run across a few, they have all been fixed though. they are just not used that much
20:31:32*UberLambda quit (Quit: Leaving the Matrix)
20:32:49*kuzy000_ quit (Ping timeout: 264 seconds)
20:35:05*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:42:23*xeizlif joined #nim
20:42:53*dymk quit (Ping timeout: 245 seconds)
20:44:31*dymk joined #nim
20:45:13*sampwing quit (Ping timeout: 252 seconds)
20:46:50*xeizlif quit (Ping timeout: 252 seconds)
20:52:13DemosWhy the restriction on consts not being objects?
20:53:27*xeizlif joined #nim
20:53:50*bjz joined #nim
20:55:01AraqDemos: 'case objects' and inheritance was too much work to implement and 'case objects' are not possible as consts for C89
20:55:29Araqbut I will make it work for objects that don't use these 2 features asap
20:57:41*Demos quit (Ping timeout: 250 seconds)
21:09:02*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:12:37EXetoCditch VC compat :p
21:25:29*askatasuna quit (Quit: WeeChat 1.1.1)
21:25:56*bjz joined #nim
21:27:41*mytrile quit (Read error: Connection reset by peer)
21:32:30*sampwing joined #nim
21:36:40*superfunc joined #nim
21:41:13*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:51:48lknflkewnflkewnfAre parallel and spawn not currently implemented?
21:52:59lknflkewnflkewnfDesktop/game.nim(17, 2) Error: undeclared identifier: 'parallel'
21:53:29lknflkewnflkewnfOh, nevermind
21:54:09superfuncdid you import threadpool?
21:54:18lknflkewnflkewnfHeh, now I did.
21:54:39superfuncright on
21:55:42*superfunc quit (Quit: leaving)
22:04:09*Angry joined #nim
22:05:25VarriountHello Angry
22:05:40AngryHey there
22:14:03dom96def-: thank you for improving the GSoC 2015 ideas page.
22:15:31*lknflkewnflkewnf quit (Ping timeout: 246 seconds)
22:16:31*sampwing quit (Ping timeout: 252 seconds)
22:20:01*sampwing joined #nim
22:34:01*mwbrown quit (Ping timeout: 264 seconds)
22:45:11*Jehan_ joined #nim
22:56:50*idontcare joined #nim
22:57:05*idontcare left #nim (#nim)
23:04:14*Etheco joined #nim
23:06:11flaviudef-: re yaml parse, I've already made wrapped one: https://gist.github.com/71548888e37ccd0219a0
23:06:50flaviuI won't make guarantees as to its quality though, it's probably really buggy.
23:08:33*CARAM__ quit (Ping timeout: 250 seconds)
23:09:12Araqyaml needs to die
23:09:18Araqnot get more support
23:09:31Araqso complex for what it offers
23:09:33*endou______ quit (Ping timeout: 245 seconds)
23:10:52flaviuAraq: people will use yaml if they like it, regardless of what your opinion of yaml is. Might as well as have a high quality implementation (mine certainly isn't, btw)
23:11:24Araqflaviu: they won't use it if there is no lib for it :P
23:11:34BlaXpirit"it" being Nim
23:11:35Araqbut you're right of course
23:11:37flaviuYeah, they'll just use ruby instead.
23:12:43BlaXpiritflaviu, any plans to release it?
23:13:16flaviuBlaXpirit: Sure, but not as-is.
23:13:27BlaXpiriteh why not
23:14:01flaviuNim already has plenty of buggy libraries, I don't want to add another one.
23:14:17flaviuI'd have to create a test suite and clean up the code first.
23:14:47*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805])
23:15:52BlaXpiritbleh
23:16:01BlaXpiritif someone really wants it, they can do it
23:17:39*Trustable quit (Remote host closed the connection)
23:18:52def-so, no more yaml for gsoc i guess. we have nice toml and json anyway
23:19:11*endou______ joined #nim
23:20:34def-so we don't have any easy gsoc project ideas now
23:20:41*endou______ quit (Changing host)
23:20:41*endou______ joined #nim
23:20:56def-(except improving the times module)
23:21:18flaviuThat's not easy
23:21:23flaviuThat's the opposite of easy.
23:21:46def-Last year it was in as easy. Why is it hard?
23:21:55flaviuhttp://forum.nim-lang.org/t/814/2#4798
23:24:36BlaXpiritplease tell me what is the deadline for applying for gsoc for normal people
23:24:58BlaXpiriti mean that as in "not for projects"
23:25:33flaviuBlaXpirit: Look at the circle thing on the side of https://www.google-melange.com/gsoc/homepage/google/gsoc2015
23:26:02BlaXpiritand what does it mean
23:26:13BlaXpiriti think it shows when it starts
23:26:22BlaXpiritoh
23:27:08BlaXpirithttps://www.google-melange.com/gsoc/events/google/gsoc2015 gives all the info.
23:28:41*CARAM__ joined #nim
23:28:41BlaXpiritlol the links appear to be exactly the same, but they're not
23:30:19*Demos joined #nim
23:44:26*pafmaf joined #nim
23:50:01*sampwing quit (Ping timeout: 252 seconds)
23:54:51Araqhrm did somebody revert the patch causing bootstrapping to fail?