<< 22-01-2015 >>

00:03:37*BitPuffin quit (Ping timeout: 245 seconds)
00:04:00dom96flaviu: source code filters are good enough
00:04:17flaviusorry, no.
00:04:28dom96There is of course nothing stopping you from writing something better.
00:04:48flaviuExcept my free time :P
00:05:18dom96What do you have to do that is more important?
00:05:33profanflaviu: you can always make some bindings to an existing c library, shouldn't be too much work
00:06:09BlaXpiritno no, that's not gonna work
00:07:03BlaXpiritthere is no way for a c library to beat even source code filters
00:07:10BlaXpirityou need the integration with the language
00:07:47*ehaliewicz joined #nim
00:10:51Araqtest
00:11:26flaviuprofan: As much as I'm against rewriting things in nim for the sake of rewriting them in nim, C doesn't really have any templating libraries I like.
00:11:28*Sphax quit (Quit: ZZZZZzzzzz)
00:12:10profanah, that's harder then :P
00:12:47Araqflaviu: so what's wrong with source code filters?
00:14:16flaviuThey don't look very good, cannot be made at runtime, and cannot be embedded inside other code.
00:14:50EXetoCcomposability with strings is that bad?
00:15:37Araq1. only the first 2 lines or so are ugly
00:15:53Araq2. you can inject as many runtime values as you want via e.g. %
00:17:20Araq3. that's just a non-issue when the template is long enough and in general it is.
00:18:13AraqEXetoC: you can use them to directly write to some stream, you don't have to build intermediate strings.
00:19:35Araqand if you don't like them, you can onionhammer's stuff, it's very nice too.
00:20:54EXetoCwell, composing with strings too it not that good I agree. it's like not using a templating engine in the first place
00:26:51flaviuI mean that you can't create a new filter at runtime. re 3, that doesn't address the issue.
00:33:09*Varriount|Laptop joined #nim
00:35:39Araqwhy does a forum software need to generate filters at runtime in the first place? ah whatever, you simply don't want to help dom96 and that's not cool.
00:40:57BlaXpiriti don't see a reason to make forum software that isn't better in any way than existing forum software
00:41:24Varriount|LaptopAraq: One might argue that being able to edit the filters without having to recompile the forum executable is a good thing.
00:41:39Varriount|Laptop*filters/templates
00:42:02profanthe language is pretty young though, building things in it will help it grow, everything doesn't have to be built for the explicit purpose of being better than what was there before
00:42:34profaneven if that's a good goal
00:43:42profanor did i actually miss some part of the conversation and is now addressing the wrong thing? :V
00:43:58BlaXpiritthat is true
00:45:48profanit's sort of anticlimactic
00:46:06*Demon_Fox quit (Ping timeout: 246 seconds)
00:46:30profanpeople don't want to use a language for certain things because it misses certain libraries they may want, but without people working towards it, it'll never get there
00:47:17profani'm probably preaching to the choir though
00:47:19BlaXpiritbut until it gets there, may as well use existing forum software to not harm the language by alienating users
00:47:56EXetoCthey are eating their own dog food now though. that's something
00:47:56AraqVarriount|Laptop: you can easily read in whatever parts are in development at runtime though, it's not hard.
00:47:59*Demon_Fox joined #nim
00:48:16Varriount|LaptopWait, are we discussing whether to use the Nim forum software vs some other forum software *again*?
00:48:59BlaXpiritare you surprised to see it come up so often?
00:49:12AraqI think so. and it's good to have all these discussion which keep us from working. and then we complain we don't have the resources to do anything.
00:49:56Araqbut no big deal, we can create a task force to evaluate the issue
00:50:37BlaXpiritnah let's just make a mailing list, that'll solve everything
00:51:12Varriount|LaptopBlaXpirit: Don't forget the Skype group and a monthly newsletter
00:51:31BlaXpiritgood idea!
00:51:48flaviuI'm not talking about the forum right now, I'm speaking more in abstract terms.
00:52:11flaviuI don't want to start a flame war
00:52:22BlaXpiritwell, a monthly newsletter may actually be needed
00:52:48BlaXpiritto digest the important news from the 5+ different places for discussion
00:53:49dom96profan is completely right.
00:54:21dom96We used existing forum software before NimForum.
00:54:44BlaXpiritso then what happened?
00:55:24EXetoCright, libs being developed because of need
00:55:52EXetoCwhat are those libs btw? does it use async yet?
00:55:53AraqBlaXpirit: it was a piece of junk and overrun by spammers
00:56:06BlaXpiritumm
00:56:20Araqit also had no syntax highlighting for Nim but instead could show you your birthday
00:56:42dom96EXetoC: cairo, jester, asyncdispatch
00:56:56reactormonkAraq, cleary I need a notification when it's my birthday more, I always forget
00:57:17BlaXpiritAraq, do you realize the only reason that this one is not overrun by spammers is nobody wants to waste time on it?
00:57:28Araqreactormonk: I stopped aging instead :P
00:57:30dom96EXetoC: as well as lots of testing for the compiler
00:57:39flaviuThe state of forum software is pretty unfortunate. Much forum software has feature creep on the feature creep.
00:58:17EXetoCdom96: several bugs found? great
00:58:28AraqBlaXpirit: no it's because it uses non-standard software as well as a non-standard capture mechanism
00:58:28Varriount|LaptopBlaXpirit: Well, that, and the fact the forum isn't one of the giant PHP ones, so spambots aren't used to the HTML layout
00:58:53BlaXpiritthis is basically like security through obscurity
00:59:04AraqBlaXpirit: the old forum was not more active if that's what you're after
00:59:35flaviuBlaXpirit: Yep, that's how spam-bot defense works.
00:59:36Varriount|LaptopAraq: I'm massaging a PR to a better level of quality. For the tutorial part 2, may I add a section on objects vs ref objects?
01:02:01AraqVarriount|Laptop: just write "in this tutorial we will use 'ref object' for inheritance. you can use it without 'ref' too but then you better know what you are doing"
01:03:03*Boscop joined #nim
01:04:12*Boscop_ joined #nim
01:04:50profanyou probably want to explain it better than that, or noones going to understand the why
01:05:08*BlaXpirit quit (Quit: Quit Konversation)
01:07:06*Boscop__ joined #nim
01:07:38Araqprofan: I don't think people who read the tutorial need to understand that
01:08:36*Boscop quit (Ping timeout: 276 seconds)
01:09:36*Boscop joined #nim
01:10:25*darkf joined #nim
01:11:09*Boscop_ quit (Ping timeout: 256 seconds)
01:11:51*Boscop__ quit (Ping timeout: 276 seconds)
01:17:44Varriount|LaptopAlso, something I found out today - you can convert a ref type back to a value type through inheritance.
01:18:07Araqthat's a bug
01:18:31Araqthere are all sorts of bugs wrt the subtyping relation as implemented in the compiler
01:19:55Varriount|LaptopAraq: Oh? I thought it was a feature.
01:20:25Araqwell if you mean:
01:20:50Araqtype Foo = object of R where R is a 'ref object' then yes, that's a feature
01:21:12Varriount|LaptopYeah, that's what I mean.
01:21:32Araqoh ok, I thought you meant you can deref via a type conversion
01:22:09*sampwing joined #nim
01:22:30Varriount|LaptopI can see it being of use when you want to optimize allocations with regard to what's on the heap vs what's on the stack
01:22:53Varriount|LaptopAnd you're using a type from another library that you can't directly modify.
01:24:49*silven quit (Ping timeout: 244 seconds)
01:27:30*superfunc joined #nim
01:29:19*Varriount|Laptop quit (Ping timeout: 246 seconds)
01:30:46*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:36:15*silven joined #nim
01:36:57gmoorei was using a stringstream today in order to convert a sequence of characters into a series of shorts, using readInt16. (sounds ridiculous but it's what i needed and it worked great). but -- atEnd never returns true, consuming all data in the stream, past the end (returning a lot of erroneous 0 values), and eventually crashing
01:37:24gmooredoes atEnd not work properly or was my problem due to my creative usage?
01:38:00gmoorei ended up doing while getPosition() < known_length instead
01:43:53*sampwing quit (Ping timeout: 252 seconds)
01:55:11*titaniumone^ joined #nim
01:56:29*Demon_Fox quit (Ping timeout: 256 seconds)
01:56:55*Demon_Fox joined #nim
01:57:32*Jesin quit (Quit: Leaving)
01:57:54*rkj-b joined #nim
01:58:25*gunn joined #nim
01:59:21*st2p joined #nim
02:00:30*flaviu quit (Remote host closed the connection)
02:00:37*flaviu joined #nim
02:00:44*JinShil joined #nim
02:00:57*sampwing joined #nim
02:01:40*Jesin joined #nim
02:05:52rkj-bSo, is this Nim thing going to not destroy my computer, like C promised to do?
02:06:02*gmoore quit (Ping timeout: 264 seconds)
02:08:57*st2p quit (Quit: Page closed)
02:10:39*Mimbus quit (Read error: Connection reset by peer)
02:10:40*flaviu quit (Read error: Connection reset by peer)
02:14:37*flaviu joined #nim
02:15:52flaviurkj-b: I don't understand your question, but Nim uses C as its backend.
02:30:45rkj-bMy perception is that Nim compiles to C but the "functional" parts don't work so great with C. But maybe this will be fixed later?
02:31:10EXetoCwhat do you mean?
02:33:29*gunn quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:34:08rkj-bThe rumors are that when you compile a functional program to C, it gets slow.
02:37:04EXetoCI can't imagine there being any truth to that
02:37:36Triplefoxit's a very general statement
02:37:51flaviuNeither Nim's compiler nor GCC/Clang support deforestation or other advanced optimizations, if that's what you're referring to.
02:40:10EXetoCand that's just one aspect, so very general indeed
02:41:14Triplefoxif you have something more specific, a use-case for functional techniques, we could probably be more helpful about what Nim can do
02:43:48*gunn joined #nim
02:44:18EXetoCrkj-b: is that relevant to a supposed destruction of computers? :p
02:44:37Demosyou have to realize that the C output by nim is not idomatic, it is more of an intermediary language than a readable output. And C is quite good for representing stuff very exactly.
02:46:19*superfunc quit (Ping timeout: 246 seconds)
02:48:19rkj-bMy use-case is beyond what you would accept. I need speed. I mean like bad speed. I want to break the Turing Test boundaries, by far.
02:52:16Demoswe have the asm keyword.
02:55:45*sampwing quit (Ping timeout: 252 seconds)
02:56:07rkj-bI'm really going to do this. I don't care anymore. I just need the damn speed.
02:56:52*sampwing joined #nim
02:57:26*yonson quit (Quit: Leaving)
03:01:36*gsingh93 joined #nim
03:02:44*threewood quit (Ping timeout: 245 seconds)
03:03:00*ehaliewicz quit (Ping timeout: 265 seconds)
03:06:30*kapil__ joined #nim
03:15:37dtscodehey dom96 i promise this is the last thing ill bother you (concerning jester) for a while, but ive got jester running on port 80. and it pretty much controls what other pages i have,but i want to make dtscode.io/racket/, where i can show off my racket programs. how can i tell jester to ignore /racket/?
03:16:20keyledtscode: worst case you can make a redirect?
03:16:33dtscodeoh so on apache?
03:18:19keyleehm I mean't redirect to localhost:9090 running racket
03:18:26keylebut yes
03:18:51dtscodewait hold
03:19:11dtscodeive already got jester running on localhost:5000 and being redirected to 80
03:19:19dtscodedoes that matter?
03:21:14*Polytonic joined #nim
03:21:25*Polytonic left #nim ("Goodbye ...")
03:21:48keylehm
03:22:11keyleunsure what you're trying to do
03:22:19keyleyou want to run racket code?
03:22:42dtscodeill rephrase
03:23:04dtscodeso i have jester running on port 80 via proxy
03:23:45dtscodei want to develop some webpages in racket just because, but im not sure how i would display them, since paths are controlled via jester routes
03:24:07dtscodeand i would want them to be displayed on dtscode.io/racket
03:24:52keylehm don't know enough about jester
03:25:01keylebut you could run racket on port 9000 for example
03:25:21keyleand in jester for route /racket you have an html file redirecting to port 9000
03:25:27keylewhere the racket is served
03:25:51dtscodehmmm... ill see if i can do that. thanks
03:25:51keyleor even better, the jester handles the redirect, potentially without revealing the port 90000
03:26:04dtscodedoes jester handle redirects?
03:26:30keyleI've never used jester but I think it's beyond its scope
03:27:40dtscodehrrmmmm
03:28:28keyleapache has rewrite rules which is what you want it sounds like
03:28:35keylemaybe nginx does it too
03:28:37titaniumone^dtscode apache vhosts
03:28:44keyleyep vhosts
03:28:55dtscodeah ok. thanks.
03:29:12keyleso you'd run nginx on port 80, rewrite rules for most url to jester:5000 and /racket to racket:9000
03:29:18keyle(for example)
03:29:36*Trixar_za quit (Quit: ZNC - http://znc.in)
03:31:07keylethis may help http://nginx.org/en/docs/http/converting_rewrite_rules.html
03:31:23keylebut I'd imagine you could hack jester to do just that
03:35:23dtscodeoh im using apache, but thanks. i think i remember how to do rewrite rules
03:36:26keyleyou will need mod_proxy and mod_rewrite I think
03:36:39dtscodeyeah, thats what im using for jester atm
03:44:06*brson quit (Quit: leaving)
03:46:52*EXetoC quit (Ping timeout: 240 seconds)
03:50:04adam12Error: undeclared identifier: 'await' -- seems odd that I would get this copy/pasting the example from asyncnet.nim verbatim. Any thoughts?
03:50:30dtscodecode plz
03:50:57adam12https://gist.github.com/adam12/83720a8845530f616c29
03:51:15dtscodealso, what compiler version
03:51:27adam12Nim Compiler Version 0.10.2 (2014-12-29) [MacOSX: amd64]
03:51:36dtscodehrmmm
03:51:50adam12Same error on latest master, just built a few minutes ago.
03:52:03dtscodeit could be a bug
03:52:11dtscodemaybe open up an issue on github?
03:52:11adam12I ran the asyncnet.nim module directly, and it ran the tests fine.
03:52:19adam12so, I dunno? Seems super odd.
03:52:40dtscodethats the example copied verbatim right?
03:52:48dtscodeit works fine for me on 10.3
03:52:49adam12Yep
03:52:59adam12Is 10.3 devel branch
03:52:59adam12?
03:53:17dtscodeyeah
03:53:20dtscodei always pull from devel
03:53:25adam12Let me try devel.
03:53:42*ARCADIVS joined #nim
03:54:50keylehm yeah devel is the way to go
03:55:09*VinceAddons quit (Read error: Connection reset by peer)
03:55:18adam12Same problem.
03:55:32adam12Could it be platform related?
03:55:40dtscodeim assuming yhes
03:56:19adam12I just wonder why the code embedded into the module runs fine. Doesn't look any different. Hmph
04:03:56*Demon_Fox quit (Quit: Leaving)
04:05:03*sampwing quit (Ping timeout: 252 seconds)
04:12:08*rkj-b quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045])
04:23:09*st2p joined #nim
04:23:24*st2p quit (Client Quit)
05:11:32*Demos quit (Read error: Connection reset by peer)
05:13:30*Sergio96_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:30:05*brson joined #nim
05:59:35*keyle quit (Quit: Lost terminal)
06:00:41*keyle joined #nim
06:27:37*brson quit (Quit: leaving)
06:37:54keyledef-: thanks, re strutils.split, I was naively using {"a", "b",...} instead of single quotes.
06:43:41*bjz joined #nim
06:47:58*bjz quit (Max SendQ exceeded)
06:48:43*bjz joined #nim
06:53:53*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:57:30*gunn_ joined #nim
07:00:54*gunn quit (Ping timeout: 276 seconds)
07:12:39*bjz joined #nim
07:38:16*iivvoo joined #nim
07:57:23*joecodes2 quit (Quit: Page closed)
08:11:19*[CBR]Unspoken quit (Remote host closed the connection)
08:16:14*[CBR]Unspoken joined #nim
08:16:29*infrashortfoo joined #nim
08:28:19*Sphax joined #nim
08:31:38*gunn_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:33:46*Sphax quit (Read error: Connection reset by peer)
08:35:49*Sphax joined #nim
08:52:03*endou______ quit (Ping timeout: 276 seconds)
09:05:13*endou______ joined #nim
09:09:08*JinShil quit (Quit: Konversation terminated!)
09:19:25gokrJust registered the mailing list at gmane
09:20:11gokrSo in case you missed it - we have a new experimental ml at: http://www.freelists.org/list/nim-dev
09:23:23*Trustable joined #nim
09:24:23*gsingh93 quit (Quit: Connection closed for inactivity)
09:38:42*gunn joined #nim
10:06:54ekarlsodom96: you come up with a way yet to register a exception handler in nim ?
10:11:40*SplinterOfChaos quit (Ping timeout: 255 seconds)
10:19:31*BlaXpirit joined #nim
10:28:26Araqadam12: 'await' only works in an .async proc
10:28:40Araqyou use it in a top level statement
10:34:27*davidhq joined #nim
10:40:15*JinShil joined #nim
10:54:16*iivvoo left #nim ("Leaving")
11:01:31*kapil__ quit (Quit: Connection closed for inactivity)
11:07:47*VinceAddons joined #nim
11:30:24ekarlsohow can I exec a shell cmd from nim ?
11:30:41keylelook in os
11:31:29keyleos.execShellCmd
11:33:36BlaXpiritplease use this if possible http://nim-lang.org/osproc.html#execProcess,string,openArray%5Bstring%5D,StringTableRef,set%5BProcessOption%5D
11:42:24ekarlsokeyle: could you wanna throw up a easy html + js for a "play.nim.x" thing ?
11:43:09ekarlsoeither that or I turn to angular once again :P
11:45:32keyleI thought we agreed this is a terrible idea :)
11:45:45keylesecurity wise
11:46:13ekarlsoother language has it but ok :P
11:46:36ekarlsoi'll spare the effort and continue on with pacakges stuffs intsead
11:47:38keyleyeah you need someone to really know their security and process isolation stuff
12:03:23keyleanyone working on interesting stuff?
12:04:30Triplefoxhttp://t.co/4RqHLVhCzS
12:04:48keyleneat :D
12:05:10dom96ekarlso: What is so attractive about angular?
12:05:40dom96ekarlso: Also I'm not sure what you asked me 2 hours ago.
12:05:49keyleit's the natural evolution after coffeescript
12:05:54keyle;>
12:08:45*kapil__ joined #nim
12:08:46ekarlsodom96: .. i've just gotten used to it :)
12:09:26dom96ekarlso: You should try other ways of doing things.
12:09:33ekarlsodom96: really why ?
12:09:41dom96It's good experience.
12:09:52ekarlsodom96: i've used jq before..
12:10:18dom96There is really no need for JS at all for some websites.
12:10:35dom96I can't think why a play.nim-lang.org website would need it
12:15:10ekarlsodom96: i like interactive websites ish vs static..
12:15:17*JinShil quit (Quit: Konversation terminated!)
12:15:59keyleShould look at using flash then
12:16:36keylesorry I'm being harsh.
12:17:06ekarlsogod what is it with you guys and being motivating..
12:18:58dom96keyle: hey now. Please don't be so harsh.
12:19:24keyleyep my bad, sorry.
12:20:16*EXetoC joined #nim
12:22:22*keyle quit (Quit: lack of sleep makes me cranky!)
12:25:21ekarlsodom96: I just modeled it after what the rust guys have, they use js on their frontend page..
12:26:13dom96ekarlso: That's fine :)
12:26:41dom96Just please remember that not everything has to be done exactly the same way as their website.
12:26:51dom96It's good to look at alternatives because they may be superior.
12:26:56ekarlsodom96: no, but I've been looking at go as well and they have the same thing
12:27:09ekarlsobasically let's you spin up a "playpen" locally
12:27:22dom96they use angular too?
12:27:23ekarlsojust by having the "nim_playpen" locally
12:27:28ekarlsodunno what they use :)
12:27:44dom96is your package site finished yet?
12:27:44ekarlsoi'm just used to angular and can make things *fairly* quickly vs going to use something else
12:27:58ekarlsodom96: been busy the last few days with lots of hp stuff..
12:28:20dom96There must be a reason you're trying out Nim though.
12:28:24ekarlsobut added auth stuff to it, adding releases now then gonna do nimble
12:28:31ekarlsodom96: well I tried rust before then nim
12:28:39ekarlsoI'm used to python so nim is more fun
12:28:40dom96I'm sure there are programming languages in which you can create things quickly too.
12:28:44ekarlsoand nah, just to play with stuff
12:28:52dom96My point is that it's good to try things.
12:28:57dom96Not just stick with angular forever.
12:29:13dom96Take a look at how the forum works for example.
12:29:20ekarlsothat's a static site ;)
12:29:32dom96No it's not.
12:29:38dom96I can create threads
12:29:39dom96I can reply
12:29:42dom96That makes it non-static.
12:29:50ekarlsoI mean, sorry server served contet rather
12:34:04ekarlsodom96: should it support package tarball uploads ?
12:34:11dom96sure
12:34:25ekarlsoI was talking to a friend at a cloud provider here in norway
12:34:28dom96I think we need to come up with a list of things it should do for the first version
12:34:38ekarlsothey may sponsor storage and a server for it
12:34:40dom96There is no point in implementing everything
12:34:45ekarlsodom96: +1 to that .p
12:34:50ekarlsocurrently it's only a registry
12:35:11dom96What I would like to see it do right now is download the packages.json file
12:35:17dom96go through each package
12:35:30dom96and check what versions are available
12:36:00ekarlsoI changed version to be a /packages/foo/versions
12:36:03ekarlsoor "releases" rather
12:36:14ekarlsobecause if not "packages.json" can be a huge file :/
12:36:24dom96yeah, good
12:45:47Araqso gokr ... have the mailing list issues been resolved? or should we all switch to google?
12:54:30*BlaXpirit_ joined #nim
12:57:15*BlaXpirit quit (Ping timeout: 246 seconds)
13:20:36gokrIn fact, the only "issue" I know of .... is not a fault of the ml. Its gmail.
13:24:04gokrekarlso: Regarding the package ... registry? In SqueakMap that I built - you registered "releases" and for each release a URL pointing to it. SqueakMap would then download that file and cache it on its server. So if that URL for whatever reason became lost - it would still have it.
13:24:21gokrI also stored a checksum.
13:56:46ekarlsogokr: I can give you a api doc link soon ;)
14:11:50*darkf quit (Quit: Leaving)
14:46:17*sillesta joined #nim
14:55:57*Varriount|Laptop joined #nim
15:11:39*jefus_ joined #nim
15:14:58*Varriount|Laptop quit (Ping timeout: 246 seconds)
15:15:52*dom96 quit (Changing host)
15:15:52*dom96 joined #nim
15:16:08*threewood joined #nim
15:19:10*jefus_ is now known as jefus
15:28:40*ivan` joined #nim
15:28:58*ivan` is now known as Guest46431
15:29:10*Guest46431 left #nim (#nim)
15:29:17ekarlsogokr: dom96 https://nim-pkg.svcs.io/api-docs
15:30:43EXetoCis there a purpose to having an untrusted certificate? testing maybe
15:31:08ekarlsoEXetoC: it's only in testing phase atm :P
15:31:17ekarlsoso behind a stunnel :/
15:31:59AraqI think I came across more untrusted certificates than trusted ones by now
15:32:28Araqit's always like "yeah I know, I know, accept it please"
15:35:52EXetoCwhat about html though in the case of a forum/ml bridge?
15:37:24EXetoCI like syntax highlighting and such
15:38:36ekarlsoEXetoC: what yu mean ?
15:47:53*ARCADIVS quit (Quit: ARCADIVS)
15:49:00*BitPuffin joined #nim
15:53:55*Varriount|Laptop joined #nim
16:01:31*kapil__ quit (Quit: Connection closed for inactivity)
16:09:40EXetoCekarlso: because, "html in e-mail is bad"
16:12:11EXetoC"The real issue here is how awful Microsoft's email clients are and how many people still use them" *shrug*
16:13:17*SplinterOfChaos joined #nim
16:15:54Varriount|LaptopAraq, dom96: We should probably look into putting the forum, and website under an https certificate.
16:17:23AraqVarriount|Laptop: first we need to figure out why these constant name lookup failures happen
16:17:36Araqit's really annoying
16:17:58Varriount|LaptopIs it something on our side?
16:23:07Araqdunno, I think so
16:23:31Araqwe bought a too cheap vps :P
16:32:40*Varriount|Laptop quit (Ping timeout: 246 seconds)
16:34:19*superfunc[mobile joined #nim
16:48:41def-No way to handle return code with staticExec?
16:57:21*sampwing joined #nim
16:58:21*drewsrem joined #nim
17:00:25*infrashortfoo quit ()
17:02:24*Demon_Fox joined #nim
17:06:03drewsremCan I cast a string (or cstring) to an array of chars? / Is there something out of the box to crop a string/cstring into a given char array?
17:08:12EXetoCyou can cast to anything basically
17:08:44EXetoCwhy do you need to perform this conversion?
17:09:47ekarlsoany of you good with select boxes or so ?
17:09:59ekarlsoI am wondering about a solution for "tags" when creating a package
17:10:24ekarlsoso we could say pre-populate a tags list and have tags show up when a user enters parts of a tag
17:10:40ekarlsobut my webdesign knowledge is too limited :|
17:14:17drewsremEXetoC, interfacing with a C-lib
17:18:14EXetoCit's not a char*? because cstring is compatible with it. one can also take the address of a certain element in a string(str[i].addr)
17:20:55drewsremEXetoC, https://github.com/Araq/Nim/blob/master/lib/posix/posix.nim#L415 ?
17:21:27*sampwing quit (Ping timeout: 252 seconds)
17:22:06drewsremSo I guess: let cpath = cast[array[0..255, char]](cstring("/path/somepath")) ?
17:22:17Araqdon't do that
17:22:30Araqvar cpath: array[256, char]
17:23:06Araqvar cpath: array[256, char] = "/path/foo" # perhaps this compiles, not sure
17:23:38drewsremdoesn't
17:23:50*Matthias247 joined #nim
17:23:51Araqbut usually you can just pass the sting literal to a proc taking a cstring
17:24:09drewsremgot (string) but expected 'array[0.255, char]'
17:24:13Araqif you really need it in an array, use copyMem or wrap strcpy
17:25:32drewsremI'll look into those, thanks
17:26:26Araqalso check out how rawsockets does it
17:27:08drewsremIs this dangerous tho?: let cpath = cast[array[256, char]](cstring("/path/somepath"))
17:27:18drewsremGood point, I will
17:27:26drewsremOr just ugly?
17:28:26*Sphax quit (Quit: CYA!!)
17:31:38Araqit shouldn't even be allowed, you need to use 'ptr array'
17:33:12drewsremIt compiles, my SockAddr call is a "constructor" for an object that imports a struct tho
17:34:03drewsremAh right its a pointer
17:35:42*johnsoft quit (Ping timeout: 245 seconds)
17:36:32*johnsoft joined #nim
17:44:15drewsremActually not, apparently, the members of the sockaddr struct aren't pointer
18:15:51BlaXpirit_seriously though, we need to tell people to use "nre" instead of "re" right now.
18:35:39*gokr_ joined #nim
18:42:31*superfunc[mobile quit (Quit: Connection closed for inactivity)
18:45:49*matkuki joined #nim
18:47:37*rpag joined #nim
18:53:04*alexruf joined #nim
19:02:03*Varriount|Laptop joined #nim
19:08:18Varriount|Laptopdom96: The http module, when run, is choking on the sites given to it. However other sites, like 'google.com' work.
19:10:04Varriount|LaptopError: unhandled exception: invalid http version, 000000000032E6E0"<html>" [Exception]
19:22:32matkukiHow do I convert a tuple "Position = tuple[top, left :int]" to a "ref Position"?
19:23:54matkukiExample: var pos :Position = (10, 20); var rpos :ref Position = ?
19:28:54EXetoCmatkuki: var x = new(tuple[x, y: int]); x[] = (1, 2)
19:29:04Varriount|Laptopmatkuki: Well, you could do it manually. Why are you using a tuple when you want a ref object?
19:29:05EXetoCI don't know if it can be reduced to one statement
19:29:51matkukiEXetoC: Thanks, it doesn't need to be a one liner.
19:30:44matkukiVarriount: A tuple is enough for what I need.
19:30:47EXetoConly with objects I think: (ref T)(x: x, ...)
19:32:35*sdegutis joined #nim
19:33:02sdegutisHas anyone come to Nim from Rust? If so, I'm curious why you prefer Nim.
19:33:16*Varriount|Laptop quit (Ping timeout: 246 seconds)
19:37:23def-sdegutis: I guess you've seen this: https://arthurtw.github.io/2015/01/12/quick-comparison-nim-vs-rust.html
19:37:30sdegutisI haven't.
19:37:35sdegutisThanks def- :)
19:37:42sdegutisdef-: is Nim currently your language of choice?
19:37:55def-Yes, when I get to choose
19:38:04rpagwhen you dont?
19:38:05def-Before that I considered Rust
19:38:11sdegutisdef-: Is Nim just as unstable as Rust?
19:38:50def-I think Nim has fewer changes, but there are still quite some bugs
19:39:13sdegutisIs Nim ready for production use yet?
19:39:30def-rpag: when i don't get to choose I write Python, C++, Haskell, C mainly
19:41:09def-sdegutis: I'd say it is. Most of the bugs are in experimental features
19:41:26def-sdegutis: I'm curious, why are you asking?
19:41:35sdegutisdef-: Do you consider Nim to be much less enjoyable when not using the experimental or upcoming features?
19:41:43EXetoCsdegutis: because of better metaprogramming, more concise syntax, type introspection and various other things
19:42:39sdegutisEXetoC: you may have misread my question to def-
19:43:07sdegutisdef-: I have been searching for years for the true religion, and have recently found it. Likewise, I have been searching for years for the best programming language to use for my day job, and have not yet found it. However, I accept and admit that unlike the true religion, there may never be a "best" programming language. But that hasn't deterred me from trying to find at least a more pleasant one to use.
19:43:08EXetoCthat was about your first question
19:43:16sdegutisEXetoC: I see, thanks.
19:43:23def-I also have an article about some of the things I like about Nim (with another coming tomorrow): http://hookrace.net/blog/what-is-special-about-nim/
19:43:49def-sdegutis: best to try out Nim then, you will see if you like it
19:44:06def-before using it in production, write some fun projects
19:44:20def-sdegutis: nope, still pretty enjoyable
19:44:26sdegutisdef-: Very true and wise words. But it's also worth asking others their opinion of a language after inspecting their repute and trustworthiness. This has saved me many hours.
19:44:33EXetoCcan arbitrary objects be stringified in rust?
19:45:10sdegutisI see very few types in Nim, which makes me concerned that the static typing may not be as strict or strong as I was hoping. Is there any reason to continue in this concern?
19:45:41EXetoCno. nim has type inferrence
19:45:48bjzEXetoC: you used to be able to, but reflection was removed
19:45:49sdegutisExcellent.
19:45:52reactormonksdegutis, too much java? :-)
19:46:18bjzsdegutis: not seeing types does not mean a language is not statically typed
19:46:19sdegutisI learned Swift over the holydays, and it was quite enjoyable. Has anyone else here used Swift?
19:46:36sdegutisbjz: right, I am aware of type inference; but sometimes the line can be a bit blurred between dynamic and static typing
19:47:04bjzsdegutis: in SML or OCaml you can leave off all the types, and the compiler can figure out if it is a valid program through type reconstruction
19:48:00sdegutisbjz: I understand, thank you; on a slightly related note, the syntax of ML languages scare me :)
19:48:39*brson joined #nim
19:48:43bjzEXetoC: nim's inference is similar to Go/C++ right? ie. not a constraint system like Hindly Milner?
19:49:01EXetoCsdegutis: it only reduces verbosity. sometimes a little too much though, but it usually doesn't reduce the readability
19:49:21EXetoC"var x = 1"
19:49:24bjzsdegutis: you get over syntax pretty fast
19:49:57sdegutisDo any of you know Swift?
19:50:04bjzsdegutis: semantics is more important, although it is always nice to write in something that has nice syntax
19:50:17bjzsdegutis: I have looked into it a bit
19:50:25EXetoCyeah, it didn't catch my interest simply because of the vendor lock-in
19:50:29bjzsdegutis: not a ton though
19:50:54sdegutisDang. I was hoping someone could relate Nim to me compared to Swift.
19:51:07sdegutisI know Swift pretty well now and wrote a really really powerful wrapper for Lua in it.
19:51:21sdegutisI know there's a Nim wrapper for Lua too, but if I learn Nim, I will surely write my own.
19:51:32EXetoCbjz: I can't say for sure, but the inference capabilities seem similar to that of C++11
19:52:34bjzsdegutis: Well swift's type system seems more based on the ML lineage than Nim
19:52:39EXetoCsdegutis: people do say that Nim is more stable
19:52:54EXetoCthan Rust that is
19:52:56drewsrem*rimshot*?
19:53:09def-bjz: It's definitely not full HM inference, but something more local
19:53:13bjzsdegutis: although with OO stuff added
19:53:53bjzsdegutis: Nim has much bettter, more expressive metaprogramming
19:54:01sdegutisRight now my day job is writing a web app in Clojure.
19:54:20sdegutisI'm considering whether it's feasible to write a web app in Nim with rapid development.
19:54:47ldleworksdegutis: Since there is no Nim web tooling, probably not
19:55:02ldleworksdegutis: maybe if all you need to write is some json api or something
19:55:28sdegutisIs there some basic HTTP lib for Nim?
19:55:42EXetoCthere's that, and the jester web framework
19:56:04def-sdegutis: list of libs: http://nim-lang.org/lib.html
19:56:25EXetoCthe website is powered by it, but it has some limitations atm
19:58:31sdegutisEXetoC: oh?
19:59:28sdegutisWhat's @?
19:59:35sdegutisLike @"name"
20:00:38EXetoCit refers to the string captured in the pattern
20:00:47sdegutisYes but how does this syntax work?
20:00:56sdegutisWhat is @ and what does it do?
20:02:41def-sdegutis: where is the @?
20:02:50EXetoCsdegutis: this is a DSL specified by the 'routes' macro
20:02:57sdegutishttps://github.com/dom96/jester
20:02:59def-ah, in jester
20:03:04sdegutisoh weird
20:03:04EXetoChttps://github.com/dom96/jester/blob/master/jester.nim#L660
20:03:07sdegutisi dont like dsls
20:03:18def-you can use jester without the DSL I think
20:03:40sdegutisbut yeah its nice to have that power
20:03:53sdegutiswhy the name change to nim?
20:03:56def-https://github.com/dom96/jester/blob/master/tests/example2.nim
20:04:11def-sdegutis: Americans consider "nimrod" an insult
20:04:16EXetoCsdegutis: nimrod also means idiot, and people are easily offended
20:04:46sdegutisoh
20:09:13sdegutisHow does Nim handle nil/null?
20:10:03sdegutisI much liked Swift's approach to avoiding nil: there is simply an Option<T> sum type, having two cases: Some<T> or None
20:10:20sdegutisDoes Nim have something similar to make null pointer exceptions difficult/impossible?
20:10:57Zuchtothe Maybe construct (as it's called in Haskell) is awesome :) Would love to see it in more langugase
20:11:02Zuchto*languages
20:11:16sdegutisIs it not in Nim?
20:11:24EXetoCimplicit nil: "x: ref int". there's no indirection like in Rust. nim has 'not nil' annotations
20:11:47sdegutisI saw "not nil" but unless that's used everywhere in the stdlib, it seems dangerous.
20:12:09EXetoCit's new and relatively untested
20:12:25sdegutisI may have fallen out of love with Nim just now.
20:12:31EXetoCsdegutis: helpful errors are shown along with a stacktrace in case of a nil dereference
20:12:40sdegutis... at runtime
20:12:54sdegutisI'd prefer that to happen at compile time.
20:13:05sdegutisEven Java already does that ;)
20:13:48bjzEXetoC: "no indirection like in Rust" what do you mean?
20:13:51def-with "not nil" you should get a warning at compile if you forgot to initialize
20:14:17EXetoCsdegutis: where does it say "at runtime"?
20:14:32EXetoCthat examples fails at compile time
20:14:52sdegutisAll I mean is that by default you can pass nil to reference types in Nim and have runtime null pointer exceptions.
20:14:59sdegutisThis turns me off to it.
20:16:33EXetoCoh well
20:16:38EXetoCbjz: nevermind that
20:17:46bjzEXetoC: heh, sorry
20:18:06bjzEXetoC: keeping you honest ;)
20:19:55EXetoCthat was just another case of being really vague
20:29:13*rpag quit (Quit: Leaving)
20:41:31*Mimbus joined #nim
20:43:08*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:44:14*64MABUCAW joined #nim
20:46:03*64MABUCAW quit (Remote host closed the connection)
20:46:52drewsremmaybe it's just me, but I find it sort-of hard to read multiplat. code from the stdlib when "when" is used to separate the platforms
20:48:02drewsremHave to page-up until I find the "when defined" to check what platform I'm looking at / find the correctly indented else
20:48:28drewsremMaybe it's not really a problem after you get used to or I'm doing something wrong, just occurred to me
20:52:13flaviudrewsrem: I don't like it much either.
20:52:47flaviuMaybe a convention like C ifdefs that add the condition as a comment to the end?
20:53:17flaviuekarlso: re. tag search, I've used https://twitter.github.io/typeahead.js/ once, I found it pretty easy to handle.
20:53:26sdegutisCan Nim be compared to Go?
20:54:08flaviuAnything can be compared to anything :P
20:54:12drewsremsdegutis, just get your hands dirty, it's so easy to jump into
20:54:39sdegutisdrewsrem: there's no shame in forming a better picture of something by asking a few short questions to those who know it well
20:54:49sdegutisIt saves me many hours which I no longer have to spare.
20:55:49flaviusdegutis: My remark was a bit obtuse, but I really don't understand your question.
20:56:45sdegutisI know Go pretty well and I'm wondering if Nim is very similar, semantically (syntax matters little).
20:57:02drewsremsdegutis, I didn't say it's shameful; but hours of peoples explanations can't replace a first-hand experience, imho
20:58:08sdegutisdrewsrem: then we'll have to agree to disagree, for I am very confident that summaries are indeed useful, and in fact this is how many people learn of many subjects more than adequately
20:58:17EXetoCsdegutis: do you use any statically typed languages with not-null by default?
20:58:22drewsremI don't think it is anything like Go
20:58:28sdegutisEXetoC: yes, Swift
20:58:34EXetoC'not nil' by default might be nice. there are many things that make up a language though
20:58:35flaviusdegutis: Go tries to be very simple (sometimes to extremes IMO), but nim isn't simple.
20:58:38EXetoCok
20:59:29sdegutisI've learned and become proficient at Go, Ruby, Python, C, Objective-C, Swift, Clojure, Lua, and probably more that I've since forgotten. So I'm no stranger to learning a new language, nor of the techniques that make it more the process easier and quicker.
21:01:27drewsremsdegutis, good for you, I still couldn't say what Language can be best compared to Nim, and I still recommend that you do a little example, you'll quickly find out yourself
21:02:20sdegutisdrewsrem: how do you recommend I can learn what code is valid, and which features it offers?
21:03:25*bjz joined #nim
21:03:36sdegutisDoes Nim allow methods to be defined only as part of a class? I see in the first example on http://nim-lang.org/ that one can either call greet(p) or p.greet() and I wonder if it's possible to make greet not be a free-floating (global) function but strictly and only a method on p.
21:03:54def-no
21:03:55drewsremsdegutis, the documentation is really good now, I also recommend this: http://nim-by-example.github.io/ (I hope it's up to date)
21:04:06def-Learning Nim: http://nim-lang.org/learn.html
21:04:30sdegutisdef-: so all methods are also always global (at least within the module) functions?
21:04:32drewsremAren't the tutorials obsolete?
21:04:51EXetoCsdegutis: yes
21:04:56sdegutisThat sounds awful.
21:04:58EXetoCunless a block is introduced
21:04:58def-drewsrem: i don't know, i learned from them
21:05:00EXetoCwhy?
21:05:11sdegutisWhat if there are name collisions between two types within one module?
21:05:32sdegutisSay two types have a method each named "greet" taking only that object.
21:05:36EXetoCthere's overloading, if that's what you are referring to
21:05:37sdegutisHow is this handled in Nim?
21:05:39sdegutisAh.
21:05:55sdegutisDoes this do dynamic dispatching or is it purely looked up at compile-time?
21:06:08def-you can enable dynamic dispatch with the "method" keyword
21:06:09flaviu"method"s are dynamic dispatch
21:06:10def-instead of proc
21:06:17EXetoCand then there's the case where the signature for two procs are the same but defined in different modules, in which you qualify the symbol with the module name at the call-site
21:06:23sdegutisWhat's the current Nim version?
21:06:40drewsremsdegutis, look it up on the nim website
21:06:42sdegutisThis seems up to date http://nim-lang.org/tut1.html
21:06:46sdegutisdrewsrem: I did and could not find it.
21:06:51EXetoCmodule.foo(), if foo() happens to cause a collision
21:06:54sdegutisOh, 0.10.2
21:08:06EXetoChttp://nim-by-example.github.io
21:08:07sdegutisWhat are your two favorite features of Nim?
21:08:18sdegutisEXetoC: how do I know that's not outdated?
21:09:05drewsremIt's github pages, you should be able to look up the github repo
21:09:14drewsremhttps://github.com/flaviut/nim-by-example/
21:09:23flaviuo/
21:09:25drewsremLooks recent
21:12:08sdegutisDo the Nim authors hang out in here ever?
21:12:27*Varriount|Mobile joined #nim
21:12:38sdegutisAraq, dom96: hi
21:13:54flaviusdegutis: Thanks for pointing out it may be out of date, I'm recompiling all the examples, and it looks like there are at least two broken ones.
21:14:02sdegutisflaviu: awesome
21:14:17Varriount|Mobilesdegutis: It helps if you stop thinking about things as object oriented
21:14:43Varriount|MobileClasses are just an abstraction.
21:14:54sdegutisVarriount|Mobile: I'm proficient in Clojure, so I think I'll do fine with not thinking in OOP.
21:14:56*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:14:59sdegutis*idiomatic Clojure
21:16:06sdegutisWait a minute..
21:16:31Varriount|Mobilesdegutis: Ambiguities related to unified procedure calling syntax don't happen very often.
21:16:35sdegutisprocedures and functions are explicitly different and can't be used interchangeably unless the procedure is marked as being used in place of a function (via procvar)??
21:17:09Varriount|Mobilesdegutis: Huh?
21:17:26sdegutishttp://nim-by-example.github.io/procvars/
21:17:42sdegutis"Existing procedures can also be passed as functions, but only if they are annotated with the {.procvar.} pragma."
21:18:12sdegutisThat means I can't pass an existing procedure into something like "filter" if the author of that function didn't mark it as such.
21:18:17sdegutisWhy is this!
21:18:24Varriount|MobileThat should really be worded differently. Also, it's incorrect
21:18:25drewsrem...
21:18:43Varriount|MobileBrb, getting on desktop
21:18:46sdegutisok
21:19:35sdegutisVarriount: how would you word it?
21:19:58Araqsdegutis: that's because taking a proc by address or as a first class value or whatever you call it is not nice for the module author
21:20:37Araqthanks to procvar I can add a parameter with a default value to any proc in the system without breaking anything
21:20:43*Varriount|Laptop joined #nim
21:21:22Varriount|LaptopDid I say desktop? I meant laptop. :3
21:21:38Araqwithout procvar somebody might have used it as a first class citizen and I would break his code
21:22:57Araqand besides, x => x.toUpper vs toUpper is not something to lose sleep over
21:23:42sdegutisAraq: Thanks for your kind explanation. Not knowing Nimrod's syntax yet, I don't really know how to interpret what you've said.
21:24:14sdegutisI'm just used to other languages that treat functions as first-class citizens and let you use functions and lambdas interchangeably.
21:24:26sdegutisIt seems this isn't the case in Nimrod, but that there's a trivial workaround for it?
21:24:35Araqwell apart from procvar, Nim lets you do just that
21:24:49Araqfunctions are first class
21:25:18sdegutisAwesome.
21:25:26Araqand I already gave you the workaround for when it's not procvar
21:25:27sdegutisThen perhaps I just stumbled onto the wrong page in that tutorial.
21:25:29flaviuAraq: I can't get that code to compile.
21:25:46Araqx => x.toUpper # via the future module
21:25:47sdegutisAraq: is Nimrod your brainchild?
21:25:51Araqyes
21:26:23flaviu.eval import future; @["123", "abc"].map(a => a.toUpper)
21:26:24drewsremIs it a boy or a girl?
21:26:26Mimbusflaviu: eval.nim(4, 15) Error: type mismatch: got (seq[string], proc (GenericParam): auto)
21:26:26sdegutisAraq: have you gotten burnt out on it yet or foresee it soon?
21:27:17BlaXpirit_flaviu, these things rarely work as you expect...
21:28:04sdegutisBlaXpirit_: what? how so?
21:28:50BlaXpirit_flaviu, and with map it's even worse, because it somehow expects a void proc
21:29:33BlaXpirit_if map actually worked with these short functions, LC wouldn't be needed >_>
21:30:42sdegutisLC?
21:30:44sdegutisWhat's that?
21:30:58BlaXpirit_list comprehension in future module
21:31:41flaviuhttp://nim-lang.org/future.html
21:32:03Araqflaviu: ah yeah I need to fix that
21:33:10Araqsdegutis: excellent question. :-) I am not burning out but babysitting a growing community is getting tiresome
21:33:48sdegutisAraq: I've noticed that a few years ago rich hickey stopped responding in #clojure altogether
21:33:57sdegutisAraq: so maybe just stop babysitting it and let it grow on its own now
21:34:27sdegutisWell, the fact that list comprehensions are needed because map is broken scares me away from Nim.
21:35:02Araqyou're just looking for excuses to not use it. that's fine. ;-)
21:35:22sdegutisYou could think of it that way.
21:36:08flaviusdegutis: If it makes you feel better, it's not map that's broken. It's type inference.
21:36:14sdegutisFrom my perspective, it's more that I'm trying to find my new favorite language, and am trying to filter them out based on my list of preferred features ordered by priority, since there's too many to choose from.
21:36:20sdegutis/cc Araq
21:36:22Araqthere is also proc (x: string): string = x.toUpper
21:36:34Araqwhich works right now, but is longer
21:36:52sdegutisAraq: ah, right, because that bypasses type inference
21:37:19sdegutisAraq: but don't count my opinion as worth anything; I'm just one user whose opinions on programming change by the day
21:37:38sdegutisThat said, this is a deal breaker for me for Nim right now.
21:37:44sdegutisBest of luck. If you want, you can even have my prayers.
21:37:52drewsremYes please
21:39:24Araqsdegutis: no worries.
21:45:15matkukiTuples can be accessed by field name or by array accessor? That's really great!
21:45:29Araqthe forum is more offline for me than it's online ...
21:45:38*Araq sighs
21:46:08Araqthat makes the mailing list the defacto winner
21:46:19def-Araq: because of the dns problems?
21:46:23Araqyes
21:46:36def-I don't know what causes them, i get them all the time as well
21:46:44*Matthias247 quit (Read error: Connection reset by peer)
21:46:57def-but only at home, on all my servers it works
21:47:15Araqwell my internet connection is really bad the last days
21:47:25flaviuHave you sent an angry email to namecheap?
21:47:42Araqno. should I?
21:47:42sdegutislol y u use namecheap
21:47:57Araqsdegutis: it's cheap :P
21:48:05sdegutisIn quality as well, apparently.
21:48:16flaviuProbably, you pay them to give you dns. If they don't give you a working domain, it's their fault.
21:48:24def-not sure if it's their fault, but maybe they know how to fix it
21:48:52flaviuHas anyone touched the DNS config on the vps?
21:50:33*st2p joined #nim
21:50:34AraqI doubt it
21:50:39Araqhi st2p welcome
21:50:50st2phowdy
21:54:18matkukiWhy is "for i in 0..3:; if someRefTuple[i] != nil: someSeq.add(someTuple[i]);" an error: "Error: cannot evaluate at compile time: i" ?
21:55:28*sdegutis left #nim ("Leaving...")
21:55:41Araqmatkuki: you can use the fields / fieldPairs iterator for this instead
21:56:00Araqbut in general for tup[i] to work 'i' needs to be a compile-time constant
21:56:24Araqif you think about Nim's static type system it's obvious why that is
21:56:57matkukiAraq: Got it. Can you give me an example of a fields iterator?
22:01:07Araqhttp://nim-lang.org/system.html#fields.i,S,T
22:01:33matkukiGreat, thanks!
22:01:37Araqhow did I find that?
22:02:05Araqthat's right, I used http://nim-lang.org/theindex.html. glad you asked.
22:02:34matkukiHa. Thanks, will keep that in mind.
22:06:29dom96Araq: Forum works fine for me.
22:06:33dom96What's the issue exactly?
22:06:48dom96And how come you're not telling me about it but relying on me reading the IRC logs.
22:08:00Araqdom96: I didn't know you are here
22:08:43dom96Araq: You can PM me any time as you know very well.
22:09:42flaviudom96: It doesn't look very good: http://i.imgur.com/hitcQC5.png
22:10:39dom96flaviu: what's that a screenshot of?
22:10:51flaviuGoogle analytics traffic.
22:11:09dom96of nim-lang.org
22:11:12dom96it's fine for the forum
22:11:28dom96I bet Araq removed the analytics code by accident...
22:11:39flaviudom96: There are still some hits
22:12:25dom96Do you see the analytics code in the source for nim-lang.org?
22:12:47AraqI didn't remove any code but I didn't pull that PR either
22:12:54BlaXpirit_no i,s,o,g,r,a,m detected :p
22:12:58flaviugood point, you're right.
22:13:22dom96Araq: Any chance you could describe what error you are experiencing with our website?
22:13:26BlaXpirit_on forum there is google analytics
22:13:33dom96And fix the analytics too
22:13:40flaviuAh, someone screwed up when building the site.
22:13:43Araqdom96: name resolution failures
22:13:54BlaXpirit_different people reported that
22:13:56flaviuThey should have used `./koch web --googleAnalytics:UA-48159761-1`, as I said in the PR.
22:14:10Araqlol?
22:14:10dom96Yeah...
22:14:24Araqyou should have patched koch instead
22:14:56Araqautomation is the key to victory ...
22:15:11flaviuAraq: The point is that other people might want to use different ga codes.
22:15:12BlaXpirit_i can't say anything bad about namecheap btw. no problems with them so far, but i haven't been doing much
22:16:24Araqflaviu: well 'koch' is primary a tool for us. that now everybody uses it was never planned
22:16:56dom96Araq: Switch to Google's DNS
22:17:21Araqhrm.
22:18:04BlaXpirit_or maybe something is misconfigured
22:22:52*gmpreussner|work quit (Read error: Connection reset by peer)
22:23:20flaviuWell, can someone rebuild the website with GA properly enabled?
22:24:32BlaXpirit_Araq, do you think mapIt and company should be deprecated?
22:24:33Araqflaviu: consider it done
22:24:54BlaXpirit_@["123", "abc"].map((a: string) => a.toUpper()) is ok
22:27:30BlaXpirit_uh in this case just toUpper by itself works, but as an example
22:30:44Varriount|LaptopHm...
22:31:37Varriount|LaptopShould 'var i: int64 = x * y' be able to overflow when `x` and `y` are 32 bit values?
22:31:44def-yes
22:31:54def-wait
22:32:01def-no
22:32:11def-int32, right?
22:32:25EXetoCbut it's a multiplication
22:32:45def-but at most you double the number of digits
22:33:09def-it's a way of preventing overflows, casting to twice as big integers
22:33:10EXetoCand I suck at math
22:33:41Varriount|Laptopvar i: int64 = high(int32)*high(int32) doesn't overflow on x64
22:34:06Varriount|LaptopSo it's the multiplication that's overflowing, not the destination variable.
22:34:29EXetoCuh yeah
22:34:58Varriount|LaptopI'm fixing an overflow bug in terminal.nim, and this popped up when I was applying a fix. It was somewhat unexpected.
22:37:04*alexruf quit (Quit: Textual IRC Client: www.textualapp.com)
22:40:10*jefus_ joined #nim
22:42:24*rpag joined #nim
22:44:27*jefus quit (Ping timeout: 272 seconds)
22:45:49Varriount|LaptopOk... this is just wierd
22:47:05wtwstill referring to the multiplication?
22:47:31Varriount|Laptopwtw: Yeah
22:47:54Varriount|Laptopwtw: Nim is raising an overflow error when multiplying numbers that come out to 75000
22:48:04wtw:o
22:48:20BlaXpirit_give code
22:48:44wtw"zomg gief code" ;)
22:48:53AraqVarriount|Laptop: when I looked at that, it was int16 multiplication
22:49:05Araqwhich surely overflows for 75000
22:49:25Varriount|LaptopBlaXpirit_: terminal.nim , line 190, column 45
22:49:39Varriount|LaptopAraq: But I thought dword was 32 bits?
22:50:24def-Varriount|Laptop: first convert them to int64, then multiply?
22:50:37def-or 32, no idea
22:51:28AraqVarriount|Laptop: dwSize*: COORD
22:51:37AraqCOORD being 2 int16s
22:52:01Araqwindows.nim:7620
22:52:40Varriount|LaptopAh, I see what's going on now.
22:53:20*matkuki left #nim (#nim)
22:59:07def-How can I build c2nim's manual from doc/c2nim.txt into html?
22:59:24Varriount|LaptopWhat should I do, apply a complicated but foolproof fix, or a simpler but possible-to-break fix?
23:00:36AraqVarriount|Laptop: simpler fix. there is no such thing as a " foolproof fix".
23:02:04Varriount|LaptopWait.. nevermind. The complicated fix isn't needed (I think...)
23:03:08Varriount|LaptopI was thinking of a fix that would work if the product of the console dimensions exceeds high(int32), but just realized that can never happen, as the COORD structure only uses int16's
23:03:55Varriount|LaptopIt's vaguely possible microsoft might allow console sizes that bug, but not very likely.
23:04:05Varriount|Laptop*that big in the future
23:04:43flaviunope, microsoft is obsessed with backwards compatibility.
23:10:10AraqVarriount|Laptop: ms won't change that interface. but it might come up with a new one ;-)
23:10:45flaviuExactly what I was thinking
23:28:03*sampwing joined #nim
23:34:29EXetoCgotta stay future-proof :p
23:34:55Araqflaviu: I updated the website
23:35:28*rpag quit (Quit: Leaving)
23:38:39Varriount|LaptopAraq: Any idea what happens when setControlCHook is called from different threads?
23:39:20Araqit works but the callback should really be .gcsafe
23:39:34Araqwell that's my educated guess
23:43:03*keyle joined #nim
23:43:12flaviuAraq: Thanks!
23:43:35keyleVarriount|Laptop: thanks for looking at that terminal issue
23:43:49keylemorning all.
23:44:19Varriount|Laptopkeyle: I have it fixed in a local branch. I'll push it (and some other fixes) pretty soon.
23:44:37keylefix for large buffers?
23:45:46keyleI got a weird one last night
23:46:16Varriount|Laptopkeyle: Is it another terminal issue?
23:46:31keyledoubt it
23:46:42keyleregression bug in devel is my gut feel
23:46:44keyle\nim\lib\pure\net.nim(1039, 66) Error: type mismatch: got (int) but expected 'uint16'
23:47:16keylewhat's the full debug stack flag for nim c ?
23:47:53dom96keyle: Are you sure you're on HEAD?
23:49:33keyleI'm more used to svn than git but I think I am
23:49:38keyleI got the -devel branch
23:50:03keyle13/1/2015 5:13:34
23:50:06dom96That is an old issue I think
23:50:12dom96So you must be using an old stdlib
23:50:19keyleok
23:52:02Varriount|LaptopOk, 3 new pull requests fixing minor stdlib bugs
23:52:46*JinShil joined #nim
23:53:45keylewow that was an easy fix
23:54:14keyleyour pr for 1906
23:54:32flaviudoes not nil work?
23:54:32Varriount|Laptopkeyle: Yep.
23:54:52Varriount|Laptopflaviu: I have no idea. I just implemented the fix araq wanted.
23:55:07keyleI had spent some time trying myself but I'm clearly not there yet.
23:56:15JinShilHello! I see Nim has the volatile pragma, but it says in the user's manual that this pragma will not exist in the LLVM backend. I need to do memory-mapped I/O, so what's the recommended method to ensure existence and order of instructions?
23:56:44EXetoCflaviu: it might be broken in certain ways still
23:57:08flaviuEXetoC: I'd personally go with an assert(... != nil)
23:57:32flaviuJinShil: At this point, an LLVM backend is unlikely to happen.
23:57:54JinShilSo volatile pragma it is?
23:59:18flaviuJinShil: Sure. It also looks like that comment is old; recent LLVM seems to support volatile.