<< 20-02-2015 >>

00:01:01*rapind quit (Ping timeout: 250 seconds)
00:02:24BlaXpirithow to turn seq[int] into array[5, int] ?
00:02:51SiecjeYou can't put procedures in a table?
00:03:15def-Siecje: the procs need to be procvars for that
00:04:40BlaXpirit.eval import tables; proc test() {.procvar.} = echo "hi"; var t = {"test": test}.toTable(); t["test"]()
00:04:43MimbusBlaXpirit: hi
00:04:59ekarlsoflaviu: https://zetta.io/en/ back up
00:05:20*Jehan_ quit (Quit: Leaving)
00:05:22*_303_ joined #nim
00:07:59*fowlmouth quit (Quit: Leaving)
00:08:48BlaXpiritI want to turn seq[int] into array[n, int] where n is known at compile time or make a function that can return array[n, int] when given an n known at compile time
00:09:18def-BlaXpirit: n: static[int]?
00:09:33BlaXpiritsounds nice
00:10:28BlaXpiritseems to work, thanks
00:11:15*TnTReX joined #nim
00:12:24BlaXpiritended up with proc urandom*(size: (static[Natural]){lit}): array[size, uint8]
00:12:51Siecjedef-: I'm getting indentation error (3, 26) https://dpaste.de/v57Z
00:13:21BlaXpiritSiecje, I think :type goes before {.procvar
00:16:04*ob_ joined #nim
00:16:23Siecjeit is shown after a variable here http://nim-lang.org/manual.html#deprecated-pragma
00:16:47BlaXpiritSiecje, that's different :|
00:17:02BlaXpiritsome people have raised concerns over this seeming inconsistency
00:17:18BlaXpiritseems logical to me though
00:18:26Siecjehttps://dpaste.de/4nAE#L6 Error: ordinal type expected
00:18:35def-{"/": index}
00:18:57def-that's the same as [("/", index)] btw
00:19:29SiecjeThanks
00:20:22def-you only need {.procvar.} if you want to use the proc as a variable from another module. inside the same module it's not necessary
00:21:01*Matthias247 quit (Read error: Connection reset by peer)
00:21:03Araqand btw somebody should start a .procvar discussion somewhere
00:21:24AraqI'm not sure the benefits outweigh the problems it causes for newbies
00:21:36BlaXpirituhh which problems
00:21:37def-Araq: what's the alternative?
00:21:46dom96Araq: hah. I was right!
00:21:53Araqdef-: be sloppy about it
00:22:11Araqsomebody adds a default parameter --> code breaks, so what
00:22:17nimnoob123quick question: say i have a seq of X type objects and add Y, Z which are objects of X, if I called myseq[0].XObjectMethod() from Y or Z, it would use the X's version unless I ref of X object else it won't override X's definition?
00:22:37BlaXpiritnimnoob123, you cannot do it if it is not a ref
00:22:43def-Araq: and we just document that it doesn't work with default parameters?
00:22:43Araqdef-: it's not like any other language cares about this problem
00:22:48dom96We need to improve our functional programming features before 1.0.
00:22:54nimnoob123was wondering what was going on with my code
00:23:09BlaXpiritnimnoob123, it will behave as you expect if you define *methods* not procs
00:23:09def-dom96: yes, if everything was procvar by default that would be great in this regard
00:23:32flaviuahh, finally: http://i.imgur.com/E88OsOS.png
00:23:44BlaXpiritnimnoob123, basically, read on `method`
00:23:47dom96flaviu: ?
00:23:49flaviucompare to http://nim-lang.org/assets/images/bg.jpg
00:23:52BlaXpirito.o
00:24:05def-flaviu: looks so much better, never use jpeg for that
00:24:21BlaXpirit380 KiB
00:24:51flaviuDon't worry, I'll get it down
00:25:16BlaXpiritbut yeah, looks cool
00:25:16dom96Araq: I still don't understand the problem.
00:26:07def-Araq: if this means `+` and everything else can be used as procvars by default, that would be great
00:27:07Araqdef-: no, that doesn't mean '+' works as a procvar
00:27:20def-oh right, `+` is magic
00:27:24Araq'+' is a magic that ends up as a CPU instruction
00:27:42Araqwe could generate the trivial wrapper for you
00:27:52def-would be cool for functional code
00:27:58Araqbut I'm not sure that's the best idea for a systems programming language
00:28:14nimnoob123so in order to make all that work the parent object needs to ref the RootObj as well, curious to why that is? (noob asking noob things ;])
00:28:29*Jesin quit (Quit: Leaving)
00:29:04nimnoob123guessing it's just a way of telling the compiler that the parent object is an abstract object?
00:30:20*Jesin joined #nim
00:30:30def-flaviu: can't get it smaller than this: http://ddnet.tw/E88OsOS.png
00:31:03Araqnimnoob123: I don't understand your questions
00:31:35BlaXpiritAraq, it's just about polymorphism and methods
00:32:45Araqright but I'm not sure "need to ref the RootObj as well" means the right thing
00:33:21BlaXpiritmaybe RootObj here is not actually "the" RootObj, but a root object... who knows
00:34:30nimnoob123it is the RootObj the built in type, the parent class has to ref the RootObj in order for any of what I said to work
00:35:07BlaXpirituh yeah
00:35:25nimnoob123the question was: is ref object of RootObj just a way of telling the compiler that it's an abstract class
00:35:32dom96Just so we don't forget: https://github.com/Araq/Nim/issues/2172 :P
00:35:50BlaXpiritnimnoob123, maybe just read some generic topics on polymorphism
00:36:11BlaXpiritin C++ one would simply say that there can be no polymorphism without pointers
00:36:14BlaXpiritref is like a pointer
00:37:27BlaXpiritdom96, uhh isn't that a big performance penalty? maybe someone should write about this there to prevent stupid questions
00:38:32nimnoob123all I'm asking is why does the parent object need to use 'ref' http://pastebin.com/XhMBCUuu
00:38:43*Jesin quit (Ping timeout: 250 seconds)
00:39:05Araqha that's not a "Language design: undesired property" by any means
00:39:19Araqit was a *desired* property for years!
00:39:21dom96Araq: relabel it as appropriate then
00:39:31dom96it's undesired now!
00:39:40dom96it's been undesired by me for years
00:39:50nimnoob123oops forgot to remove the count stuff
00:40:08Araqwhatever
00:40:16dom96nimnoob123: it doesn't if your child objects don't use it.
00:41:00nimnoob123dom96, it won't show the output of the child objects it'll default to the parent
00:41:22nimnoob123without ref
00:42:30*Demon_Fox joined #nim
00:42:42nimnoob123http://pastebin.com/ZxtPqXQ7 outputs shutup twice
00:42:58flaviudef-: Actually: https://dl-2.kraken.io/cbf90b934916858f7589ee10f7b4d1c6/background.png
00:43:33flaviu148K :D. It's lossy though, some of the gradients are of lower quality.
00:43:44nimnoob123was just curious why the parent required the ref keyword, i understand why the child objects would need it
00:43:45def-flaviu: that looks very bad for me
00:44:47def-nimnoob123: because you put them into a seq the children would get cut off
00:46:33nimnoob123which goes back to my original question is that just a way for the compiler to know that parentObj is an abstract class
00:48:23*lavender quit (Ping timeout: 240 seconds)
00:49:37def-i don't understand this question, sorry
00:51:32nimnoob123alright, it doesn't really matter tbh
00:54:16*kjo joined #nim
00:58:04*rapind joined #nim
00:59:58SiecjeI'm not sure why it expects 'FutureBase' and how can I figure out what is happening https://dpaste.de/mgEM#L14,21
01:02:39*rapind quit (Ping timeout: 265 seconds)
01:04:22dom96Siecje: Your proc has no return type
01:05:03Siecjedom96: If I put the type after I get invalid indentation
01:05:18def-which looks right, because cb should not have a return type to be used in serve()
01:05:29*rapind joined #nim
01:05:31def-Siecje: proc cb(req: Request): Future[string] {.async.} =
01:06:35dom96indeed. What are you trying to do?
01:06:56*Trustable quit (Remote host closed the connection)
01:08:54*Trustable joined #nim
01:09:10Siecjedom96: Just play around.
01:09:25dom96I think you want to replace the "test" in line 15 with routes[$req.url.path]()
01:09:50Siecjedom96: true, but it's not getting that far.
01:09:54Siecjehttps://dpaste.de/Y8Lx
01:10:08SiecjeFuture[void] says expects future got string
01:11:22dom96https://gist.github.com/dom96/630021f932c34153a57c
01:14:28Siecjedom96: why does eliminating result matter?
01:14:59dom96Siecje: the callback for asynchttpserver shouldn't return anything
01:15:32Siecjeit doesn't it calls something that does though
01:15:50*sillesta quit (Ping timeout: 252 seconds)
01:17:00dom96'result' is the implicit variable which is always returned in a proc
01:17:40Siecjeoh really
01:17:56*qwr joined #nim
01:18:06SiecjeThat's different, and yeah that was the issue
01:18:40dom96http://nim-lang.org/tut1.html#result-variable
01:19:46*BlaXpirit quit (Quit: Quit Konversation)
01:20:49*gokr_ quit (Quit: IRC for Sailfish 0.9)
01:20:54Siecjeso you can't access result outside of the scope?
01:21:10Siecjeresult is always declared or only when it is used?
01:21:36*TnTReX left #nim ("Leaving")
01:22:35flaviudom96: https://github.com/nim-lang/art look good?
01:22:59dom96Why does it have html?
01:23:56flaviudom96: Concept pages
01:24:18dom96perhaps the repo should be called "concepts" then?
01:24:29*infinity0 quit (Ping timeout: 252 seconds)
01:24:30*infinity0_ joined #nim
01:24:30*infinity0_ quit (Changing host)
01:24:30*infinity0_ joined #nim
01:24:33dom96or "assets"
01:24:49flaviu"assets" sounds fine.
01:25:01dom96It would be nice to split the website from the Nim repo
01:25:27dom96but Araq probably wouldn't want that.
01:27:42flaviudom96: Please also replace the background on the website with https://raw.githubusercontent.com/nim-lang/assets/master/Art/background-optimized.png
01:28:29dom96create a PR for that
01:32:16def-flaviu: are you sure we need them all? many of these files are just concepts and not actually used
01:32:42def-flaviu: would be nice to have just the important images available on the website (logo, logo + name)
01:33:10flaviudef-: You want me to throw away data? :O
01:33:35flaviuIMO it's best to keep all data. It doesn't cost anything to do so.
01:34:04def-flaviu: in case someone searches for the logo and logo+name would be nice to have a proper place for them
01:34:27def-flaviu: also: http://ddnet.tw/logo-optimized.svg
01:35:22def-i can't even find an svg anywhere with just logo+name
01:35:44flaviudef-: Not much point in optimizing that, it still has lots of hidden logo variants.
01:35:56def-flaviu: oh, right
01:42:46*Boscop_ is now known as Boscop
01:43:30Boscopnim seems to gain some traction
01:43:56whitenoiseI introduced my coworkers to Nim today
01:44:00Boscopit's popping up on blogs etc. being compared to rust
01:44:03whitenoisethey promptly installed it on their laptops
01:44:21*Sembei joined #nim
01:44:23Boscopi remember when this channel had like 10 ppl
01:44:37Boscopwhitenoise: is it production ready?
01:44:55whitenoiseBoscop: Nim? It depends on what you mean by "production ready"
01:45:18*Pisuke quit (Ping timeout: 250 seconds)
01:45:45whitenoisethere are some bugs, but there are bugs in most everything as far as I am aware, even very mature languages. Nim's currently downfall, in my opinion, for being "production ready" is its immaturity. In another language, you could easily import a library for anything you set your mind to, whereas in Nim you would likely have to do quite a bit more coding to
01:45:45whitenoiseget your desired effect because the library does not yet exist.
01:45:57flaviudom96: https://github.com/Araq/Nim/pull/2173
01:46:00whitenoisethis in my mind would probably make a lot of corporate environments not favor it at the moment
01:46:15whitenoisebut as far as a hobby language, I'm digging it.
01:47:31*lavender joined #nim
01:47:34whitenoiseI also only have a few days of experience with it, so my opinion should not carry a ton of weight.
01:50:25*Jesin joined #nim
01:54:11TEttingerIt does seem to have a lot of features that are more common in "mature languages", like the fine tuning over performance (Ruby didn't even get a JIT compiler for years!)
01:54:50TEttingerc2nim seems to make binding stuff a lot easier
01:55:10TEttingerso if a C lib exists, using from Nim won't be hard
01:55:17TEttinger(potentially)
01:55:31flaviuWell, creating an idiomatic wrapper will take some work.
01:56:15flaviuBut that depends on the complexity of the library.
01:56:24TEttingeryep
02:02:11*qwr quit (Remote host closed the connection)
02:03:25*Trustable quit (Remote host closed the connection)
02:06:14*darkf joined #nim
02:13:04*chemist69_ joined #nim
02:16:36*chemist69 quit (Ping timeout: 264 seconds)
02:17:45*gsingh93 joined #nim
02:19:56*qwr joined #nim
02:25:21*sampwing quit (Ping timeout: 252 seconds)
02:25:22*phira quit (Ping timeout: 240 seconds)
02:25:36*xeizlif quit (Ping timeout: 250 seconds)
02:26:53*phira joined #nim
02:27:18*xeizlif joined #nim
02:28:42whitenoiseis there a way to do a constructor in Nim?
02:29:14whitenoisei guess you would just write your own "new" method and then run it
02:32:21flaviuwhitenoise: Nim doesn't have constructors (although see my proposal https://github.com/Araq/Nim/issues/1693). The convention is to have an initFoo if it's a value, and a newFoo if it's heap-allocated.
02:43:48def-I worked on the ideas page again, any feedback welcome: https://github.com/Araq/Nim/wiki/GSoC-2015-Ideas
02:44:24flaviuhas it been submitted yet?
02:44:29def-still have 20 hours
02:44:31flaviu> 16 hours, 15 minutes remaining
02:44:39flaviuThat's not much time.
02:44:41def-right, 16 hours
02:44:57def-that's why I'm working on it, obviously ;)
02:45:19def-The application is also finished I'd say: https://github.com/Araq/Nim/wiki/GSoC-2015-Organization-Application
02:46:34def-I even added 3 fun projects from my personal todo list
02:47:02*reem quit (Remote host closed the connection)
02:56:57*gokr quit (Ping timeout: 250 seconds)
02:57:03*fowl joined #nim
03:01:18flaviudef-: I improved some awkward phrasing: https://github.com/Araq/Nim/wiki/GSoC-2015-Organization-Application/_compare/4f5760fb335829bcd585e73e97df95131497280a...ac587f6ae55ff3d8a380d64867b1c36c575b5fbe
03:01:43def-Thanks
03:07:16*reem joined #nim
03:09:09*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:13:20*reem quit (Remote host closed the connection)
03:14:47*reem joined #nim
03:17:43*reem quit (Remote host closed the connection)
03:18:53*filwit joined #nim
03:19:25*nimnoob123_ joined #nim
03:20:14nimnoob123_woo first nim contribution, simple, but useful :D sdl2.image didn't work on windows because it didn't set the lib at the top
03:20:14filwitflaviu: you can put the website work under WTFPL or another permissive license of your choosing (BSD, MIT, GPL)
03:20:46def-nimnoob123_: good job
03:20:59nimnoob123_:D thanks def-
03:23:21*reem joined #nim
03:24:42*saml_ joined #nim
03:24:45*nande quit (Remote host closed the connection)
03:25:04filwitflaviu: i mostly find licensing issues petty blockades to real work (even though I understand they're important to get right), so as long as someone else doesn't try and claim responsibility for my original work, I'm fine with whatever you choose or is standard to the rest of Nim-lang stuff.
03:26:16filwitflaviu: on that note. Thank you for organizing this and putting it in a repo.
03:26:57*reem quit (Remote host closed the connection)
03:28:09fowlim trying to bootstrap but build.bat uses gcc
03:28:10def-filwit: do you have the logo+name as an svg somewhere?
03:28:34*reem joined #nim
03:28:41filwitdef-: flaviu made a repo here: https://github.com/nim-lang/assets
03:28:57def-fowl: may be easier to bootstrap from an existing nim installation then
03:29:06def-filwit: is it in there?
03:29:56filwitdef-: the logo?
03:30:16def-filwit: logo+name as on the top of the website
03:30:19filwitdef-: i thought it was.. but the logo under Art/logo.svg isn't exactly correct now that I take a look
03:30:31*reem_ joined #nim
03:31:02filwitdef-: either way, it's in that zip i gave you the other day
03:31:20fowldef-, how do i do that?
03:31:30def-filwit: it would be really nice to have an svg of logo+name. the 200px logo from the website isn't good enough if you want to print something about nim for example
03:31:42def-filwit: pretty sure it's not, i went through each file i think
03:32:42filwitdef-: okay let me see why that wasn't included. I think it's just because I mostly finalized the rendering of that inside the website svg
03:33:22def-filwit: ah, i could extract it from the website svg
03:33:27*reem quit (Ping timeout: 265 seconds)
03:33:32VarriountHi filwit!
03:34:10filwitdef-: I can separate it out and give you a copy. I would rather people not be trying to pull the website apart layer-by-layer to try and get a usable copy of the logo.
03:34:19filwitVarriount: hey man
03:34:43def-filwit: exactly, we should put it into the assets-repo so it's easy to reuse
03:35:08filwitdef-: but i'm not going to do that tonight. I'm just dropping by because flaviu sent me an issue on github and I thought I'd just talk to him here instead (but doesn't look like he's around ATM)
03:35:49filwitdef-: I have a couple of updated to the new website support page to get to tomorrow, so I'll do it then.
03:35:55filwitupdates*
03:36:30filwitdef-: well... shit it only takes a minute.. let me just do it
03:38:54flaviuI'm here.
03:39:21flaviuIt might not be a good idea to licence the art under a permissive licence.
03:39:54flaviuWhat if someone makes an unrelated project with that logo?
03:40:51fowlflaviu, the only honorable thing to do at that point is seppuku
03:41:39filwitflaviu: what do you suggest?
03:41:52filwiti like fowl's idea >:}
03:42:11flaviuhttps://wiki.archlinux.org/index.php/DeveloperWiki:TrademarkPolicy
03:42:42fowlVarriount, can you help me bootstrap on windows?
03:42:58filwitflaviu: looks good to me. run with that.
03:43:44def-fowl: you use the binary nim version and compile koch with it and basically follow the instructions to build from source
03:44:17def-actually just "nim -d:release c koch" and "./koch boot -d:release"
03:44:37fowldef-, missing a module "compiler_koch"
03:45:14def-huh, i don't understand
03:45:32fowlwell generally old nimrods cant compile the newest koch
03:45:37def-oh, right
03:45:54def-that would mean you have to go through a few commits at a time, terrible
03:46:19def-just install mingw and bootstrap the regular way?
03:46:57fowlwindows development
03:47:04*fowl shoots himself in the head instead
03:48:03fowli'll look for cl.exe and link.exe and try to fix build.bat
03:48:03ldlework:P
03:48:24def-fowl: that may not work if there is gcc-specific stuff in the csources
03:50:00filwitdef-, flaviu: NimLogo - http://www.reign-studios.net/philipwitte/nim/artwork/NimLogo.zip
03:50:58filwitthat's got the BG color or the website in it, but will export with a transparent background. So it's designed to sit on anything dark. I'll make a reverse color version later for light backgrounds.
03:51:03def-filwit: thanks a lot
03:51:11filwitnp
03:51:25def-strangely the svg doesn't show in firefox for me, but works in inkscape
03:51:29fowldef-, well i've built urho3d with visual studio, i'm sure it wont work with nim if i build nim with gcc
03:51:39filwitdef-, flaviu: shit don't download that... didn't save before making the zip... :\
03:51:54def-fowl: after building nim with gcc you can use that version of nim to build it with visual studio
03:52:32filwitdef-, flaviu: okay, can download now (same link)
03:52:51fowldef-, oh.. ok
03:52:54def-filwit: still the same
03:53:06filwitdef-: yes the blur operations are Inkscape specific filters
03:53:44def-ok, should probably make a plain svg version for people who want to embed it somewhere
03:53:47filwitdef-: they're used for the shine marks and stuff (at least I think they're inkscape specific, i know inkscape has some special stuff but am not sure if blur is one of them)
03:53:58filwitdef-: good point
03:54:12def-(still good to have the inkscape one for editing)
03:54:31*reem_ quit (Remote host closed the connection)
03:55:05*reem joined #nim
03:55:22filwitwell I understand not everyone is going to know how to use Inkscape, so it's good to have a basic version.. but honestly for the best look you should just export from Inkscape at whatever resolution you need and use that (maybe that should be written into the official branding rules or something)
03:55:53flaviuWell, I couldn't be bothered to adapt Arch's page, I did https://github.com/nim-lang/assets/tree/master/Art instead.
03:57:17flaviuIt can be rewritten in legalese whenever Araq talks to his lawyer (or one of 3DICC's lawyers?)
03:57:43*reem quit (Remote host closed the connection)
03:57:58fowlon windows system.int is 4 bytes?
03:58:30def-fowl: on all 32bit systems. if you use the x86 version, yes
03:58:38flaviufowl: Int is always word size (C's size_t)
03:58:46TEttingerpresumably because most exes on windows can run as 32-bit
03:58:54filwitokay, i updated the zip with a Logo_simple (no effects) version
03:59:04fowlhhh
03:59:27fowlwhen was i supposed to specify i wanted 64bit
03:59:39TEttingeryou might not
03:59:49def-fowl: when downloading the binary here: http://nim-lang.org/download.html
04:00:03fowli didnt use any binary
04:00:12def-filwit: maybe my firefox is just broken, doesn't work for me
04:00:13filwitflaviu: looks okay to me, but I'm far from legally qualified to judge :)
04:00:16fowlgcc then msvc
04:00:30def-ah, then you have 32bit gcc maybe
04:00:31filwitdef-: hmm... i haven't tried in a browser yet, one sec
04:00:40TEttingeris your gcc 32-bit? msvc comes in a 32 and 64 bit version
04:00:57def-filwit: and there is a build64.bat?
04:01:08def-fowl, not filwit
04:02:09def-filwit: but if the effects can't be represented in regular svg, it doesn't matter anyway
04:02:25*fowl left #nim ("Leaving")
04:02:44*reem joined #nim
04:02:46*reem quit (Remote host closed the connection)
04:03:22filwitdef-: well i removed the shines.. it's still the basic logo without some of the jazz, but it's okay. Unfortunately even saving as "plain svg" doesn't seem to make it work in the browsers.. i'm trying to figure out what's causing that.
04:04:13*reem joined #nim
04:04:32*reem quit (Remote host closed the connection)
04:05:40flaviufilwit: Tell people to use the png?
04:06:26flaviuAnyway, it's late my time. See you all tomorrow.
04:06:50filwitlater
04:07:35filwitdef-: yeah I'm not sure what's messing up the SVG output for browsers.. that's really strange (and something I need to figure out)
04:08:22filwitdef-: but honestly I would rather people be using the logo with proper shines anyways, so I think we should just make a couple of different resolution PNGs for people to grab instead
04:08:33def-filwit: yes
04:08:48*reem joined #nim
04:10:23*rapind quit (Remote host closed the connection)
04:11:30filwitdef-: okay, updated with 3 sizes which should work for everyone
04:12:07flaviufilwit: fyi, you can commit directly to the repo.
04:13:12*rapind joined #nim
04:13:34*ob_ quit (Ping timeout: 265 seconds)
04:13:43filwitflaviu: good point..
04:13:55*reem quit (Remote host closed the connection)
04:14:07filwitflaviu: i'll do that, but I need to take off now. See you guys tomorrow
04:14:17*filwit quit (Quit: Leaving)
04:14:17def-thanks again and bye, filwit
04:17:11*reem_ joined #nim
04:18:41*reem__ joined #nim
04:20:55*fowl joined #nim
04:20:58*reem joined #nim
04:21:47*reem_ quit (Ping timeout: 265 seconds)
04:23:14*reem__ quit (Ping timeout: 265 seconds)
04:25:39*reem quit (Ping timeout: 265 seconds)
04:31:08*reem joined #nim
04:31:16*reem quit (Remote host closed the connection)
04:37:06*jholland quit (Quit: Connection closed for inactivity)
04:43:02*reem joined #nim
04:43:17*reem quit (Remote host closed the connection)
05:01:19*gsingh93 quit (Ping timeout: 250 seconds)
05:08:33*reem joined #nim
05:08:33*reem quit (Remote host closed the connection)
05:13:08*lavender quit (Read error: Connection reset by peer)
05:13:56*reem joined #nim
05:16:24*gsingh93 joined #nim
05:18:54*reem quit (Remote host closed the connection)
05:34:07*milosn quit (Read error: Connection reset by peer)
05:38:09*rapind quit (Remote host closed the connection)
05:39:30*milosn joined #nim
05:40:11*rapind joined #nim
05:41:59*dhasenan quit (Remote host closed the connection)
05:44:08*saml_ quit (Ping timeout: 246 seconds)
05:47:04*Siecje left #nim (#nim)
05:47:40*rapind quit (Remote host closed the connection)
05:54:05*rapind joined #nim
05:54:32*Jehan_ joined #nim
05:54:33*dhasenan joined #nim
05:54:49*Jehan_ quit (Client Quit)
05:57:50*dhasenan quit (Remote host closed the connection)
06:33:13*darkf_ joined #nim
06:33:28*darkf quit (Ping timeout: 250 seconds)
06:33:29*darkf_ quit (Changing host)
06:33:30*darkf_ joined #nim
06:34:52*rapind quit (Remote host closed the connection)
06:35:27*darkf_ is now known as darkf
06:50:14*fizzbooze joined #nim
06:52:49*Varriount|Mobile joined #nim
07:02:40*darkf_ joined #nim
07:06:23*darkf quit (Ping timeout: 250 seconds)
07:08:49*brson quit (Quit: leaving)
07:10:21*darkf_ is now known as darkf
07:17:18*kjo1 joined #nim
07:17:18*kjo quit (Read error: Connection reset by peer)
07:18:38*kjo joined #nim
07:18:38*kjo1 quit (Read error: Connection reset by peer)
07:20:00*kjo1 joined #nim
07:20:00*kjo quit (Read error: Connection reset by peer)
07:26:04*kjo joined #nim
07:26:04*kjo1 quit (Read error: Connection reset by peer)
07:27:27*BlaXpirit joined #nim
07:29:31*kjo1 joined #nim
07:29:32*kjo quit (Read error: Connection reset by peer)
07:31:04*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
07:34:01*kjo joined #nim
07:34:01*kjo1 quit (Read error: Connection reset by peer)
07:35:46*rapind joined #nim
07:36:40*kjo1 joined #nim
07:36:41*kjo quit (Read error: Connection reset by peer)
07:38:26*chemist69_ quit (Quit: WeeChat 1.1.1)
07:38:55*reem joined #nim
07:39:48*kjo joined #nim
07:39:48*kjo1 quit (Read error: Connection reset by peer)
07:40:01*rapind quit (Ping timeout: 244 seconds)
07:50:00*gsingh93 quit (Quit: WeeChat 1.1.1)
07:50:19*gsingh93 joined #nim
07:53:12*kjo quit (Read error: Connection reset by peer)
07:53:31*kjo joined #nim
07:53:41*gsingh93 quit (Client Quit)
07:54:01*gsingh93 joined #nim
07:59:45*gsingh93 quit (Ping timeout: 252 seconds)
08:01:53*reem quit (Remote host closed the connection)
08:06:08*fizzbooze quit (Ping timeout: 252 seconds)
08:10:19*gokr joined #nim
08:23:17*dumdum joined #nim
08:28:56*nimnoob123_ quit (Quit: Page closed)
08:29:02*nimnoob123 quit (Quit: Page closed)
08:36:48*sillesta joined #nim
08:40:30*reem joined #nim
08:54:06BlaXpiritin unittest, is the suite name used anywhere at all?
08:54:11*TEttinger quit (Ping timeout: 246 seconds)
08:54:20BlaXpiritit's not written even when a test fails
09:03:00*Outlander joined #nim
09:04:54*Demon_Fox quit (Quit: Leaving)
09:05:13*Gonzih quit (Quit: WeeChat 1.0.1)
09:06:25*chemist69 joined #nim
09:14:30*BlaXpirit quit (Quit: Quit Konversation)
09:20:19*bjz joined #nim
09:21:04*bjz quit (Client Quit)
09:21:46*bjz joined #nim
09:22:11*chemist69 quit (Quit: WeeChat 1.1.1)
09:28:20*chemist69 joined #nim
09:37:35*rapind joined #nim
09:39:23*bjz quit (Ping timeout: 240 seconds)
09:41:57*rapind quit (Ping timeout: 244 seconds)
09:44:35*Outlander quit (Ping timeout: 246 seconds)
09:52:21*brson joined #nim
09:55:32*novist quit (Quit: ZNC - http://znc.in)
09:57:24*novist joined #nim
10:05:27*bjz joined #nim
10:06:22*infinity0_ quit (Ping timeout: 240 seconds)
10:11:33*infinity0 joined #nim
10:15:09*teapottime joined #nim
10:21:04*MajorWork joined #nim
10:26:59*MajorWork quit (Changing host)
10:26:59*MajorWork joined #nim
10:29:49*brson quit (Ping timeout: 264 seconds)
10:31:51*CrazyOwl joined #nim
10:31:56CrazyOwlhello guys
10:34:44*kuzy000_ joined #nim
10:35:03*jm116_ joined #nim
10:35:22*jm116_ quit (Client Quit)
10:46:01*Trustable joined #nim
10:53:43*reem quit (Remote host closed the connection)
10:55:46*Outlander joined #nim
10:59:16VarriountHi CrazyOwl
10:59:32VarriountAraq: Is a sequence *castable* to an openarray?
10:59:44VarriountOr does some conversion need to be done?
11:17:17*rapind joined #nim
11:21:25*rapind quit (Ping timeout: 252 seconds)
11:21:48*Trustable quit (Remote host closed the connection)
11:25:24*novist quit (Quit: ZNC - http://znc.in)
11:27:48*novist joined #nim
11:32:27*novist quit (Quit: ZNC - http://znc.in)
11:36:06*endou________ joined #nim
11:43:43*endou_______ quit (*.net *.split)
11:51:49*banister joined #nim
11:51:54*banister quit (Max SendQ exceeded)
11:52:45*banister joined #nim
11:57:38AraqVarriount: no, it's not
12:03:37*akiradeveloper joined #nim
12:18:51*akiradeveloper quit (Remote host closed the connection)
12:35:12*pafmaf joined #nim
12:35:48gokrVarriount: AFAIK openarray can only be used for parameters, and it basically means "arrays or seq". I may be wrong. Its a bit of an oddity, but you would use it always unless you for some reason can't accept one or the other I presume.
12:36:20*antrix joined #nim
12:45:18*antrix quit (Quit: wtf)
12:45:55*qfire joined #nim
12:51:55*rapind joined #nim
13:10:26*kjo quit (Quit: Leaving.)
13:10:40*davidhq joined #nim
13:20:30*darkf quit (Quit: Leaving)
13:28:53*johnsoft quit (Ping timeout: 240 seconds)
13:30:42*johnsoft joined #nim
13:44:32*Jehan_ joined #nim
13:47:08Jehan_Araq: I think the proper solution to the shallowCopy issues would be to make the second argument of shallowCopy a var parameter, too (and possibly introduce an unsafeShallowCopy with the current shallowCopy semantics where that is really needed).
13:53:17AraqJehan_: aye, good idea, but breaks code
13:54:19*reem joined #nim
13:55:04Jehan_Araq: Yup, I know. But I think it's ultimately not only the best, but the correct solution. So I think it should at the very least be something to think about.
13:55:45Araqdunno, 'shallowCopy' is declared unsafe already iirc
13:56:49Araqwe can also always do something like --storeLiteralsInTheHeap:on|off
13:57:35Araqbut then these need to become thread local, so hrm
13:57:53*rapind quit (Remote host closed the connection)
13:57:56*akiradeveloper joined #nim
13:58:45*reem quit (Ping timeout: 246 seconds)
13:59:39*emilsp joined #nim
14:00:35*CrazyOwl quit (Quit: Leaving)
14:08:04*NhanH quit (Ping timeout: 265 seconds)
14:08:41*akiradeveloper quit ()
14:10:00*CARAM__ quit (Ping timeout: 265 seconds)
14:11:28Jehan_Araq: Yeah, but the problem is that often you do need shallow copying for performance (e.g. it's what's causing almost all of the overhead with parsing the wikipedia dump), so a safe version would be really nice.
14:12:38Araqthat strings copy is really unfortunate in retrospect but it's the one area where I picked consistency and ease of use over performance
14:14:03Araqplus it solves the "constant strings can be passed by ref without more type modifiers" problem
14:15:46Araqbut looking at tables.nim you're right, this would work
14:17:19*Outlander quit (Ping timeout: 245 seconds)
14:18:33AraqJehan_: so do you know the cause of the slowdown of the wikipedia parsing?
14:18:33Jehan_Araq: Hmm, I don't have a fundamental problem with copying being the default for mutable strings and seqs, because it protects you against some really nasty and surprising aliasing problems. It's just that (IMO) there needs to be a safe way to avoid the overhead. I've mostly been using `shallow` in such situations, but there are cases where that's not the best solution.
14:19:11Jehan_Araq: Yeah, I've run it through a profiler. It's pretty much all due to string copies.
14:19:21Araqbut why?
14:19:22*pafmaf quit (Quit: This computer has gone to sleep)
14:19:37Araqwhy the slowdown after 600MB?
14:19:38Jehan_parsexml.nim mostly, as far as I can tell.
14:20:02AraqI skimmed the code and it uses streaming quite well
14:20:17Araqthe string copies should simply slow it down all the time
14:20:20Jehan_Oh, that. I haven't dug into that, but my guess is simply that data structures grow to certain size. There doesn't seem to be a heap explosion.
14:20:24Araqand not after 600MB of output
14:20:44Jehan_Yeah, but the slowdown depends on the sizes of strings being copied.
14:21:06Araqso it's just that the data is unfortunate after 600MB?
14:21:23Jehan_If there's a GC problem, so far I haven't seen it show up in the profiler.
14:22:06Jehan_I'm not 100% certain, because it takes quite a while to get there, especially since I was profiling with -d:release --opt:none to prevent inlining.
14:22:24*NhanH joined #nim
14:22:40Jehan_It may be either different data or accumulated data or reduced cache locality or something like that.
14:24:45*CARAM__ joined #nim
14:25:40AraqI suspected it's some IO related problem
14:26:19Araqmaybe some buffering failure or fragmentation of the heap or even on the hd
14:28:17Araqbtw Delphi uses copy on write for strings which I still consider the best design out there but introduces implicit destructors as you need precise refcount values for this to work, so I didn't implement it
14:46:04AraqJehan_: anyway, you convinced me, please create an issue for that or a PR
14:48:56*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:49:46teapottimesorry to interject, but doesn't Delphi also imposes a lock every time you update a string? Is this the price for precise refcounting or just an implementation decision for them?
14:54:19teapottimeI'm guessing Nim won't have that problem so much because of the thread-local GC tho
14:56:38*BlaXpirit joined #nim
15:00:11*Trustable joined #nim
15:01:56def-Araq: the wikidump problem seems to be much easier, i'm currently debugging
15:04:35def-(or the part i can reproduce at least, it never comes to a halt for me)
15:06:08*pafmaf joined #nim
15:10:40*pregressive joined #nim
15:11:07*Siecje joined #nim
15:12:04Araqteapottime: it uses atomic increments and decrements which is faster than locks
15:12:24Araqit's also not entirely correct, but in practice it works well enough
15:15:00def-Araq: I call readBuffer a few billion times and suddenly it takes 30 times as long
15:15:41Araqnice, readBuffer is a than layer over C's IO
15:15:45Araq*thin
15:15:52def-i think this causes the slowdown
15:16:28*kjo joined #nim
15:20:01SiecjeDoes nim have decorators?
15:21:24samlwhat's corators?
15:22:30AraqSiecje: yes, you can do that proc p() {.m.} = ...
15:23:01Araqand then 'p' is passed to the macro m which can rewrite the proc definition
15:23:39Jehan_Araq: Will do that later tonight or this weekend, once I have the time.
15:24:52SiecjeAraq: How would you change the result of one of the parameters?
15:26:46*pregressive quit (Remote host closed the connection)
15:33:11*rapind joined #nim
15:37:01AraqSiecje: via a macro?
15:37:33*rapind quit (Remote host closed the connection)
15:40:10def-Araq: my bad, seems to be something with the GC and strings after all
15:40:28Araqlol
15:40:36Araqpity
15:42:13*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:45:54*rapind joined #nim
15:48:25*pregress_ joined #nim
15:48:46*pregress_ quit (Remote host closed the connection)
15:49:05*pregressive joined #nim
15:50:32*rapind quit (Ping timeout: 265 seconds)
15:52:29*kapil___ quit (Quit: Connection closed for inactivity)
15:57:45*NhanH quit (Remote host closed the connection)
15:57:45*endou________ quit (Remote host closed the connection)
15:57:46*CARAM__ quit (Remote host closed the connection)
15:59:02*erisco joined #nim
15:59:16eriscois it possible to use Nim without the garbage collector?
16:02:27Araqerisco: yes.
16:08:37*gsingh93 joined #nim
16:14:14*rapind joined #nim
16:14:26*NhanH joined #nim
16:18:45emilspis it possible to use ssl/tls with asynchttpserver library ?
16:20:24*rapind quit (Remote host closed the connection)
16:21:31*endou________ joined #nim
16:22:36*Sembei quit (Max SendQ exceeded)
16:23:49*Sembei joined #nim
16:24:17eriscoAraq, thanks
16:24:21*erisco left #nim ("Leaving")
16:27:18*CARAM__ joined #nim
16:31:04dom96emilsp: Not currently.
16:31:34dom96emilsp: You can put nginx in front of it (which you should be doing anyway) and set up ssl with nginx thoguh.
16:31:36dom96*though
16:33:32emilspdom96, ok, I will have to look into that.
16:36:00*dybt joined #nim
16:40:15*mpthrapp joined #nim
16:45:22dybtHi. In https://github.com/flaviut/nim-by-example/blob/master/content/opengl/triangle.md theres a line with `glGetAttribLocation(shaderProgram, "position").gluint` and I'm not sure what exactly the .gluint is doing. The function returns a GLint, which is defined as `type GLint* = int32`. I see that theres a dot operator, but I don't see any overloads in https://github.com/nim-lang/opengl . Is it some kind of type conversion?
16:46:40sillestapretty sure it's a type cast
16:46:57sillestaand the following methods takes a GLuint i think, so conversion is needed
16:47:02dybtis that a normal syntax for it?
16:47:23dybtI couldn't see anything like that in the manual
16:47:49sillesta2.gluint and gluint(2) is the same
16:47:59dybtooh. Of course
16:48:06sillestaappending .gluint is more painless than wrapping with () i'd say
16:48:22dybtyeah. that makes sense
16:49:05dybtThanks. I feel silly now for not getting that. haha
16:49:17sillestai got a bit confused as well :D
16:49:35sillestaopengl is a bit weird about return types vs. parameters as well
16:49:59sillestareturn signed int to check for errors with -1, pass as unsigned for some reason
16:50:41*rapind joined #nim
16:51:00*sampwing joined #nim
16:52:51dybtYeah. I always thought just reserving a location to use as an error value would make more sense
16:53:59dybtalthough I guess having to do the conversion, you're less likely to forget that it could be an error value and to check for it
16:56:01*_303_ quit (Quit: WeeChat 1.1.1)
16:56:31*rapind quit (Remote host closed the connection)
16:57:17*filwit joined #nim
16:59:47filwitAraq: https://github.com/Araq/Nim/pull/2181
17:00:02*pregressive quit (Remote host closed the connection)
17:00:39filwitAraq: i need to take off right now, so I can either make you some screenshots when I get back, or you can dup+pull that to test it out yourself.
17:00:45*pregressive joined #nim
17:01:11*pregressive quit (Remote host closed the connection)
17:01:26*pregressive joined #nim
17:01:27filwiteither way, bbl
17:01:30*filwit quit (Client Quit)
17:07:34*teapottime quit (Ping timeout: 246 seconds)
17:07:47*rapind joined #nim
17:14:30*rapind quit (Remote host closed the connection)
17:16:34*emilsp quit (Read error: Connection reset by peer)
17:21:00*ChrisMAN quit (Read error: Connection reset by peer)
17:21:41*dybt quit (Quit: Leaving)
17:26:02*Varriount|Mobile joined #nim
17:26:30*MajorWork quit (Quit: Leaving)
17:26:38*Matthias247 joined #nim
17:29:29*Jehan_ quit (Quit: Leaving)
17:29:35*rapind joined #nim
17:38:49*Jehan_ joined #nim
17:40:36*pregressive quit (Remote host closed the connection)
17:47:19*emilsp joined #nim
17:47:38AraqJehan_: aha so sysstr line 80 is guilty? very interesting
17:48:10Jehan_Essentially, yes.
17:48:16Araqand also very easy to fix :-)
17:49:07Jehan_I'm also thinking that it would be nice if it were possible to avoid the bzero() in this case (though that's not easy).
17:49:36*sepisoad joined #nim
17:50:41sepisoadhow to use Compile pragma with a file that is nested inside another directory: {.compile: "c_src/file.c".}
17:51:36sepisoadnim seems to fails at compiling a c source file that is not in the current directory or i'm wrong
17:53:25AraqJehan_: doesn't look too hard, but requires a separate entry point into the GC
17:53:53Jehan_Araq: Yeah, that's what I meant by "not easy". :)
17:57:50Araqhrm I wonder why I picked the capacity and not the size for copying
17:58:47*rapind quit (Remote host closed the connection)
17:59:01Araqah yeah I thought "capacity is only 1.5 times as big as length, so it cannot hurt and it gives us a bit room to grow"
17:59:24Araqthat's of course completely wrong when you consider setLen
18:00:07*Siecje left #nim (#nim)
18:03:06Araqsepisoad: pretty sure that works, but sometimes you need to use -f to force recompilation of that file
18:04:24sepisoadhow to use -f
18:05:21Araqnim c -f foo.nim
18:07:15*rapind joined #nim
18:11:09sepisoadoops, my bad, i was totally wrong
18:11:54*rapind quit (Remote host closed the connection)
18:13:41*d3m1gd joined #nim
18:15:46*Matthias247 quit (Read error: Connection reset by peer)
18:17:39*rapind joined #nim
18:17:47elasticdogstupid question...when updating an existing Nim install (from Git), do you still need the csources, or can you just compile koch and then do `koch boot -d:release`?
18:19:42dom96elasticdog: That's not stupid at all. The answer is unfortunately: it depends.
18:20:45dom96elasticdog: Most of the time `koch boot` should work. You may need to occasionally rebuild from the csources.
18:21:20elasticdogdom96: so the "safest" way to update is to `git pull` and then just run the build.sh each time?
18:21:32elasticdogwhen would the csources be necessary?
18:22:01dom96elasticdog: I wouldn't call it safest. Nothing bad will happen to your Nim compiler if you try to `koch boot` and the bootstrap process fails.
18:22:36dom96The csources are necessary when your compiler can no longer build the latest compiler due to a change which breaks bootstrapping.
18:22:46dom96This happens rarely though.
18:23:48dom96You should be simply git pulling and executing koch boot. If koch boot fails then you can grab the latest C sources and bootstrap from them.
18:24:16elasticdoggotcha...I was thinking the csources were essentially obsolete now that the Nim compiler exists, but only used for the initial bootstrapping of a fresh install
18:24:30elasticdogbut I see that the csources are also getting updates...thanks for the details
18:24:35dom96That is pretty much the case.
18:24:37*pregressive joined #nim
18:25:06dom96If the compiler's code uses features that were just implemented in the compiler then C sources need to be rebuilt.
18:25:56*pregressive quit (Client Quit)
18:26:18*kjo quit (Quit: Leaving.)
18:26:55*pregressive joined #nim
18:27:44*kjo joined #nim
18:34:24*ChrisMAN joined #nim
18:34:28*ChrisMAN_ joined #nim
18:34:55*ChrisMAN_ quit (Client Quit)
18:35:27*dumdum quit (Ping timeout: 256 seconds)
18:45:50*nimnoob123 joined #nim
18:46:37sepisoadi found a weird bug in .compile pragma, when i defined a c source file with ".cc" extension the linker failed to find symbols, but after i renamed my c source file extention to ".c" it worked
18:47:12Araqsepisoad: I think that's a feature ...
18:47:19Araqa misfeature
18:47:29sepisoadhow come?
18:47:52Araqlet me see
18:48:16dom96Osproc.startProcess broken on Windows? https://gist.github.com/dom96/e4609fbd573c13585dc0
18:49:39Araqsepisoad: no, I misremembered, but a 'cc' extension tells GCC it's a C++ file
18:49:40dom96oh. I see the problem.
18:49:45dom96That error could be improved.
18:50:54*ehaliewicz joined #nim
18:50:56Araqsepisoad: so that definitely explains why you get linker errors as it compiled with the c++ compiler
18:51:09Araqthat's not a bug in the .compile pragma though
18:51:55nimnoob123can anyone recommend a nim project on github to learn from which isn't a binding of a library
18:52:22def-nimnoob123: learn what from?
18:52:34sepisoadan the c++ name mangling makes finding symbols impossible, right?
18:53:05BlaXpiritdef-, just link your article :p
18:53:12def-BlaXpirit: haha, no!
18:53:13nimnoob123things I don't understand, easier to read code and see real examples of how something works in action
18:54:00nimnoob123and im wondering if there are any projects on nim worth checking out that could be a good learning experience from reading the source
18:54:28reactormonkAraq, what data type is there to hold binary data?
18:54:38BlaXpiritreactormonk, string?
18:54:48reactormonkBlaXpirit, that's null-terminated, isn't it?
18:55:05*brson joined #nim
18:55:12Araqno, it's not really
18:55:13def-nimnoob123: there is a lot of code in the Nim repo itself, and you can see most external nim programs here: http://nim-lang.org/lib.html#nimble (I haven't read the code of much outside the standard library honestly)
18:55:20BlaXpiritlength is determined by a number, not by zero byte
18:55:31BlaXpirityou can store binary data in string, but not in cstring
18:55:32Araqreactormonk: use 'string', the trailing zero byte is for C interop
18:55:41BlaXpiritthere is always array[char] ........
18:55:42def-nimnoob123: i also have an article where I develop a small project: http://howistart.org/posts/nim/1
18:55:45BlaXpiritor uint8
18:55:55reactormonkAraq, apparently items relies on the zero?
18:56:10*NimBot joined #nim
18:56:22*fizzbooze joined #nim
18:56:25BlaXpiritreactormonk, apparently not
18:56:30Araqreactormonk: no, that was just a bug for repr because that's included before the compiler knows about the items for string
18:56:48Araqso it picked the items for 'cstring' instead. nasty bug
18:56:54Araqbut not too hard to find
18:56:58reactormonkAraq, ok, thanks for clarifing that.
18:57:27*mpthrapp quit (Remote host closed the connection)
18:58:32*pregressive quit (Remote host closed the connection)
19:00:26*pregressive joined #nim
19:00:35*pregressive quit (Remote host closed the connection)
19:01:04*pregressive joined #nim
19:01:17*pregressive quit (Remote host closed the connection)
19:01:47*pregressive joined #nim
19:03:24d3m1gdis it possible inside a macro to tell if function is defined or not, and define a stub if not defined? Or maybe someone has a better way of top-down development
19:04:10BlaXpiritd3m1gd, compiles
19:04:13def-d3m1gd: when declared(myFunction)?
19:04:29d3m1gdthanks!
19:04:41Araqthat doesn't work as you think it does, def-
19:04:41BlaXpiritwell that's even better
19:04:44BlaXpiritoh.
19:04:53def-Araq: too bad, why not?
19:04:56Araqbut the macro can *emit* this declared check
19:05:11Araqdef-: because it gets resolved when the macro is compiled
19:05:20Araqdef-: not when it's expanded
19:06:02def-that's what i expected, I guess I should have written a few more words
19:06:17BlaXpiritin any case, `compiles` works for me https://github.com/BlaXpirit/nim-random/blob/c200e2036e77a54b0d1dc5ffcc6da8893172ea32/src/random/common.nim#L41
19:06:48AraqBlaXpirit: since you are using it, I should mark it .experimental. (just kidding)
19:07:56*rapind quit (Remote host closed the connection)
19:08:39d3m1gdsooo, will it be possible to wrap a block in a macro and traverse ast to find non-defined functions and autodefine them, or is it something crazy?
19:09:21BlaXpiritI don't see a need for a macro
19:09:23Araqthat's something you really should do differently, I think
19:09:36d3m1gdi am open for suggestions =)
19:09:42BlaXpiritmethods or generics work wonders
19:11:39d3m1gdok, that is true. And i wanted to learn some macro fu on real life example..
19:12:20Araqd3m1gd: you can read & parse the module at compile-time, modify it and write back the result. in theory.
19:12:32Araqdunno if anybody ever tested this
19:13:38d3m1gdAraq: like: myMacro: import myModule?
19:14:15Araqno, like using staticRead and writeFile in a macro
19:15:45d3m1gdAraq: staticRead, omg, i am amazed by your creation more by every day
19:16:34d3m1gdAraq: and actually i would like to help, if there is something easy enough, which could also help learning the language
19:16:56*rapind joined #nim
19:17:00Araqlearn the language and then come back and look at the bugs marked with "easy" or "stdlib"
19:17:25AraqI think we got rid of the very hard "easy" issues by now
19:17:52d3m1gdwill do
19:23:20*Outlander joined #nim
19:26:36*sepisoad quit (Quit: Leaving)
19:28:00*pafmaf quit (Quit: This computer has gone to sleep)
19:35:25d3m1gdhas some question about anon proces from futures. tiny case is here: https://gist.github.com/d3m1gd/e8d280b53ac3d00697ff
19:35:31d3m1gdit does not compile
19:36:34def-d3m1gd: applyTo10((a: int) => echo(a))
19:37:02def-but i made an issue about this a few hours ago: https://github.com/Araq/Nim/issues/2179
19:37:13d3m1gddef-: nope
19:37:20d3m1gddef-: still does not
19:37:29def-d3m1gd: works for me
19:37:37def-d3m1gd: on current devel branch of Nim
19:38:12def-you're right, it's broken in 0.10.2
19:39:19Araqit's broken for me too ... and I'm on 0.10.3 beyond devel
19:41:34Araqoh wait, you added the :int
19:41:50Araqyeah that works
19:46:35*Jesin quit (Remote host closed the connection)
19:50:24*sepisoad joined #nim
19:53:32*rapind quit (Remote host closed the connection)
19:54:01sepisoaddo we have to call dealloc() on a cstring, like when we pass a cstring to a c function and the function does a heap allocation and ...
19:55:01*renesac joined #nim
19:55:49Araqsepisoad: if you don't do the alloc() you MUST not call dealloc() either
19:56:02Araqit's not a wrapper for C's free()!
19:56:48sepisoadbut the c function will allocate some memory and won't free it up, how that memory is handled
19:57:17sepisoadin c i would free that memory manually when i'm done with its value
19:57:52Araqthat's sloppy design, in Nim you wrap the free() and then do the same of course
19:58:27d3m1gdAraq: so adding int then. Does it not destroy reason for lightweight syntax for anonymous proces? Like they can figure it out from calling function definition
19:58:35Araqbut the C lib won't work reliably on Windows since there is not a single "C memory manager" but multiple depending on which runtime you link against
19:59:42Araqd3m1gd: so it's in development. which part of 0.10.x didn't you understand?
20:07:03*kjo quit (Quit: Leaving.)
20:13:00*sepisoad quit (Ping timeout: 264 seconds)
20:16:01*sampwing quit (Ping timeout: 252 seconds)
20:16:19*sepisoad joined #nim
20:16:24*sepisoad quit (Read error: Connection reset by peer)
20:21:36*Boscop_ joined #nim
20:22:54*Jesin joined #nim
20:24:55*jsudlow quit (Remote host closed the connection)
20:25:17*Boscop quit (Ping timeout: 245 seconds)
20:26:58*panzone joined #nim
20:30:46*kjo joined #nim
20:32:53*Boscop_ quit (Read error: Connection reset by peer)
20:33:32*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
20:35:43*rapind joined #nim
20:41:56*jholland joined #nim
20:42:42*nimnoob123 quit (Quit: Page closed)
20:56:57d3m1gdAraq: sorry for asking, just wanted to clarify this one out, because it was working and got broken. I am ok with it if you know about the issue
20:57:53Araqd3m1gd: afaik it never worked
20:57:58Araqdid it work?
20:58:50d3m1gdAraq: it did, if return type is specified on calling proc's argument. I think. Will do a quick test
21:00:40d3m1gdAraq: works on 0.10.2: https://gist.github.com/d3m1gd/e8d280b53ac3d00697ff
21:03:58*BlaXpirit quit (Quit: Quit Konversation)
21:04:21*BlaXpirit joined #nim
21:11:02*Boscop joined #nim
21:16:29Araqd3m1gd: hrm ok
21:19:36*Demon_Fox joined #nim
21:19:50*dumdum joined #nim
21:23:40*reem joined #nim
21:36:34*kjo quit (Quit: Leaving.)
21:36:52*panzone quit (Quit: Leaving...)
21:40:24*flaviu quit (Remote host closed the connection)
21:40:39*flaviu joined #nim
21:44:13*infinity0 quit (Ping timeout: 255 seconds)
21:46:28*infinity0 joined #nim
21:48:42*sampwing joined #nim
21:52:06*nande joined #nim
21:55:37*Mat4 joined #nim
21:55:43Mat4hi all
22:00:57Araqservus Mat4
22:02:53VarriountAraq: Is there a calling convention imposed on iterators?
22:03:11VarriountActually, nevermind, I'll just look that up myself.
22:03:50*chemist69 quit (Quit: WeeChat 1.1.1)
22:04:20AraqVarriount: thank you for fixing the build status buttons :-)
22:04:30Mat4hi Araq
22:06:25*reem quit (Remote host closed the connection)
22:07:01*reem joined #nim
22:07:14VarriountAraq: I was thinking that iterators could be directly sent values after they've started, by taking advantage of the fact that cdecl is a caller-cleanup convention
22:08:43VarriountBut since iterators don't have a fixed calling convention, it wont work...
22:10:46*reem quit (Remote host closed the connection)
22:12:24*reem joined #nim
22:12:37*sampwing quit (Ping timeout: 252 seconds)
22:13:07*reem quit (Read error: Connection reset by peer)
22:13:33*reem joined #nim
22:14:02AraqVarriount: I see what you mean but I don't see why thats necessary
22:16:48*Jehan_ quit (Quit: Leaving)
22:17:00*TEttinger joined #nim
22:19:29*sps joined #nim
22:19:53*sps is now known as Guest91095
22:20:25*Guest91095 quit (Client Quit)
22:22:25*reem quit (Remote host closed the connection)
22:22:41*dumdum quit (Ping timeout: 256 seconds)
22:25:00*enquora joined #nim
22:25:33AraqVarriount: we need your string assignment optimization in the compiler. what was the reason it never worked?
22:26:36*reem joined #nim
22:28:20*kjo joined #nim
22:30:11*saml quit (Quit: Leaving)
22:31:32*filwit joined #nim
22:34:37Araqfilwit: thanks for the website update
22:34:48filwitAraq: i see you uploaded it, so assume you didn't have any question or comments about the site changes
22:35:00filwitnp, that went faster than last time :)
22:35:33filwiti'll hopefully have the forum PR this weekend
22:35:37flaviufilwit: fyi, there are better ways to merge upstream into the current branch
22:35:52filwitthe tabs being out-of-order with the website really bug me now :|
22:36:00filwitflaviu: eh?
22:36:23flaviuhttps://gist.github.com/flaviut/0bfeca0cf9bc5fe53a51
22:36:38flaviusee "If a PR grows out of "
22:37:32filwitflaviu: i don't know enough about git to understand what that's doing exactly, I'll need to look things up
22:37:54filwitflaviu: i was under the impressions that rebasing was only for stripping unneeded cruft from a large repo..
22:37:56ldleworkfilwit: Pro Git is potentially the best piece of technical writing I've read
22:38:05ldleworkhttp://git-scm.com/book/en/v2
22:38:14flaviuIt basiclly replays all your commits on top of the given reference (commit hash, branch, etc).
22:38:16filwitldlework: thanks for the link, i'll take a look
22:38:22*rapind quit ()
22:39:06filwitflaviu: can you explain what the downside of doing it the way I have been?
22:39:36flaviuIt's not aesthetically pleasing
22:40:12flaviuNot a big deal really, but it often happens out of ignorance, not conscious choice.
22:40:14filwitflaviu: in what way? does it create a branch or something? basically all i do is merger with upstream, push to my fork, then create a PR
22:40:27filwitmerge*
22:42:26filwitflaviu: perhaps I forgot to pull upstream before making the PR this time (was going fast)
22:44:01flaviufilwit: 1 sec, I'm creating a picture.
22:48:32flaviufilwit: http://i.imgur.com/Rx6D4Md.png
22:49:10*Mat4 is now known as Mat4-coding
22:49:26filwitflaviu: okay I'll take a look, but let's discuss this privately or on nim-offtopic
22:49:26*ehaliewicz quit (Remote host closed the connection)
22:55:49VarriountMeep
22:56:30VarriountAraq: I don't know. It kept crashing.
22:56:34*sampwing joined #nim
22:56:46VarriountAraq: I don't even know if I have it anymore.
22:57:03AraqVarriount: no worries
22:58:23VarriountAraq: One thing about the optimization is that there needs to be a decrease size threshold.
23:00:07*saml joined #nim
23:01:01*sampwing quit (Ping timeout: 252 seconds)
23:02:31*willwillson joined #nim
23:02:50*ob_ joined #nim
23:03:38samlhow can I make this parallel? https://github.com/saml/helloweb/blob/master/hello.nim
23:04:05samlnim hello world web server is faster than node.js but much slower than java
23:04:15samlcause java uses all cores by default
23:07:43Varriountsaml: The async framework doesn't have support for multithreading yet.
23:07:52samlah thanks
23:07:55*saml quit (Quit: Leaving)
23:08:04Varriount._.
23:08:14*Boscop_ joined #nim
23:08:16ldleworkVarriount: did you want to say something else?
23:08:39Varriountldlework: Well, I was going to say that even if Nim is slower, it probably uses less memory than Java
23:08:45ldleworkAlso non-blocking IO is a completely different concept than concurrency
23:08:56Varriountldlework: Yes, I know that.
23:09:07ldleworkOh okay.
23:09:20ldleworkDo we have any sort of coroutine support yet?
23:09:36BlaXpirititerators.....
23:09:37ldleworkI mean couldn't he have just used threads?
23:09:39federico3shouldn't it run behind a webserver that spawns one process per core?
23:10:00ldleworkfederico3: for languages and platforms that can't do concurrency 'in-house' sure
23:10:14Varriountldlework: We don't have built in coroutines yet either.
23:10:19*Demon_Fox quit (Quit: Leaving)
23:10:20ldleworkVarriount: gotcha
23:10:39BlaXpirithow are iterators not coroutines?
23:10:44Varriountldlework: Though, what do you mean by coroutines?
23:10:58federico3ldlework: you might want to restart the workers from time to time (e.g. when deploying new code) without disruption
23:11:20*Boscop quit (Ping timeout: 246 seconds)
23:11:36VarriountOr wrap the servers in an https proxy
23:11:46BlaXpiritNim has iterators almost on par with Python's, and people say Python has coroutines...
23:12:07ldleworkfederico3: sure, but you can use multiple hosts behind balancing for that
23:12:38*banister joined #nim
23:12:45*banister quit (Max SendQ exceeded)
23:12:50ldleworkI guess I didn't mean coroutines, since those are cooperative and involve one thread
23:13:04*banister joined #nim
23:13:12federico3ldlework: of course, but sometimes you want to do both
23:13:29ldleworkfederico3: most clustering and failover tooling works with high-availability products
23:13:37ldleworknot, say nginx or apache...
23:13:56ldleworkSo I wouldn't recommend going multi-process for the mere justification of continuous deployment
23:14:51federico3well, I've seen more than 2 layers of load-balancing (in a very broad sense) in place, but I get what you mean
23:15:25flaviudef-: Did you get the GSOC app in?
23:16:00flaviuAlso, is anyone here a potential student?
23:16:00Varriountldlework: Coroutines can decide where execution has continued after they've yielded control.
23:16:07ldleworkwow goroutines are preemptive!?
23:16:30ldleworkVarriount: right, they're cooperative and generall single process. It was the wrong word to use.
23:17:06ldleworkI can't really think of a language that has natural first-class parellel tasking
23:17:18ldleworkthat doesn't involve making a thread and passing a callable to it, or something
23:17:27gokrDidn't Fortress do lots of that?
23:17:34ldleworknever even heard of it
23:17:58Varriountflaviu: I am a potential student
23:18:02gokrldlework: http://en.wikipedia.org/wiki/Fortress_%28programming_language%29
23:18:11gokrGuy Steele's baby
23:18:20federico3greenlets and asyncio like in Python?
23:18:26gokrLoops were by default parallell in Fortress.
23:18:34VarriountWoah.
23:19:12ldleworkfederico3: both greenlets and asyncio are both cooperative concurency, not parelellism
23:19:14gokrIt was a very interesting language, but ceased development in 2012
23:19:32federico3oh, *true* parallelism
23:19:33ldleworkoh greenlets are parellel
23:19:36*nande quit (Ping timeout: 264 seconds)
23:19:44ldleworkwait no
23:19:47federico3ldlework: nope
23:19:50ldleworktasklets are, but not greenlets
23:19:56ldleworkjesus this nomenclature is fucking horrid
23:20:20Varriountldlework: Welcome to computer science. Please take a ticket and sit in the waiting area.
23:20:26ldleworkheh
23:21:01ldleworkAnyway, we should Nim tasklets. That's be neat.
23:21:30VarriountPython's generators became coroutines with the inclusion of 'yield from'
23:21:45flaviuldlework: do I hear you volunteering to implement them? :P
23:21:50ldleworkhaha
23:22:00ldleworkVarriount: indeed. pretty awesome imo.
23:22:15*nande joined #nim
23:22:20ldleworkflaviu: I left out the verb
23:22:24ldleworkperhaps I meant 'dream about'
23:22:36federico3ldlework: oh and your ticket number is 33 and you've been allocated seat n.
23:22:41federico3Segmentation fault
23:22:59*ldlework goes to CS purgatory and waits for the great GC in the sky.
23:23:38Varriountldlework: I guess coroutines could be implemented in Nim by having the compiler place trampolining mechanisms wherever an iterator returns
23:23:57*BlaXpirit quit (Quit: Quit Konversation)
23:24:36ldleworkBut they still wouldn't be parellel and wouldn't help that guy get more performance
23:24:43Varriount*shrug*
23:24:50*reem quit (Remote host closed the connection)
23:25:01*sillesta quit (Ping timeout: 250 seconds)
23:25:20Varriountldlework: Think of a way to incorporate threading into the async framework. That's the key,
23:25:27ldleworkVarriount: yeah
23:25:32TEttingerldlework: I think APL or J could be implemented to run array operations in parallel by default? there's quite a lot of abstraction between J verbs and the hardware
23:25:46ldleworkTEttinger: no idea what APL or J means
23:25:51TEttingerlanguages
23:25:55ldleworkoh
23:26:07TEttingerin referense to <ldlework> I can't really think of a language that has natural first-class parellel tasking
23:26:10Varriountldlework: Perhaps dispatch operations that are GC-safe could be automatically run in a separate thread?
23:26:15TEttingerthey don't currently though
23:26:23*reem joined #nim
23:26:30renesacfilwit: about the forum layout, once you have the reply box open you can't see the topic's page numbers/links anymore
23:26:33ldleworkYeah I'm sure they're ARE languages that have first class parellelism but I just couldn't think of any
23:26:52renesacor is it a problem for dom96 ?
23:27:40filwitrenesac: i'll see about fixing it, thanks
23:29:21*sampwing joined #nim
23:30:51*nande_ joined #nim
23:31:29*nande quit (Ping timeout: 245 seconds)
23:40:58*pregressive quit (Read error: Connection reset by peer)
23:41:57*kuzy000_ quit (Ping timeout: 245 seconds)
23:45:55def-flaviu: yes, application is in
23:47:41*brson quit (Quit: leaving)
23:50:28*reem quit (Remote host closed the connection)
23:52:18*reem joined #nim
23:52:20*reem quit (Remote host closed the connection)
23:59:37*pregressive joined #nim