00:03:37 | * | BitPuffin quit (Ping timeout: 245 seconds) |
00:04:00 | dom96 | flaviu: source code filters are good enough |
00:04:17 | flaviu | sorry, no. |
00:04:28 | dom96 | There is of course nothing stopping you from writing something better. |
00:04:48 | flaviu | Except my free time :P |
00:05:18 | dom96 | What do you have to do that is more important? |
00:05:33 | profan | flaviu: you can always make some bindings to an existing c library, shouldn't be too much work |
00:06:09 | BlaXpirit | no no, that's not gonna work |
00:07:03 | BlaXpirit | there is no way for a c library to beat even source code filters |
00:07:10 | BlaXpirit | you need the integration with the language |
00:07:47 | * | ehaliewicz joined #nim |
00:10:51 | Araq | test |
00:11:26 | flaviu | profan: 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:10 | profan | ah, that's harder then :P |
00:12:47 | Araq | flaviu: so what's wrong with source code filters? |
00:14:16 | flaviu | They don't look very good, cannot be made at runtime, and cannot be embedded inside other code. |
00:14:50 | EXetoC | composability with strings is that bad? |
00:15:37 | Araq | 1. only the first 2 lines or so are ugly |
00:15:53 | Araq | 2. you can inject as many runtime values as you want via e.g. % |
00:17:20 | Araq | 3. that's just a non-issue when the template is long enough and in general it is. |
00:18:13 | Araq | EXetoC: you can use them to directly write to some stream, you don't have to build intermediate strings. |
00:19:35 | Araq | and if you don't like them, you can onionhammer's stuff, it's very nice too. |
00:20:54 | EXetoC | well, composing with strings too it not that good I agree. it's like not using a templating engine in the first place |
00:26:51 | flaviu | I 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:39 | Araq | why 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:57 | BlaXpirit | i don't see a reason to make forum software that isn't better in any way than existing forum software |
00:41:24 | Varriount|Laptop | Araq: One might argue that being able to edit the filters without having to recompile the forum executable is a good thing. |
00:41:39 | Varriount|Laptop | *filters/templates |
00:42:02 | profan | the 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:34 | profan | even if that's a good goal |
00:43:42 | profan | or did i actually miss some part of the conversation and is now addressing the wrong thing? :V |
00:43:58 | BlaXpirit | that is true |
00:45:48 | profan | it's sort of anticlimactic |
00:46:06 | * | Demon_Fox quit (Ping timeout: 246 seconds) |
00:46:30 | profan | people 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:17 | profan | i'm probably preaching to the choir though |
00:47:19 | BlaXpirit | but until it gets there, may as well use existing forum software to not harm the language by alienating users |
00:47:56 | EXetoC | they are eating their own dog food now though. that's something |
00:47:56 | Araq | Varriount|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:16 | Varriount|Laptop | Wait, are we discussing whether to use the Nim forum software vs some other forum software *again*? |
00:48:59 | BlaXpirit | are you surprised to see it come up so often? |
00:49:12 | Araq | I 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:56 | Araq | but no big deal, we can create a task force to evaluate the issue |
00:50:37 | BlaXpirit | nah let's just make a mailing list, that'll solve everything |
00:51:12 | Varriount|Laptop | BlaXpirit: Don't forget the Skype group and a monthly newsletter |
00:51:31 | BlaXpirit | good idea! |
00:51:48 | flaviu | I'm not talking about the forum right now, I'm speaking more in abstract terms. |
00:52:11 | flaviu | I don't want to start a flame war |
00:52:22 | BlaXpirit | well, a monthly newsletter may actually be needed |
00:52:48 | BlaXpirit | to digest the important news from the 5+ different places for discussion |
00:53:49 | dom96 | profan is completely right. |
00:54:21 | dom96 | We used existing forum software before NimForum. |
00:54:44 | BlaXpirit | so then what happened? |
00:55:24 | EXetoC | right, libs being developed because of need |
00:55:52 | EXetoC | what are those libs btw? does it use async yet? |
00:55:53 | Araq | BlaXpirit: it was a piece of junk and overrun by spammers |
00:56:06 | BlaXpirit | umm |
00:56:20 | Araq | it also had no syntax highlighting for Nim but instead could show you your birthday |
00:56:42 | dom96 | EXetoC: cairo, jester, asyncdispatch |
00:56:56 | reactormonk | Araq, cleary I need a notification when it's my birthday more, I always forget |
00:57:17 | BlaXpirit | Araq, do you realize the only reason that this one is not overrun by spammers is nobody wants to waste time on it? |
00:57:28 | Araq | reactormonk: I stopped aging instead :P |
00:57:30 | dom96 | EXetoC: as well as lots of testing for the compiler |
00:57:39 | flaviu | The state of forum software is pretty unfortunate. Much forum software has feature creep on the feature creep. |
00:58:17 | EXetoC | dom96: several bugs found? great |
00:58:28 | Araq | BlaXpirit: no it's because it uses non-standard software as well as a non-standard capture mechanism |
00:58:28 | Varriount|Laptop | BlaXpirit: 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:53 | BlaXpirit | this is basically like security through obscurity |
00:59:04 | Araq | BlaXpirit: the old forum was not more active if that's what you're after |
00:59:35 | flaviu | BlaXpirit: Yep, that's how spam-bot defense works. |
00:59:36 | Varriount|Laptop | Araq: 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:01 | Araq | Varriount|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:50 | profan | you 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:38 | Araq | profan: 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:44 | Varriount|Laptop | Also, something I found out today - you can convert a ref type back to a value type through inheritance. |
01:18:07 | Araq | that's a bug |
01:18:31 | Araq | there are all sorts of bugs wrt the subtyping relation as implemented in the compiler |
01:19:55 | Varriount|Laptop | Araq: Oh? I thought it was a feature. |
01:20:25 | Araq | well if you mean: |
01:20:50 | Araq | type Foo = object of R where R is a 'ref object' then yes, that's a feature |
01:21:12 | Varriount|Laptop | Yeah, that's what I mean. |
01:21:32 | Araq | oh ok, I thought you meant you can deref via a type conversion |
01:22:09 | * | sampwing joined #nim |
01:22:30 | Varriount|Laptop | I 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:53 | Varriount|Laptop | And 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:57 | gmoore | i 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:24 | gmoore | does atEnd not work properly or was my problem due to my creative usage? |
01:38:00 | gmoore | i 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:52 | rkj-b | So, 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:52 | flaviu | rkj-b: I don't understand your question, but Nim uses C as its backend. |
02:30:45 | rkj-b | My 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:10 | EXetoC | what do you mean? |
02:33:29 | * | gunn quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:34:08 | rkj-b | The rumors are that when you compile a functional program to C, it gets slow. |
02:37:04 | EXetoC | I can't imagine there being any truth to that |
02:37:36 | Triplefox | it's a very general statement |
02:37:51 | flaviu | Neither Nim's compiler nor GCC/Clang support deforestation or other advanced optimizations, if that's what you're referring to. |
02:40:10 | EXetoC | and that's just one aspect, so very general indeed |
02:41:14 | Triplefox | if 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:18 | EXetoC | rkj-b: is that relevant to a supposed destruction of computers? :p |
02:44:37 | Demos | you 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:19 | rkj-b | My 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:16 | Demos | we have the asm keyword. |
02:55:45 | * | sampwing quit (Ping timeout: 252 seconds) |
02:56:07 | rkj-b | I'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:37 | dtscode | hey 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:20 | keyle | dtscode: worst case you can make a redirect? |
03:16:33 | dtscode | oh so on apache? |
03:18:19 | keyle | ehm I mean't redirect to localhost:9090 running racket |
03:18:26 | keyle | but yes |
03:18:51 | dtscode | wait hold |
03:19:11 | dtscode | ive already got jester running on localhost:5000 and being redirected to 80 |
03:19:19 | dtscode | does that matter? |
03:21:14 | * | Polytonic joined #nim |
03:21:25 | * | Polytonic left #nim ("Goodbye ...") |
03:21:48 | keyle | hm |
03:22:11 | keyle | unsure what you're trying to do |
03:22:19 | keyle | you want to run racket code? |
03:22:42 | dtscode | ill rephrase |
03:23:04 | dtscode | so i have jester running on port 80 via proxy |
03:23:45 | dtscode | i 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:07 | dtscode | and i would want them to be displayed on dtscode.io/racket |
03:24:52 | keyle | hm don't know enough about jester |
03:25:01 | keyle | but you could run racket on port 9000 for example |
03:25:21 | keyle | and in jester for route /racket you have an html file redirecting to port 9000 |
03:25:27 | keyle | where the racket is served |
03:25:51 | dtscode | hmmm... ill see if i can do that. thanks |
03:25:51 | keyle | or even better, the jester handles the redirect, potentially without revealing the port 90000 |
03:26:04 | dtscode | does jester handle redirects? |
03:26:30 | keyle | I've never used jester but I think it's beyond its scope |
03:27:40 | dtscode | hrrmmmm |
03:28:28 | keyle | apache has rewrite rules which is what you want it sounds like |
03:28:35 | keyle | maybe nginx does it too |
03:28:37 | titaniumone^ | dtscode apache vhosts |
03:28:44 | keyle | yep vhosts |
03:28:55 | dtscode | ah ok. thanks. |
03:29:12 | keyle | so you'd run nginx on port 80, rewrite rules for most url to jester:5000 and /racket to racket:9000 |
03:29:18 | keyle | (for example) |
03:29:36 | * | Trixar_za quit (Quit: ZNC - http://znc.in) |
03:31:07 | keyle | this may help http://nginx.org/en/docs/http/converting_rewrite_rules.html |
03:31:23 | keyle | but I'd imagine you could hack jester to do just that |
03:35:23 | dtscode | oh im using apache, but thanks. i think i remember how to do rewrite rules |
03:36:26 | keyle | you will need mod_proxy and mod_rewrite I think |
03:36:39 | dtscode | yeah, 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:04 | adam12 | Error: undeclared identifier: 'await' -- seems odd that I would get this copy/pasting the example from asyncnet.nim verbatim. Any thoughts? |
03:50:30 | dtscode | code plz |
03:50:57 | adam12 | https://gist.github.com/adam12/83720a8845530f616c29 |
03:51:15 | dtscode | also, what compiler version |
03:51:27 | adam12 | Nim Compiler Version 0.10.2 (2014-12-29) [MacOSX: amd64] |
03:51:36 | dtscode | hrmmm |
03:51:50 | adam12 | Same error on latest master, just built a few minutes ago. |
03:52:03 | dtscode | it could be a bug |
03:52:11 | dtscode | maybe open up an issue on github? |
03:52:11 | adam12 | I ran the asyncnet.nim module directly, and it ran the tests fine. |
03:52:19 | adam12 | so, I dunno? Seems super odd. |
03:52:40 | dtscode | thats the example copied verbatim right? |
03:52:48 | dtscode | it works fine for me on 10.3 |
03:52:49 | adam12 | Yep |
03:52:59 | adam12 | Is 10.3 devel branch |
03:52:59 | adam12 | ? |
03:53:17 | dtscode | yeah |
03:53:20 | dtscode | i always pull from devel |
03:53:25 | adam12 | Let me try devel. |
03:53:42 | * | ARCADIVS joined #nim |
03:54:50 | keyle | hm yeah devel is the way to go |
03:55:09 | * | VinceAddons quit (Read error: Connection reset by peer) |
03:55:18 | adam12 | Same problem. |
03:55:32 | adam12 | Could it be platform related? |
03:55:40 | dtscode | im assuming yhes |
03:56:19 | adam12 | I 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:54 | keyle | def-: 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:25 | gokr | Just registered the mailing list at gmane |
09:20:11 | gokr | So 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:54 | ekarlso | dom96: 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:26 | Araq | adam12: 'await' only works in an .async proc |
10:28:40 | Araq | you 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:24 | ekarlso | how can I exec a shell cmd from nim ? |
11:30:41 | keyle | look in os |
11:31:29 | keyle | os.execShellCmd |
11:33:36 | BlaXpirit | please use this if possible http://nim-lang.org/osproc.html#execProcess,string,openArray%5Bstring%5D,StringTableRef,set%5BProcessOption%5D |
11:42:24 | ekarlso | keyle: could you wanna throw up a easy html + js for a "play.nim.x" thing ? |
11:43:09 | ekarlso | either that or I turn to angular once again :P |
11:45:32 | keyle | I thought we agreed this is a terrible idea :) |
11:45:45 | keyle | security wise |
11:46:13 | ekarlso | other language has it but ok :P |
11:46:36 | ekarlso | i'll spare the effort and continue on with pacakges stuffs intsead |
11:47:38 | keyle | yeah you need someone to really know their security and process isolation stuff |
12:03:23 | keyle | anyone working on interesting stuff? |
12:04:30 | Triplefox | http://t.co/4RqHLVhCzS |
12:04:48 | keyle | neat :D |
12:05:10 | dom96 | ekarlso: What is so attractive about angular? |
12:05:40 | dom96 | ekarlso: Also I'm not sure what you asked me 2 hours ago. |
12:05:49 | keyle | it's the natural evolution after coffeescript |
12:05:54 | keyle | ;> |
12:08:45 | * | kapil__ joined #nim |
12:08:46 | ekarlso | dom96: .. i've just gotten used to it :) |
12:09:26 | dom96 | ekarlso: You should try other ways of doing things. |
12:09:33 | ekarlso | dom96: really why ? |
12:09:41 | dom96 | It's good experience. |
12:09:52 | ekarlso | dom96: i've used jq before.. |
12:10:18 | dom96 | There is really no need for JS at all for some websites. |
12:10:35 | dom96 | I can't think why a play.nim-lang.org website would need it |
12:15:10 | ekarlso | dom96: i like interactive websites ish vs static.. |
12:15:17 | * | JinShil quit (Quit: Konversation terminated!) |
12:15:59 | keyle | Should look at using flash then |
12:16:36 | keyle | sorry I'm being harsh. |
12:17:06 | ekarlso | god what is it with you guys and being motivating.. |
12:18:58 | dom96 | keyle: hey now. Please don't be so harsh. |
12:19:24 | keyle | yep my bad, sorry. |
12:20:16 | * | EXetoC joined #nim |
12:22:22 | * | keyle quit (Quit: lack of sleep makes me cranky!) |
12:25:21 | ekarlso | dom96: I just modeled it after what the rust guys have, they use js on their frontend page.. |
12:26:13 | dom96 | ekarlso: That's fine :) |
12:26:41 | dom96 | Just please remember that not everything has to be done exactly the same way as their website. |
12:26:51 | dom96 | It's good to look at alternatives because they may be superior. |
12:26:56 | ekarlso | dom96: no, but I've been looking at go as well and they have the same thing |
12:27:09 | ekarlso | basically let's you spin up a "playpen" locally |
12:27:22 | dom96 | they use angular too? |
12:27:23 | ekarlso | just by having the "nim_playpen" locally |
12:27:28 | ekarlso | dunno what they use :) |
12:27:44 | dom96 | is your package site finished yet? |
12:27:44 | ekarlso | i'm just used to angular and can make things *fairly* quickly vs going to use something else |
12:27:58 | ekarlso | dom96: been busy the last few days with lots of hp stuff.. |
12:28:20 | dom96 | There must be a reason you're trying out Nim though. |
12:28:24 | ekarlso | but added auth stuff to it, adding releases now then gonna do nimble |
12:28:31 | ekarlso | dom96: well I tried rust before then nim |
12:28:39 | ekarlso | I'm used to python so nim is more fun |
12:28:40 | dom96 | I'm sure there are programming languages in which you can create things quickly too. |
12:28:44 | ekarlso | and nah, just to play with stuff |
12:28:52 | dom96 | My point is that it's good to try things. |
12:28:57 | dom96 | Not just stick with angular forever. |
12:29:13 | dom96 | Take a look at how the forum works for example. |
12:29:20 | ekarlso | that's a static site ;) |
12:29:32 | dom96 | No it's not. |
12:29:38 | dom96 | I can create threads |
12:29:39 | dom96 | I can reply |
12:29:42 | dom96 | That makes it non-static. |
12:29:50 | ekarlso | I mean, sorry server served contet rather |
12:34:04 | ekarlso | dom96: should it support package tarball uploads ? |
12:34:11 | dom96 | sure |
12:34:25 | ekarlso | I was talking to a friend at a cloud provider here in norway |
12:34:28 | dom96 | I think we need to come up with a list of things it should do for the first version |
12:34:38 | ekarlso | they may sponsor storage and a server for it |
12:34:40 | dom96 | There is no point in implementing everything |
12:34:45 | ekarlso | dom96: +1 to that .p |
12:34:50 | ekarlso | currently it's only a registry |
12:35:11 | dom96 | What I would like to see it do right now is download the packages.json file |
12:35:17 | dom96 | go through each package |
12:35:30 | dom96 | and check what versions are available |
12:36:00 | ekarlso | I changed version to be a /packages/foo/versions |
12:36:03 | ekarlso | or "releases" rather |
12:36:14 | ekarlso | because if not "packages.json" can be a huge file :/ |
12:36:24 | dom96 | yeah, good |
12:45:47 | Araq | so 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:36 | gokr | In fact, the only "issue" I know of .... is not a fault of the ml. Its gmail. |
13:24:04 | gokr | ekarlso: 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:21 | gokr | I also stored a checksum. |
13:56:46 | ekarlso | gokr: 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:17 | ekarlso | gokr: dom96 https://nim-pkg.svcs.io/api-docs |
15:30:43 | EXetoC | is there a purpose to having an untrusted certificate? testing maybe |
15:31:08 | ekarlso | EXetoC: it's only in testing phase atm :P |
15:31:17 | ekarlso | so behind a stunnel :/ |
15:31:59 | Araq | I think I came across more untrusted certificates than trusted ones by now |
15:32:28 | Araq | it's always like "yeah I know, I know, accept it please" |
15:35:52 | EXetoC | what about html though in the case of a forum/ml bridge? |
15:37:24 | EXetoC | I like syntax highlighting and such |
15:38:36 | ekarlso | EXetoC: 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:40 | EXetoC | ekarlso: because, "html in e-mail is bad" |
16:12:11 | EXetoC | "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:54 | Varriount|Laptop | Araq, dom96: We should probably look into putting the forum, and website under an https certificate. |
16:17:23 | Araq | Varriount|Laptop: first we need to figure out why these constant name lookup failures happen |
16:17:36 | Araq | it's really annoying |
16:17:58 | Varriount|Laptop | Is it something on our side? |
16:23:07 | Araq | dunno, I think so |
16:23:31 | Araq | we 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:41 | def- | 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:03 | drewsrem | Can 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:12 | EXetoC | you can cast to anything basically |
17:08:44 | EXetoC | why do you need to perform this conversion? |
17:09:47 | ekarlso | any of you good with select boxes or so ? |
17:09:59 | ekarlso | I am wondering about a solution for "tags" when creating a package |
17:10:24 | ekarlso | so we could say pre-populate a tags list and have tags show up when a user enters parts of a tag |
17:10:40 | ekarlso | but my webdesign knowledge is too limited :| |
17:14:17 | drewsrem | EXetoC, interfacing with a C-lib |
17:18:14 | EXetoC | it'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:55 | drewsrem | EXetoC, https://github.com/Araq/Nim/blob/master/lib/posix/posix.nim#L415 ? |
17:21:27 | * | sampwing quit (Ping timeout: 252 seconds) |
17:22:06 | drewsrem | So I guess: let cpath = cast[array[0..255, char]](cstring("/path/somepath")) ? |
17:22:17 | Araq | don't do that |
17:22:30 | Araq | var cpath: array[256, char] |
17:23:06 | Araq | var cpath: array[256, char] = "/path/foo" # perhaps this compiles, not sure |
17:23:38 | drewsrem | doesn't |
17:23:50 | * | Matthias247 joined #nim |
17:23:51 | Araq | but usually you can just pass the sting literal to a proc taking a cstring |
17:24:09 | drewsrem | got (string) but expected 'array[0.255, char]' |
17:24:13 | Araq | if you really need it in an array, use copyMem or wrap strcpy |
17:25:32 | drewsrem | I'll look into those, thanks |
17:26:26 | Araq | also check out how rawsockets does it |
17:27:08 | drewsrem | Is this dangerous tho?: let cpath = cast[array[256, char]](cstring("/path/somepath")) |
17:27:18 | drewsrem | Good point, I will |
17:27:26 | drewsrem | Or just ugly? |
17:28:26 | * | Sphax quit (Quit: CYA!!) |
17:31:38 | Araq | it shouldn't even be allowed, you need to use 'ptr array' |
17:33:12 | drewsrem | It compiles, my SockAddr call is a "constructor" for an object that imports a struct tho |
17:34:03 | drewsrem | Ah right its a pointer |
17:35:42 | * | johnsoft quit (Ping timeout: 245 seconds) |
17:36:32 | * | johnsoft joined #nim |
17:44:15 | drewsrem | Actually not, apparently, the members of the sockaddr struct aren't pointer |
18:15:51 | BlaXpirit_ | 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:18 | Varriount|Laptop | dom96: The http module, when run, is choking on the sites given to it. However other sites, like 'google.com' work. |
19:10:04 | Varriount|Laptop | Error: unhandled exception: invalid http version, 000000000032E6E0"<html>" [Exception] |
19:22:32 | matkuki | How do I convert a tuple "Position = tuple[top, left :int]" to a "ref Position"? |
19:23:54 | matkuki | Example: var pos :Position = (10, 20); var rpos :ref Position = ? |
19:28:54 | EXetoC | matkuki: var x = new(tuple[x, y: int]); x[] = (1, 2) |
19:29:04 | Varriount|Laptop | matkuki: Well, you could do it manually. Why are you using a tuple when you want a ref object? |
19:29:05 | EXetoC | I don't know if it can be reduced to one statement |
19:29:51 | matkuki | EXetoC: Thanks, it doesn't need to be a one liner. |
19:30:44 | matkuki | Varriount: A tuple is enough for what I need. |
19:30:47 | EXetoC | only with objects I think: (ref T)(x: x, ...) |
19:32:35 | * | sdegutis joined #nim |
19:33:02 | sdegutis | Has 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:23 | def- | sdegutis: I guess you've seen this: https://arthurtw.github.io/2015/01/12/quick-comparison-nim-vs-rust.html |
19:37:30 | sdegutis | I haven't. |
19:37:35 | sdegutis | Thanks def- :) |
19:37:42 | sdegutis | def-: is Nim currently your language of choice? |
19:37:55 | def- | Yes, when I get to choose |
19:38:04 | rpag | when you dont? |
19:38:05 | def- | Before that I considered Rust |
19:38:11 | sdegutis | def-: Is Nim just as unstable as Rust? |
19:38:50 | def- | I think Nim has fewer changes, but there are still quite some bugs |
19:39:13 | sdegutis | Is Nim ready for production use yet? |
19:39:30 | def- | rpag: when i don't get to choose I write Python, C++, Haskell, C mainly |
19:41:09 | def- | sdegutis: I'd say it is. Most of the bugs are in experimental features |
19:41:26 | def- | sdegutis: I'm curious, why are you asking? |
19:41:35 | sdegutis | def-: Do you consider Nim to be much less enjoyable when not using the experimental or upcoming features? |
19:41:43 | EXetoC | sdegutis: because of better metaprogramming, more concise syntax, type introspection and various other things |
19:42:39 | sdegutis | EXetoC: you may have misread my question to def- |
19:43:07 | sdegutis | def-: 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:08 | EXetoC | that was about your first question |
19:43:16 | sdegutis | EXetoC: I see, thanks. |
19:43:23 | def- | 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:49 | def- | sdegutis: best to try out Nim then, you will see if you like it |
19:44:06 | def- | before using it in production, write some fun projects |
19:44:20 | def- | sdegutis: nope, still pretty enjoyable |
19:44:26 | sdegutis | def-: 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:33 | EXetoC | can arbitrary objects be stringified in rust? |
19:45:10 | sdegutis | I 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:41 | EXetoC | no. nim has type inferrence |
19:45:48 | bjz | EXetoC: you used to be able to, but reflection was removed |
19:45:49 | sdegutis | Excellent. |
19:45:52 | reactormonk | sdegutis, too much java? :-) |
19:46:18 | bjz | sdegutis: not seeing types does not mean a language is not statically typed |
19:46:19 | sdegutis | I learned Swift over the holydays, and it was quite enjoyable. Has anyone else here used Swift? |
19:46:36 | sdegutis | bjz: right, I am aware of type inference; but sometimes the line can be a bit blurred between dynamic and static typing |
19:47:04 | bjz | sdegutis: 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:00 | sdegutis | bjz: I understand, thank you; on a slightly related note, the syntax of ML languages scare me :) |
19:48:39 | * | brson joined #nim |
19:48:43 | bjz | EXetoC: nim's inference is similar to Go/C++ right? ie. not a constraint system like Hindly Milner? |
19:49:01 | EXetoC | sdegutis: it only reduces verbosity. sometimes a little too much though, but it usually doesn't reduce the readability |
19:49:21 | EXetoC | "var x = 1" |
19:49:24 | bjz | sdegutis: you get over syntax pretty fast |
19:49:57 | sdegutis | Do any of you know Swift? |
19:50:04 | bjz | sdegutis: semantics is more important, although it is always nice to write in something that has nice syntax |
19:50:17 | bjz | sdegutis: I have looked into it a bit |
19:50:25 | EXetoC | yeah, it didn't catch my interest simply because of the vendor lock-in |
19:50:29 | bjz | sdegutis: not a ton though |
19:50:54 | sdegutis | Dang. I was hoping someone could relate Nim to me compared to Swift. |
19:51:07 | sdegutis | I know Swift pretty well now and wrote a really really powerful wrapper for Lua in it. |
19:51:21 | sdegutis | I know there's a Nim wrapper for Lua too, but if I learn Nim, I will surely write my own. |
19:51:32 | EXetoC | bjz: I can't say for sure, but the inference capabilities seem similar to that of C++11 |
19:52:34 | bjz | sdegutis: Well swift's type system seems more based on the ML lineage than Nim |
19:52:39 | EXetoC | sdegutis: people do say that Nim is more stable |
19:52:54 | EXetoC | than Rust that is |
19:52:56 | drewsrem | *rimshot*? |
19:53:09 | def- | bjz: It's definitely not full HM inference, but something more local |
19:53:13 | bjz | sdegutis: although with OO stuff added |
19:53:53 | bjz | sdegutis: Nim has much bettter, more expressive metaprogramming |
19:54:01 | sdegutis | Right now my day job is writing a web app in Clojure. |
19:54:20 | sdegutis | I'm considering whether it's feasible to write a web app in Nim with rapid development. |
19:54:47 | ldlework | sdegutis: Since there is no Nim web tooling, probably not |
19:55:02 | ldlework | sdegutis: maybe if all you need to write is some json api or something |
19:55:28 | sdegutis | Is there some basic HTTP lib for Nim? |
19:55:42 | EXetoC | there's that, and the jester web framework |
19:56:04 | def- | sdegutis: list of libs: http://nim-lang.org/lib.html |
19:56:25 | EXetoC | the website is powered by it, but it has some limitations atm |
19:58:31 | sdegutis | EXetoC: oh? |
19:59:28 | sdegutis | What's @? |
19:59:35 | sdegutis | Like @"name" |
20:00:38 | EXetoC | it refers to the string captured in the pattern |
20:00:47 | sdegutis | Yes but how does this syntax work? |
20:00:56 | sdegutis | What is @ and what does it do? |
20:02:41 | def- | sdegutis: where is the @? |
20:02:50 | EXetoC | sdegutis: this is a DSL specified by the 'routes' macro |
20:02:57 | sdegutis | https://github.com/dom96/jester |
20:02:59 | def- | ah, in jester |
20:03:04 | sdegutis | oh weird |
20:03:04 | EXetoC | https://github.com/dom96/jester/blob/master/jester.nim#L660 |
20:03:07 | sdegutis | i dont like dsls |
20:03:18 | def- | you can use jester without the DSL I think |
20:03:40 | sdegutis | but yeah its nice to have that power |
20:03:53 | sdegutis | why the name change to nim? |
20:03:56 | def- | https://github.com/dom96/jester/blob/master/tests/example2.nim |
20:04:11 | def- | sdegutis: Americans consider "nimrod" an insult |
20:04:16 | EXetoC | sdegutis: nimrod also means idiot, and people are easily offended |
20:04:46 | sdegutis | oh |
20:09:13 | sdegutis | How does Nim handle nil/null? |
20:10:03 | sdegutis | I 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:20 | sdegutis | Does Nim have something similar to make null pointer exceptions difficult/impossible? |
20:10:57 | Zuchto | the Maybe construct (as it's called in Haskell) is awesome :) Would love to see it in more langugase |
20:11:02 | Zuchto | *languages |
20:11:16 | sdegutis | Is it not in Nim? |
20:11:24 | EXetoC | implicit nil: "x: ref int". there's no indirection like in Rust. nim has 'not nil' annotations |
20:11:47 | sdegutis | I saw "not nil" but unless that's used everywhere in the stdlib, it seems dangerous. |
20:12:09 | EXetoC | it's new and relatively untested |
20:12:25 | sdegutis | I may have fallen out of love with Nim just now. |
20:12:31 | EXetoC | sdegutis: helpful errors are shown along with a stacktrace in case of a nil dereference |
20:12:40 | sdegutis | ... at runtime |
20:12:54 | sdegutis | I'd prefer that to happen at compile time. |
20:13:05 | sdegutis | Even Java already does that ;) |
20:13:48 | bjz | EXetoC: "no indirection like in Rust" what do you mean? |
20:13:51 | def- | with "not nil" you should get a warning at compile if you forgot to initialize |
20:14:17 | EXetoC | sdegutis: where does it say "at runtime"? |
20:14:32 | EXetoC | that examples fails at compile time |
20:14:52 | sdegutis | All I mean is that by default you can pass nil to reference types in Nim and have runtime null pointer exceptions. |
20:14:59 | sdegutis | This turns me off to it. |
20:16:33 | EXetoC | oh well |
20:16:38 | EXetoC | bjz: nevermind that |
20:17:46 | bjz | EXetoC: heh, sorry |
20:18:06 | bjz | EXetoC: keeping you honest ;) |
20:19:55 | EXetoC | that 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:52 | drewsrem | maybe 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:02 | drewsrem | Have to page-up until I find the "when defined" to check what platform I'm looking at / find the correctly indented else |
20:48:28 | drewsrem | Maybe it's not really a problem after you get used to or I'm doing something wrong, just occurred to me |
20:52:13 | flaviu | drewsrem: I don't like it much either. |
20:52:47 | flaviu | Maybe a convention like C ifdefs that add the condition as a comment to the end? |
20:53:17 | flaviu | ekarlso: re. tag search, I've used https://twitter.github.io/typeahead.js/ once, I found it pretty easy to handle. |
20:53:26 | sdegutis | Can Nim be compared to Go? |
20:54:08 | flaviu | Anything can be compared to anything :P |
20:54:12 | drewsrem | sdegutis, just get your hands dirty, it's so easy to jump into |
20:54:39 | sdegutis | drewsrem: 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:49 | sdegutis | It saves me many hours which I no longer have to spare. |
20:55:49 | flaviu | sdegutis: My remark was a bit obtuse, but I really don't understand your question. |
20:56:45 | sdegutis | I know Go pretty well and I'm wondering if Nim is very similar, semantically (syntax matters little). |
20:57:02 | drewsrem | sdegutis, I didn't say it's shameful; but hours of peoples explanations can't replace a first-hand experience, imho |
20:58:08 | sdegutis | drewsrem: 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:17 | EXetoC | sdegutis: do you use any statically typed languages with not-null by default? |
20:58:22 | drewsrem | I don't think it is anything like Go |
20:58:28 | sdegutis | EXetoC: yes, Swift |
20:58:34 | EXetoC | 'not nil' by default might be nice. there are many things that make up a language though |
20:58:35 | flaviu | sdegutis: Go tries to be very simple (sometimes to extremes IMO), but nim isn't simple. |
20:58:38 | EXetoC | ok |
20:59:29 | sdegutis | I'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:27 | drewsrem | sdegutis, 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:20 | sdegutis | drewsrem: how do you recommend I can learn what code is valid, and which features it offers? |
21:03:25 | * | bjz joined #nim |
21:03:36 | sdegutis | Does 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:54 | def- | no |
21:03:55 | drewsrem | sdegutis, 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:06 | def- | Learning Nim: http://nim-lang.org/learn.html |
21:04:30 | sdegutis | def-: so all methods are also always global (at least within the module) functions? |
21:04:32 | drewsrem | Aren't the tutorials obsolete? |
21:04:51 | EXetoC | sdegutis: yes |
21:04:56 | sdegutis | That sounds awful. |
21:04:58 | EXetoC | unless a block is introduced |
21:04:58 | def- | drewsrem: i don't know, i learned from them |
21:05:00 | EXetoC | why? |
21:05:11 | sdegutis | What if there are name collisions between two types within one module? |
21:05:32 | sdegutis | Say two types have a method each named "greet" taking only that object. |
21:05:36 | EXetoC | there's overloading, if that's what you are referring to |
21:05:37 | sdegutis | How is this handled in Nim? |
21:05:39 | sdegutis | Ah. |
21:05:55 | sdegutis | Does this do dynamic dispatching or is it purely looked up at compile-time? |
21:06:08 | def- | you can enable dynamic dispatch with the "method" keyword |
21:06:09 | flaviu | "method"s are dynamic dispatch |
21:06:10 | def- | instead of proc |
21:06:17 | EXetoC | and 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:23 | sdegutis | What's the current Nim version? |
21:06:40 | drewsrem | sdegutis, look it up on the nim website |
21:06:42 | sdegutis | This seems up to date http://nim-lang.org/tut1.html |
21:06:46 | sdegutis | drewsrem: I did and could not find it. |
21:06:51 | EXetoC | module.foo(), if foo() happens to cause a collision |
21:06:54 | sdegutis | Oh, 0.10.2 |
21:08:06 | EXetoC | http://nim-by-example.github.io |
21:08:07 | sdegutis | What are your two favorite features of Nim? |
21:08:18 | sdegutis | EXetoC: how do I know that's not outdated? |
21:09:05 | drewsrem | It's github pages, you should be able to look up the github repo |
21:09:14 | drewsrem | https://github.com/flaviut/nim-by-example/ |
21:09:23 | flaviu | o/ |
21:09:25 | drewsrem | Looks recent |
21:12:08 | sdegutis | Do the Nim authors hang out in here ever? |
21:12:27 | * | Varriount|Mobile joined #nim |
21:12:38 | sdegutis | Araq, dom96: hi |
21:13:54 | flaviu | sdegutis: 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:02 | sdegutis | flaviu: awesome |
21:14:17 | Varriount|Mobile | sdegutis: It helps if you stop thinking about things as object oriented |
21:14:43 | Varriount|Mobile | Classes are just an abstraction. |
21:14:54 | sdegutis | Varriount|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:59 | sdegutis | *idiomatic Clojure |
21:16:06 | sdegutis | Wait a minute.. |
21:16:31 | Varriount|Mobile | sdegutis: Ambiguities related to unified procedure calling syntax don't happen very often. |
21:16:35 | sdegutis | procedures 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:09 | Varriount|Mobile | sdegutis: Huh? |
21:17:26 | sdegutis | http://nim-by-example.github.io/procvars/ |
21:17:42 | sdegutis | "Existing procedures can also be passed as functions, but only if they are annotated with the {.procvar.} pragma." |
21:18:12 | sdegutis | That 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:17 | sdegutis | Why is this! |
21:18:24 | Varriount|Mobile | That should really be worded differently. Also, it's incorrect |
21:18:25 | drewsrem | ... |
21:18:43 | Varriount|Mobile | Brb, getting on desktop |
21:18:46 | sdegutis | ok |
21:19:35 | sdegutis | Varriount: how would you word it? |
21:19:58 | Araq | sdegutis: 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:37 | Araq | thanks 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:22 | Varriount|Laptop | Did I say desktop? I meant laptop. :3 |
21:21:38 | Araq | without procvar somebody might have used it as a first class citizen and I would break his code |
21:22:57 | Araq | and besides, x => x.toUpper vs toUpper is not something to lose sleep over |
21:23:42 | sdegutis | Araq: 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:14 | sdegutis | I'm just used to other languages that treat functions as first-class citizens and let you use functions and lambdas interchangeably. |
21:24:26 | sdegutis | It seems this isn't the case in Nimrod, but that there's a trivial workaround for it? |
21:24:35 | Araq | well apart from procvar, Nim lets you do just that |
21:24:49 | Araq | functions are first class |
21:25:18 | sdegutis | Awesome. |
21:25:26 | Araq | and I already gave you the workaround for when it's not procvar |
21:25:27 | sdegutis | Then perhaps I just stumbled onto the wrong page in that tutorial. |
21:25:29 | flaviu | Araq: I can't get that code to compile. |
21:25:46 | Araq | x => x.toUpper # via the future module |
21:25:47 | sdegutis | Araq: is Nimrod your brainchild? |
21:25:51 | Araq | yes |
21:26:23 | flaviu | .eval import future; @["123", "abc"].map(a => a.toUpper) |
21:26:24 | drewsrem | Is it a boy or a girl? |
21:26:26 | Mimbus | flaviu: eval.nim(4, 15) Error: type mismatch: got (seq[string], proc (GenericParam): auto) |
21:26:26 | sdegutis | Araq: have you gotten burnt out on it yet or foresee it soon? |
21:27:17 | BlaXpirit_ | flaviu, these things rarely work as you expect... |
21:28:04 | sdegutis | BlaXpirit_: what? how so? |
21:28:50 | BlaXpirit_ | flaviu, and with map it's even worse, because it somehow expects a void proc |
21:29:33 | BlaXpirit_ | if map actually worked with these short functions, LC wouldn't be needed >_> |
21:30:42 | sdegutis | LC? |
21:30:44 | sdegutis | What's that? |
21:30:58 | BlaXpirit_ | list comprehension in future module |
21:31:41 | flaviu | http://nim-lang.org/future.html |
21:32:03 | Araq | flaviu: ah yeah I need to fix that |
21:33:10 | Araq | sdegutis: excellent question. :-) I am not burning out but babysitting a growing community is getting tiresome |
21:33:48 | sdegutis | Araq: I've noticed that a few years ago rich hickey stopped responding in #clojure altogether |
21:33:57 | sdegutis | Araq: so maybe just stop babysitting it and let it grow on its own now |
21:34:27 | sdegutis | Well, the fact that list comprehensions are needed because map is broken scares me away from Nim. |
21:35:02 | Araq | you're just looking for excuses to not use it. that's fine. ;-) |
21:35:22 | sdegutis | You could think of it that way. |
21:36:08 | flaviu | sdegutis: If it makes you feel better, it's not map that's broken. It's type inference. |
21:36:14 | sdegutis | From 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:20 | sdegutis | /cc Araq |
21:36:22 | Araq | there is also proc (x: string): string = x.toUpper |
21:36:34 | Araq | which works right now, but is longer |
21:36:52 | sdegutis | Araq: ah, right, because that bypasses type inference |
21:37:19 | sdegutis | Araq: but don't count my opinion as worth anything; I'm just one user whose opinions on programming change by the day |
21:37:38 | sdegutis | That said, this is a deal breaker for me for Nim right now. |
21:37:44 | sdegutis | Best of luck. If you want, you can even have my prayers. |
21:37:52 | drewsrem | Yes please |
21:39:24 | Araq | sdegutis: no worries. |
21:45:15 | matkuki | Tuples can be accessed by field name or by array accessor? That's really great! |
21:45:29 | Araq | the forum is more offline for me than it's online ... |
21:45:38 | * | Araq sighs |
21:46:08 | Araq | that makes the mailing list the defacto winner |
21:46:19 | def- | Araq: because of the dns problems? |
21:46:23 | Araq | yes |
21:46:36 | def- | 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:57 | def- | but only at home, on all my servers it works |
21:47:15 | Araq | well my internet connection is really bad the last days |
21:47:25 | flaviu | Have you sent an angry email to namecheap? |
21:47:42 | Araq | no. should I? |
21:47:42 | sdegutis | lol y u use namecheap |
21:47:57 | Araq | sdegutis: it's cheap :P |
21:48:05 | sdegutis | In quality as well, apparently. |
21:48:16 | flaviu | Probably, you pay them to give you dns. If they don't give you a working domain, it's their fault. |
21:48:24 | def- | not sure if it's their fault, but maybe they know how to fix it |
21:48:52 | flaviu | Has anyone touched the DNS config on the vps? |
21:50:33 | * | st2p joined #nim |
21:50:34 | Araq | I doubt it |
21:50:39 | Araq | hi st2p welcome |
21:50:50 | st2p | howdy |
21:54:18 | matkuki | Why 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:41 | Araq | matkuki: you can use the fields / fieldPairs iterator for this instead |
21:56:00 | Araq | but in general for tup[i] to work 'i' needs to be a compile-time constant |
21:56:24 | Araq | if you think about Nim's static type system it's obvious why that is |
21:56:57 | matkuki | Araq: Got it. Can you give me an example of a fields iterator? |
22:01:07 | Araq | http://nim-lang.org/system.html#fields.i,S,T |
22:01:33 | matkuki | Great, thanks! |
22:01:37 | Araq | how did I find that? |
22:02:05 | Araq | that's right, I used http://nim-lang.org/theindex.html. glad you asked. |
22:02:34 | matkuki | Ha. Thanks, will keep that in mind. |
22:06:29 | dom96 | Araq: Forum works fine for me. |
22:06:33 | dom96 | What's the issue exactly? |
22:06:48 | dom96 | And how come you're not telling me about it but relying on me reading the IRC logs. |
22:08:00 | Araq | dom96: I didn't know you are here |
22:08:43 | dom96 | Araq: You can PM me any time as you know very well. |
22:09:42 | flaviu | dom96: It doesn't look very good: http://i.imgur.com/hitcQC5.png |
22:10:39 | dom96 | flaviu: what's that a screenshot of? |
22:10:51 | flaviu | Google analytics traffic. |
22:11:09 | dom96 | of nim-lang.org |
22:11:12 | dom96 | it's fine for the forum |
22:11:28 | dom96 | I bet Araq removed the analytics code by accident... |
22:11:39 | flaviu | dom96: There are still some hits |
22:12:25 | dom96 | Do you see the analytics code in the source for nim-lang.org? |
22:12:47 | Araq | I didn't remove any code but I didn't pull that PR either |
22:12:54 | BlaXpirit_ | no i,s,o,g,r,a,m detected :p |
22:12:58 | flaviu | good point, you're right. |
22:13:22 | dom96 | Araq: Any chance you could describe what error you are experiencing with our website? |
22:13:26 | BlaXpirit_ | on forum there is google analytics |
22:13:33 | dom96 | And fix the analytics too |
22:13:40 | flaviu | Ah, someone screwed up when building the site. |
22:13:43 | Araq | dom96: name resolution failures |
22:13:54 | BlaXpirit_ | different people reported that |
22:13:56 | flaviu | They should have used `./koch web --googleAnalytics:UA-48159761-1`, as I said in the PR. |
22:14:10 | Araq | lol? |
22:14:10 | dom96 | Yeah... |
22:14:24 | Araq | you should have patched koch instead |
22:14:56 | Araq | automation is the key to victory ... |
22:15:11 | flaviu | Araq: The point is that other people might want to use different ga codes. |
22:15:12 | BlaXpirit_ | i can't say anything bad about namecheap btw. no problems with them so far, but i haven't been doing much |
22:16:24 | Araq | flaviu: well 'koch' is primary a tool for us. that now everybody uses it was never planned |
22:16:56 | dom96 | Araq: Switch to Google's DNS |
22:17:21 | Araq | hrm. |
22:18:04 | BlaXpirit_ | or maybe something is misconfigured |
22:22:52 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
22:23:20 | flaviu | Well, can someone rebuild the website with GA properly enabled? |
22:24:32 | BlaXpirit_ | Araq, do you think mapIt and company should be deprecated? |
22:24:33 | Araq | flaviu: consider it done |
22:24:54 | BlaXpirit_ | @["123", "abc"].map((a: string) => a.toUpper()) is ok |
22:27:30 | BlaXpirit_ | uh in this case just toUpper by itself works, but as an example |
22:30:44 | Varriount|Laptop | Hm... |
22:31:37 | Varriount|Laptop | Should 'var i: int64 = x * y' be able to overflow when `x` and `y` are 32 bit values? |
22:31:44 | def- | yes |
22:31:54 | def- | wait |
22:32:01 | def- | no |
22:32:11 | def- | int32, right? |
22:32:25 | EXetoC | but it's a multiplication |
22:32:45 | def- | but at most you double the number of digits |
22:33:09 | def- | it's a way of preventing overflows, casting to twice as big integers |
22:33:10 | EXetoC | and I suck at math |
22:33:41 | Varriount|Laptop | var i: int64 = high(int32)*high(int32) doesn't overflow on x64 |
22:34:06 | Varriount|Laptop | So it's the multiplication that's overflowing, not the destination variable. |
22:34:29 | EXetoC | uh yeah |
22:34:58 | Varriount|Laptop | I'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:49 | Varriount|Laptop | Ok... this is just wierd |
22:47:05 | wtw | still referring to the multiplication? |
22:47:31 | Varriount|Laptop | wtw: Yeah |
22:47:54 | Varriount|Laptop | wtw: Nim is raising an overflow error when multiplying numbers that come out to 75000 |
22:48:04 | wtw | :o |
22:48:20 | BlaXpirit_ | give code |
22:48:44 | wtw | "zomg gief code" ;) |
22:48:53 | Araq | Varriount|Laptop: when I looked at that, it was int16 multiplication |
22:49:05 | Araq | which surely overflows for 75000 |
22:49:25 | Varriount|Laptop | BlaXpirit_: terminal.nim , line 190, column 45 |
22:49:39 | Varriount|Laptop | Araq: But I thought dword was 32 bits? |
22:50:24 | def- | Varriount|Laptop: first convert them to int64, then multiply? |
22:50:37 | def- | or 32, no idea |
22:51:28 | Araq | Varriount|Laptop: dwSize*: COORD |
22:51:37 | Araq | COORD being 2 int16s |
22:52:01 | Araq | windows.nim:7620 |
22:52:40 | Varriount|Laptop | Ah, I see what's going on now. |
22:53:20 | * | matkuki left #nim (#nim) |
22:59:07 | def- | How can I build c2nim's manual from doc/c2nim.txt into html? |
22:59:24 | Varriount|Laptop | What should I do, apply a complicated but foolproof fix, or a simpler but possible-to-break fix? |
23:00:36 | Araq | Varriount|Laptop: simpler fix. there is no such thing as a " foolproof fix". |
23:02:04 | Varriount|Laptop | Wait.. nevermind. The complicated fix isn't needed (I think...) |
23:03:08 | Varriount|Laptop | I 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:55 | Varriount|Laptop | It's vaguely possible microsoft might allow console sizes that bug, but not very likely. |
23:04:05 | Varriount|Laptop | *that big in the future |
23:04:43 | flaviu | nope, microsoft is obsessed with backwards compatibility. |
23:10:10 | Araq | Varriount|Laptop: ms won't change that interface. but it might come up with a new one ;-) |
23:10:45 | flaviu | Exactly what I was thinking |
23:28:03 | * | sampwing joined #nim |
23:34:29 | EXetoC | gotta stay future-proof :p |
23:34:55 | Araq | flaviu: I updated the website |
23:35:28 | * | rpag quit (Quit: Leaving) |
23:38:39 | Varriount|Laptop | Araq: Any idea what happens when setControlCHook is called from different threads? |
23:39:20 | Araq | it works but the callback should really be .gcsafe |
23:39:34 | Araq | well that's my educated guess |
23:43:03 | * | keyle joined #nim |
23:43:12 | flaviu | Araq: Thanks! |
23:43:35 | keyle | Varriount|Laptop: thanks for looking at that terminal issue |
23:43:49 | keyle | morning all. |
23:44:19 | Varriount|Laptop | keyle: I have it fixed in a local branch. I'll push it (and some other fixes) pretty soon. |
23:44:37 | keyle | fix for large buffers? |
23:45:46 | keyle | I got a weird one last night |
23:46:16 | Varriount|Laptop | keyle: Is it another terminal issue? |
23:46:31 | keyle | doubt it |
23:46:42 | keyle | regression bug in devel is my gut feel |
23:46:44 | keyle | \nim\lib\pure\net.nim(1039, 66) Error: type mismatch: got (int) but expected 'uint16' |
23:47:16 | keyle | what's the full debug stack flag for nim c ? |
23:47:53 | dom96 | keyle: Are you sure you're on HEAD? |
23:49:33 | keyle | I'm more used to svn than git but I think I am |
23:49:38 | keyle | I got the -devel branch |
23:50:03 | keyle | 13/1/2015 5:13:34 |
23:50:06 | dom96 | That is an old issue I think |
23:50:12 | dom96 | So you must be using an old stdlib |
23:50:19 | keyle | ok |
23:52:02 | Varriount|Laptop | Ok, 3 new pull requests fixing minor stdlib bugs |
23:52:46 | * | JinShil joined #nim |
23:53:45 | keyle | wow that was an easy fix |
23:54:14 | keyle | your pr for 1906 |
23:54:32 | flaviu | does not nil work? |
23:54:32 | Varriount|Laptop | keyle: Yep. |
23:54:52 | Varriount|Laptop | flaviu: I have no idea. I just implemented the fix araq wanted. |
23:55:07 | keyle | I had spent some time trying myself but I'm clearly not there yet. |
23:56:15 | JinShil | Hello! 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:44 | EXetoC | flaviu: it might be broken in certain ways still |
23:57:08 | flaviu | EXetoC: I'd personally go with an assert(... != nil) |
23:57:32 | flaviu | JinShil: At this point, an LLVM backend is unlikely to happen. |
23:57:54 | JinShil | So volatile pragma it is? |
23:59:18 | flaviu | JinShil: Sure. It also looks like that comment is old; recent LLVM seems to support volatile. |