00:01:19 | * | cryzed quit (Ping timeout: 246 seconds) |
00:03:29 | * | cryzed joined #nim |
00:09:23 | * | shadwick joined #nim |
00:13:57 | ephja | ICBM? |
00:19:19 | * | shadwick quit (Quit: Page closed) |
00:22:30 | elrood | great way of getting secret services interested in nim, ephja ;) more likely an rfc792 echo, not sure what kind of nim-related example one'd be looking for on that though |
00:22:40 | * | cryzed quit (Ping timeout: 246 seconds) |
00:25:02 | * | cryzed joined #nim |
00:27:28 | ephja | that makes more sense |
00:37:45 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:47:31 | * | elrood quit (Quit: Leaving) |
00:51:43 | * | jaco60 quit (Ping timeout: 246 seconds) |
00:51:46 | * | pregressive joined #nim |
00:51:54 | * | ephja quit (Ping timeout: 260 seconds) |
00:57:12 | * | zepolen joined #nim |
01:01:30 | * | zepolen quit (Ping timeout: 240 seconds) |
01:09:22 | * | yglukhov joined #nim |
01:13:10 | * | Demon_Fox joined #nim |
01:13:59 | * | yglukhov quit (Ping timeout: 264 seconds) |
01:31:19 | * | jakesyl quit (Ping timeout: 240 seconds) |
01:44:53 | * | jakesyl joined #nim |
01:59:48 | * | astigmatism joined #nim |
02:00:08 | astigmatism | still new to nim: how do i add types to a seq without using a variable? |
02:00:23 | astigmatism | instead of doing var a: ipair = (1, 2) |
02:00:29 | astigmatism | then seq add a |
02:00:39 | * | Kingsquee joined #nim |
02:05:59 | Araq | & |
02:06:50 | * | sigsegv joined #nim |
02:10:02 | * | yglukhov joined #nim |
02:10:36 | astigmatism | ty |
02:14:39 | * | yglukhov quit (Ping timeout: 255 seconds) |
02:28:39 | * | sigsegv left #nim (#nim) |
03:12:15 | * | zepolen joined #nim |
03:16:55 | * | zepolen quit (Ping timeout: 268 seconds) |
03:21:27 | * | zepolen joined #nim |
03:51:59 | * | gmpreussner quit (Ping timeout: 244 seconds) |
04:01:39 | * | lazypenguin quit (Remote host closed the connection) |
04:11:20 | * | yglukhov joined #nim |
04:13:12 | * | jakesyl quit (Read error: Connection reset by peer) |
04:15:32 | * | yglukhov quit (Ping timeout: 250 seconds) |
04:36:44 | * | darkf joined #nim |
04:44:33 | * | pregressive quit (Remote host closed the connection) |
04:45:09 | * | pregressive joined #nim |
04:47:02 | * | pregressive quit (Remote host closed the connection) |
04:47:15 | * | pregressive joined #nim |
05:17:04 | * | pregressive quit (Remote host closed the connection) |
05:36:32 | * | desophos quit (Read error: Connection reset by peer) |
05:58:24 | * | strcmp1 joined #nim |
06:12:43 | * | yglukhov joined #nim |
06:17:30 | * | yglukhov quit (Ping timeout: 260 seconds) |
06:19:33 | * | linkedinyou quit (Read error: Connection reset by peer) |
06:28:39 | * | linkedinyou joined #nim |
06:47:11 | * | gokr quit (Quit: Leaving.) |
07:11:23 | * | n0xff left #nim (#nim) |
07:30:17 | * | vikingpanicatk joined #nim |
07:32:52 | makoLine | Would a command line option that allows to pass in const values make sense? So, like --define, only instead of just passing in a symbol it takes a symbol name and a string value, for example, nim --define:os:windows is equivalent to prepending const os = "windows" to the file. |
07:34:00 | * | strcmp1 quit (Read error: Connection reset by peer) |
07:34:12 | * | strcmp1 joined #nim |
07:37:10 | * | vikingpanicatk quit (Quit: leaving) |
07:40:27 | makoLine | --define:os=windows, rather |
07:41:02 | makoLine | Hrm.. or would it have to be os=\"windows\" |
08:12:25 | * | Arrrr joined #nim |
08:23:08 | * | gokr joined #nim |
08:26:23 | * | mahlon_ quit (Read error: Connection reset by peer) |
08:27:10 | * | Trustable joined #nim |
08:27:13 | * | Trustable quit (Remote host closed the connection) |
08:28:24 | * | Trustable joined #nim |
08:28:46 | * | Trustable quit (Remote host closed the connection) |
08:30:26 | * | Trustable joined #nim |
08:32:08 | * | Trustable quit (Remote host closed the connection) |
08:32:59 | * | Trustable joined #nim |
08:37:40 | * | yglukhov joined #nim |
08:45:33 | * | Trustable quit (Quit: Leaving) |
08:46:46 | * | Trustable joined #nim |
08:49:41 | * | Soak joined #nim |
08:51:00 | Soak | hello, is it possible to cross-compile to linux from windows please? I tested with nim c --os:linux file.nim which contains only an echo command, but that don't works |
08:51:51 | Soak | sys/mman.h: No such file or directory |
08:52:15 | Soak | C:/Nim/dist/mingw/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-min |
08:52:15 | Soak | gw32/bin/ld.exe: cannot find -ldl |
08:55:16 | * | vqrs quit (Ping timeout: 244 seconds) |
08:57:57 | * | vqrs joined #nim |
09:05:36 | * | strcmp1 quit (Ping timeout: 244 seconds) |
09:19:23 | * | vqrs quit (Ping timeout: 264 seconds) |
09:21:01 | * | vqrs joined #nim |
09:29:49 | * | boopsiesisaway quit (Quit: WeeChat 1.3) |
09:30:38 | * | makoLine quit (Ping timeout: 268 seconds) |
09:36:08 | * | Soak quit (Quit: Leaving) |
09:47:01 | * | coffeepot joined #nim |
09:49:40 | OnO | hello, whazzup? |
09:50:19 | OnO | Araq: some new idea about itroducing generic args, prefix them with :, eg. let y = newSeq :int, 10 or y = newSeq(:int, 0) |
09:53:08 | Arrrr | +1 |
10:03:36 | * | Demon_Fox quit (Quit: Leaving) |
10:36:02 | bbl | Araq: chk = check? |
10:39:31 | coffeepot | so, how come the generic syntax is going to be changed? |
10:40:00 | coffeepot | what's wrong with [] |
10:42:04 | * | ayia joined #nim |
10:44:34 | * | BitPuffin|osx quit (Ping timeout: 260 seconds) |
10:45:15 | ayia | Hi, `void context` section at https://github.com/nim-lang/Nim/blob/devel/doc/manual/stmts.txt seems weird to me... The error in the code example is "value of type 'string' has to be discarded ", but the actual error in compiled code is "statement not allowed after 'return', 'break', 'raise' or 'continue'"... This confuses... |
10:45:59 | ayia | is it the weirdness of my mind? or should the doc be updated? |
10:49:09 | Araq | bbl: yes |
10:49:26 | bbl | Araq: hype |
10:49:54 | Araq | ayia: what? |
10:51:09 | Araq | the example produces exactly what the manual claims |
10:51:21 | ayia | I want to say that the "void context" section from the doc seems confusing to me... |
10:51:28 | ayia | here is how my mind goes: http://joxi.ru/BA0MKqGtGJ4lry |
10:52:16 | Araq | how did you get the colors in there? |
10:52:46 | ayia | used the tool for screenshooting... |
10:53:18 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
10:53:38 | Araq | bbl: hrm? |
10:54:06 | bbl | Araq: syntax checking without the need to compile? |
10:54:19 | bbl | or best practices checker? |
10:54:34 | Araq | 'nim check' but integrated into nimsuggest |
10:54:46 | Araq | so syntax + sematic checking. |
10:55:07 | bbl | nice, I'll put that to use |
10:55:34 | Araq | ayia: well I think the manual is perfectly clear about it. how else should we phrase it? |
10:56:29 | Araq | the assignment to 'result' triggers a void context and "invalid" is a string literal, not something yielding yoid, so you get an error |
10:57:34 | ayia | but first sentence just said that "all except last should trigger void", and "invalid" is the last, and so it's ok to not trigger void for it... not? |
10:58:41 | Araq | yes. |
10:58:55 | Araq | and then it goes on with "In addition to this rule " |
10:59:27 | ayia | and this additional rule for me seems to not "negate" the previous, but just tells that following code will work... |
11:00:37 | Araq | well do you think the phrasing is misleading and have some alternative phrasing or do you actually not understand what it is trying to say? |
11:00:54 | ayia | hm... maybe i am fooling with myself... will try to gather my mind, and will write you privately |
11:01:43 | Araq | there is no contradiction here, the first rule says (void; void; void; something) |
11:02:07 | Araq | the second rule says: something has to be void too, if 'result = ...' occcured |
11:02:46 | ayia | ah... that sentence i understood "something has to be void too, if 'result = ...' occcured" |
11:03:44 | ayia | just somehow for me: "an assignment to the builtin ``result`` symbol also triggers a ``void`` context:" != "something has to be void too, if 'result = ...' occcured" |
11:08:20 | Araq | well feel free to create a PR |
11:08:36 | Araq | the manual is still overly terse |
11:11:46 | ayia | ok) thanks) |
11:21:24 | * | Pisuke quit (Read error: Connection reset by peer) |
11:24:43 | Araq | coffeepot: 1. foo.bar[T](x, y) doesn't do what people think it should do |
11:25:12 | Araq | 2. it's getting really hard to disambiguate foo[T] from a[i] in the compiler |
11:29:07 | Arrrr | Which one do you like the most coffeepot m/nim-lang/Nim/issues/3502 ? |
11:29:30 | Arrrr | https://github.com/nim-lang/Nim/issues/3502 |
11:30:09 | bbl | <T> :PPP |
11:30:52 | bbl | All of those choises look ugly |
11:32:49 | bbl | "of" looks more like the rest of nim and wouldn't be too bad with many generic parameters when seperated with comma. Still to bad that those are introduced after the actual parameters |
11:33:39 | Arrrr | What do you think of using '()' for array access |
11:33:56 | bbl | I would confuse it with operator () :D |
11:34:09 | bbl | [] are used for that in almost every language |
11:34:29 | bbl | at least that I use |
11:34:42 | bbl | What's wrong with angle brackets? |
11:36:11 | Arrrr | you can see the array as a closure for accessing/setting an array |
11:37:11 | OnO | okay, shall I write in the 3502 that <T> is NO go, since you cannot disambiguate it from comparison < or > ops |
11:37:18 | Arrrr | nothing wrong with [], but i'd rather have array access with () than weird generic |
11:37:45 | bbl | OnO: I asked that |
11:38:26 | bbl | It works quite well in java, C# and C++ |
11:38:44 | coffeepot | well my first reaction is a two character wrap around generics makes me sad and also seems like a typo generator |
11:38:54 | bbl | coffeepot: I feel the same |
11:39:51 | bbl | https://doc.rust-lang.org/book/generics.html generic functions here |
11:40:24 | Araq | bbl: it surely doesn't work well in C++ and requires arbitrary token lookahead for Java, C#, C++ and Rust afaict |
11:40:44 | coffeepot | <> is definitely the most common but I can see that it suffers from the same duplication of purpose as [] |
11:40:44 | bbl | Araq: works well with >= c++11 |
11:41:29 | Araq | 'typename' ? |
11:41:47 | bbl | Araq: :d |
11:41:50 | Araq | got C++11 rid of that? no? how can you claim it works well then :P |
11:41:58 | bbl | Araq: I got no problem writing that |
11:42:38 | bbl | proc lol«T»(x: T) = ... |
11:42:40 | coffeepot | it seems to me that generic syntax is one of the most important decisions Nim will have to make |
11:43:00 | Araq | what? you are kidding, right? |
11:43:08 | * | Pisuke joined #nim |
11:43:20 | bbl | Araq: do you mean that lol function or typename? |
11:43:38 | Araq | I meant coffeepot's remark |
11:44:13 | Araq | bbl: if we pick [. .] the editor can render it as «T» easily |
11:44:18 | coffeepot | in terms of how the language looks and feels, yes. Not in terms of function of course. I'm a huge fan of how Nim is easy to read and generally makes sense to look at, and IMHO [.. |
11:44:23 | Arrrr | i feel the same way, depending on how you handle this, there will be more or less jokes about nim's generics |
11:44:31 | coffeepot | [..] is not attractive to me personally |
11:44:31 | bbl | Araq: I actually use vim's conceal with c++ |
11:45:06 | bbl | I definitely write more generics and pragmas and my fingers ache already with pragmas |
11:45:10 | OnO | IMHO it is far better to rely on font ligatures, eg Hasklig font, than rendering in certain editor: https://github.com/i-tu/Hasklig |
11:45:10 | coffeepot | personally I want to avoid as many symbols as possible |
11:46:55 | OnO | again anyone have anything against prefixing generic args with : and keeping them together with the rest: proc newSeq(:A, size: int) seq :A = … |
11:47:07 | OnO | this is syntax 6.1 in #3502 |
11:47:48 | Araq | I do, I think it's ugly |
11:47:55 | Araq | seq :A wtf |
11:48:25 | OnO | you don't like seq:: int either |
11:48:42 | OnO | neither: seq of int |
11:49:12 | OnO | :( |
11:49:15 | Araq | OnO: font ligatures. yummy, yeah my favourite solution. why not make use of Unicode in 2015. |
11:49:32 | OnO | because there are NO unicode keyboards!? |
11:49:40 | Araq | even though Unicode kinda sucks we cannot pretend it's 1970 forever |
11:49:41 | bbl | proc myFn of A, B(a: A, b: B)... |
11:49:54 | Araq | OnO: you type << >> and it's rendered properly |
11:49:56 | coffeepot | the reason why i say it's one of the most important (aesthetic) decisions is because generics are used all the time, and having two character syntax or having unusual symbols makes the code look awkward and takes away from the otherwise extremely elegant Nim syntax |
11:50:12 | bbl | coffeepot: exactly |
11:50:26 | OnO | coffeepot: agreed! |
11:50:32 | Arrrr | plus one |
11:50:44 | Araq | OnO: it's still ascii based, but the editor renders it properly |
11:51:03 | Araq | Git still loves you, it's still readable in the browser |
11:51:20 | Araq | but in your editor it looks beautiful. |
11:51:26 | Araq | what's there not to like? |
11:51:27 | OnO | Araq: then I prefer proc myFn<A, B>(a: A, b: B)... with look ahead |
11:51:42 | OnO | << are used commonly to denote shift operations |
11:51:53 | Araq | it's just an example |
11:52:00 | Araq | we don't have to pick << >> |
11:53:43 | OnO | Araq: are we already relying on look ahead in Nim grammar? |
11:53:53 | Araq | no, we don't. |
11:56:06 | OnO | are hashes dynamic in Nim? |
11:56:27 | OnO | coz @[ .... ] -> seq, shouldn't @{ } be hash |
11:56:29 | OnO | ? |
11:56:44 | OnO | just wondering, we may then free { } for generics |
11:57:23 | Araq | er |
11:57:26 | coffeepot | so <T> requires look ahead to determine it's not greater than/ less than? |
11:57:40 | Araq | firstly {} is a set, not a hash. |
11:57:54 | OnO | Araq: argh, geee.. you're right |
11:58:02 | Araq | secondly {} as generics don't bite with sets, but with the {} *accessors* |
11:58:04 | OnO | too much ObjC coding today |
11:58:10 | coffeepot | I would go for {T} but yeah it should be used for sets, would get confusing |
11:58:31 | OnO | Araq: okay, let's ditch {} accessors |
11:58:37 | OnO | they're not so common |
11:58:49 | coffeepot | so <T> requires look head right? |
11:58:51 | Araq | they are too beautiful to miss |
11:58:53 | Araq | coffeepot: right |
11:58:56 | coffeepot | :/ |
11:59:19 | OnO | Araq: nevertheless they're not really used often |
11:59:44 | bbl | Araq: nested templates work in c++11 without having the space between brackets |
11:59:57 | Araq | bbl: I know. |
12:00:13 | Araq | c2nim does support that too ... |
12:00:17 | OnO | bbl: but they require look ahead, which is PITA when you want to implement grammar via RegEx -> many editors |
12:00:22 | Araq | who do you think you're talking to? :P |
12:00:56 | bbl | Araq: hehe :D |
12:01:18 | Araq | that a{i} is not common misses the point of a{i} |
12:01:23 | bbl | I was thinking that using angle brackets is too hard to implement |
12:01:42 | Araq | it was *designed* to be freely available for your convenience when *your* use case demands it |
12:01:52 | Araq | like accessing rows in a matrix |
12:02:17 | Araq | for performing a nop a[i] which returns a default rather than IndexError |
12:02:35 | Araq | the stdlib deliberately doesn't use it much. |
12:05:08 | Araq | and again, please do consider that [. .] is supposed to be used *rarely* if ambiguity demands it. |
12:05:28 | OnO | I prefer using [. .] for -> *designed* to be freely available for your convenience when *your* use case demands it |
12:05:46 | * | elrood joined #nim |
12:05:50 | Araq | the examples with proc foo[T](s: seq[T]): seq[T] all miss the point. |
12:06:07 | Araq | all the [T] will stay. |
12:06:25 | Araq | it's about when you need explicit generics in an expression context. |
12:06:57 | coffeepot | Araq: Can you give an example of explicit generics in an expression? |
12:07:03 | OnO | let z = newList[10](1) |
12:07:10 | Arrrr | like newSeq?: |
12:07:15 | OnO | meaning depends on what newList is |
12:07:32 | OnO | maybe it is an array? maybe generic |
12:09:16 | Araq | meh, this is leading to nowhere. we'll just use Foo[T] and live with the complexity in the compiler I guess. |
12:09:29 | bbl | Araq: +1 |
12:09:48 | bbl | I just actually read the original comment |
12:10:18 | bbl | just use nimsuggest highlight for that then :D |
12:10:33 | * | flyx quit (Remote host closed the connection) |
12:11:02 | Araq | well nimsuggest is based on the compiler and it's the compiler which has trouble with [], but I see your point. |
12:11:27 | OnO | but then you can just forget about generics syntax highlight |
12:12:33 | coffeepot | btw what would let z = newList[10](1) mean? Is that the same as let z = newList[int](1) ? |
12:13:33 | Arrrr | it means that maybe you are calling (1) on whatever is in nimList at 10, or that you are calling a template with the generic type int and arg 1 |
12:13:57 | coffeepot | right, so why would you put in a static number to represent a static type? |
12:14:40 | Arrrr | The problem is that the compiler gets confused because it cant tell if you wanted a or b |
12:16:19 | * | barosl quit (Read error: Connection reset by peer) |
12:16:20 | OnO | compiler assumes the meaning depending on what newList is, but this require semantics |
12:16:38 | * | barosl joined #nim |
12:17:38 | coffeepot | I could be missing the point here, but if I saw let z = newList[10](1) and the author intended [10] to represent let z = newList[int](1) I would find that confusing even with a unique syntax like let z = newList[.10.](1) or let z = newList{10}(1). What advantage is there of inferring int from a number in this context? |
12:18:47 | * | flyx joined #nim |
12:19:31 | Arrrr | you can define proc '()'(i: int) = echo i |
12:19:39 | Arrrr | and use it like 56() |
12:19:48 | coffeepot | also, not sure if int is dependant on architecture, but if it is then inferring generic type from a numeric is going to create problems if a user switches from x86 and x64 isn't it? |
12:19:51 | bbl | I think in those cases one should write newList(typedefdeclwhatever(10))(1) |
12:20:24 | OnO | coffeepot: we are not inferring anything, the generic argument can be either a type or static value |
12:20:37 | OnO | proc newList[MaxSize: static[int]](initialSize: int) = ... |
12:21:17 | bbl | OnO: I didn't know static can be used like that |
12:21:21 | coffeepot | ok so you can define generics to only take specific values? That's mad! |
12:21:41 | coffeepot | or rather, impressive. |
12:22:09 | bbl | I thought it was only usable with the rest of parameters like: proc newList(MaxSize: static[int], initialSize: int) ... |
12:22:26 | coffeepot | bbl: I thought that too |
12:22:53 | bbl | Is there a point using inside the generics? |
12:23:00 | bbl | +it |
12:25:17 | OnO | proc newList(MaxSize: static[int], initialSize: int) has different meaning than proc newList[MaxSize: static[int]](initialSize: int) |
12:25:50 | OnO | eg. you can't do when MaxSize on 1st on, but you can on 2nd |
12:27:34 | * | flyx quit (Remote host closed the connection) |
12:28:14 | * | flyx joined #nim |
12:31:59 | * | flyx quit (Remote host closed the connection) |
12:32:27 | * | flyx joined #nim |
12:33:24 | OnO | but this is not just about static |
12:33:49 | OnO | let z = newList[pos](2), where: type pos = int; proc newList[T](def: T): seq[T] = newSeq[T](def) |
12:34:10 | OnO | vs: let z = newList[pos](2), where: let pos = 1, let newList = [1, 2, 3, 4], proc `()`(a, b: int): int = a + b |
12:34:43 | * | flyx quit (Remote host closed the connection) |
12:34:49 | Araq | he he he |
12:35:09 | OnO | or arr[2] meaning when template arr: expr = [1, 2, 3, 4] vs template arr[N]: expr = N |
12:35:38 | OnO | ^-- an original source of confusion :) |
12:35:58 | * | flyx joined #nim |
12:39:51 | Araq | I really like the ligatures solution but it seems I am the only one... |
12:42:05 | OnO | Araq: actually I am rather okay with <<int>> since it looks good with Hasklig |
12:42:18 | OnO | no changes necessary |
12:42:51 | Araq | bbl: are you working on nimsuggest integration? |
12:43:03 | bbl | Araq: yeah, trying to get it into vim properly |
12:43:21 | Araq | how far are you? cause for me it behaves weirdly |
12:43:35 | bbl | Araq: just started yesterday again |
12:43:43 | bbl | have been waiting for a stable release |
12:43:50 | Araq | it often reports nothing and then *later* produces results referring to the old request |
12:43:56 | bbl | before that I used idetools |
12:44:13 | bbl | Araq: with sug? |
12:44:13 | Araq | sorry bbs |
12:44:25 | Araq | bbl: yeah, not sure if my editor is buggy or nimsuggest -.- |
12:45:15 | bbl | I haven't used anything too complex with it yet, I bet I find trouble soon |
12:48:10 | bbl | Araq: only odd thing I found was that def on an import does not give me anything like idetools used to |
12:56:36 | * | BitPuffin joined #nim |
13:32:22 | * | vqrs quit (Ping timeout: 250 seconds) |
13:34:20 | * | vqrs joined #nim |
13:45:28 | Araq | what does "def on an import" mean? |
13:46:07 | bbl | "import os" where cursor is on os |
13:46:19 | Araq | what should that show? |
13:50:14 | bbl | At least the path to that file so I can jump to that file |
13:52:34 | Araq | well I cannot see how this ever worked |
13:52:43 | Araq | I didn't touch this logic |
13:53:37 | bbl | I'm quite sure it worked with idetools... It could also be that my memory is not serving me right |
13:54:36 | bbl | def on proc like os.something() jumps to os module where "something" is, I don't see why it shouldn't work for the module too |
13:54:56 | Araq | I'm not saying it shouldn't work. |
13:55:15 | Araq | I'm saying I dunno why it ever worked, because the code doesn't implement it. |
13:55:43 | Arrrr | the singularity |
13:55:50 | bbl | Araq: Yeah, I got that |
13:58:16 | Araq | do you use --v2 ? |
13:58:27 | bbl | Araq: haven't yet, still at work |
14:01:23 | * | yglukhov_ joined #nim |
14:03:15 | * | yglukhov quit (Ping timeout: 250 seconds) |
14:11:46 | * | ephja joined #nim |
14:18:11 | * | gokr quit (Quit: Leaving.) |
14:19:36 | * | yglukhov_ quit (Remote host closed the connection) |
14:19:48 | bbl | How is the "better iterator library" library going along btw? I read about it on the forum some time ago. |
14:22:13 | Araq | no idea, I bet there are some bugs in the compiler wrt .closure iterators that prevented progress |
14:28:49 | * | vqrs quit (Ping timeout: 250 seconds) |
14:30:24 | * | vqrs joined #nim |
14:32:24 | * | yglukhov joined #nim |
14:33:47 | * | ayia quit (Ping timeout: 264 seconds) |
14:37:15 | * | yglukhov quit (Remote host closed the connection) |
15:08:34 | * | yglukhov joined #nim |
15:08:36 | * | yglukhov quit (Remote host closed the connection) |
15:09:29 | * | yglukhov joined #nim |
15:09:33 | * | yglukhov quit (Remote host closed the connection) |
15:19:05 | * | Jesin quit (Quit: Leaving) |
15:26:34 | * | themagician_d joined #nim |
15:27:31 | * | yglukhov joined #nim |
15:27:31 | * | yglukhov quit (Remote host closed the connection) |
15:32:56 | * | pregressive joined #nim |
15:35:15 | * | dom96_ joined #nim |
15:35:20 | * | bbl quit (*.net *.split) |
15:35:22 | * | pmbauer quit (*.net *.split) |
15:35:22 | * | TylerE_ quit (*.net *.split) |
15:35:24 | * | themagician quit (*.net *.split) |
15:35:25 | * | r-ku quit (*.net *.split) |
15:35:27 | * | mikolalysenko quit (*.net *.split) |
15:35:27 | * | dom96 quit (*.net *.split) |
15:35:27 | * | SianaGearz quit (*.net *.split) |
15:35:29 | * | mnemonikk quit (*.net *.split) |
15:35:30 | * | dom96_ is now known as dom96 |
15:36:19 | * | r-ku joined #nim |
15:37:10 | * | SianaGearz joined #nim |
15:37:10 | * | SianaGearz quit (Changing host) |
15:37:10 | * | SianaGearz joined #nim |
15:38:09 | * | yglukhov joined #nim |
15:41:44 | * | bbl joined #nim |
15:46:26 | * | Demos joined #nim |
15:49:21 | * | pmbauer joined #nim |
15:53:52 | * | mnemonikk joined #nim |
15:53:52 | * | mnemonikk quit (Changing host) |
15:53:52 | * | mnemonikk joined #nim |
15:55:40 | * | THE_LORD quit (Excess Flood) |
15:56:06 | * | Sornaensis joined #nim |
16:01:35 | * | Jesin joined #nim |
16:07:04 | * | TylerE_ joined #nim |
16:09:06 | * | gokr joined #nim |
16:13:14 | Arrrr | Is this error related to the generics syntax issue http://pastebin.com/paSvF8TE ? it is not a matter with `[]` |
16:14:04 | * | Sornaensis is now known as THE_LORD |
16:14:57 | Araq | hrm? the error is perfectly fine? |
16:15:57 | Arrrr | i would expect that to work |
16:16:13 | * | mikolalysenko joined #nim |
16:17:22 | Araq | I wouldn't. |
16:18:44 | Araq | in fact, I might throw out overloading of `()`, it's insane |
16:18:53 | * | yglukhov_ joined #nim |
16:19:56 | Araq | foo.abc # does that call the () after the abc(foo) transformation? |
16:21:57 | Araq | heck is overloading of `()` even documented somewhere in the manual |
16:22:50 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
16:22:59 | * | yglukhov quit (Ping timeout: 264 seconds) |
16:45:27 | * | gokr quit (Quit: Leaving.) |
16:51:13 | * | strcmp1 joined #nim |
17:03:15 | * | strcmp2 joined #nim |
17:04:24 | * | strcmp1 quit (Ping timeout: 272 seconds) |
17:04:35 | * | yglukhov joined #nim |
17:08:55 | * | yglukhov quit (Ping timeout: 246 seconds) |
17:12:56 | * | blizzarac joined #nim |
17:13:12 | * | blizzarac left #nim (#nim) |
17:17:17 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:24:46 | * | brson joined #nim |
17:25:42 | * | jaco60 joined #nim |
17:29:32 | * | Pisuke quit (Read error: Connection reset by peer) |
17:31:40 | * | mal`` quit (Ping timeout: 240 seconds) |
17:56:40 | * | boop joined #nim |
17:57:03 | * | boop is now known as Guest67613 |
18:11:49 | * | darkf quit (Quit: Leaving) |
18:21:57 | * | Trustable quit (Ping timeout: 250 seconds) |
18:36:46 | * | Trustable joined #nim |
18:40:36 | * | askatasuna quit (Quit: WeeChat 1.3) |
18:49:21 | * | BitPuffin quit (Ping timeout: 246 seconds) |
19:08:03 | * | juanfra quit (Quit: juanfra) |
19:28:41 | * | euantor joined #nim |
19:32:11 | euantor | hey, anybody got any ideas why the following may fail with the message "Error: undeclared identifier: 'isDigit'": https://gist.github.com/euantorano/e9a14b63528f059fd09c |
19:32:51 | Araq | was isDigit merged into strutils? |
19:33:44 | Araq | usually Nimsters use sets, isDigit is a bit weird |
19:33:51 | Araq | if x in Digits |
19:34:02 | Araq | or x in {'0'..'9'} |
19:36:08 | * | juanfra joined #nim |
19:36:12 | Arrrr | which version of nim do you have euantor |
19:36:43 | euantor | Nim Compiler Version 0.11.2 (2015-05-04) [MacOSX: amd64] |
19:36:44 | euantor | Copyright (c) 2006-2015 by Andreas Rumpf |
19:36:44 | euantor | git hash: 3bef848a2cf60008f23e72571d7c20c0eb9fd728 |
19:37:13 | euantor | I'm using homebrew, which doesn't seem to have the latest version in its formula, which may cause the problem. I did have my own is_digits function that did |
19:37:31 | euantor | return c >= '0' && c <= '9' |
19:38:02 | euantor | @Araq looks like it here: https://github.com/nim-lang/Nim/blob/master/lib/pure/strutils.nim#L79 |
19:38:30 | Araq | euantor: but that is for 0.12.0 then |
19:38:51 | euantor | Ah, that would explain it. I'll revert to my old version in that case |
19:39:02 | Arrrr | Seems like 0.11.2 didn't have that proc http://ideone.com/QXQKJR |
19:40:51 | euantor | when not declared(isDigit): |
19:40:51 | euantor | proc isDigit(c: char): bool = |
19:40:51 | euantor | return c in Digits |
19:41:07 | euantor | Seems to work, I'll keep that in until homebrew gets updated |
19:41:24 | Araq | yeah that's how awesomely forward compatible Nim is |
19:41:31 | Arrrr | There is already a pull request, so it won't take long |
19:41:49 | Xe | that's amazing |
19:44:05 | euantor | Yeah, I'm impressed so far. Only started with the language at the weekend, still wrapping my head around some aspects |
19:45:47 | * | vendethiel joined #nim |
19:48:58 | * | Ven_ joined #nim |
20:22:04 | * | euantor quit (Remote host closed the connection) |
20:23:17 | * | euantor joined #nim |
20:23:33 | * | gsingh93_ joined #nim |
20:29:10 | * | brson quit (Ping timeout: 240 seconds) |
20:30:42 | * | zepolen quit (Ping timeout: 244 seconds) |
20:31:28 | * | zepolen joined #nim |
20:32:52 | * | euantor quit (Remote host closed the connection) |
20:35:29 | * | euantor joined #nim |
20:38:37 | * | euantor quit (Remote host closed the connection) |
20:38:52 | * | euantor joined #nim |
20:41:19 | * | gokr joined #nim |
20:41:32 | AckZ | hey all... noob question... I'm messing around with 0.12, and I'm a little unclear as to the best way to use nre to determine if a string matches a regex. Since match() returns an Option[RegexMatch]... what can I do with that to get a boolean? |
20:41:42 | * | gokr quit (Read error: Connection reset by peer) |
20:41:57 | * | gokr joined #nim |
20:42:22 | Araq | AckZ: check the docs of the optional/options/whatever module |
20:42:28 | * | Araq cannot remember its name |
20:43:05 | * | Trustable quit (Ping timeout: 252 seconds) |
20:43:22 | * | makoLine joined #nim |
20:44:21 | * | euantor quit (Remote host closed the connection) |
20:44:27 | Araq | makoLine: that's an often requested feature but I don't like it. |
20:45:05 | Araq | it means Nim code is then hidden in your build system. |
20:45:35 | Araq | which we cannot prevent anyway of course, but we don't like to encourage it either |
20:45:58 | reactormonk | AckZ, .has |
20:46:08 | * | euantor joined #nim |
20:46:12 | reactormonk | ... maybe, lemme see |
20:46:16 | Araq | you can use os.getEnv() at compile-time as a workaround... which is ... worse... |
20:49:56 | * | Jesin quit (Quit: Leaving) |
20:49:57 | Arrrr | if isSome(option): #whatever |
20:50:11 | Arrrr | or isNone(option) |
20:56:13 | * | euantor quit (Remote host closed the connection) |
20:56:22 | AckZ | thanks :) |
20:58:07 | * | Trustable joined #nim |
20:58:45 | * | Demos quit (Ping timeout: 255 seconds) |
20:59:27 | * | Demos joined #nim |
21:01:51 | * | Arrrr quit (Quit: WeeChat 1.2) |
21:03:07 | * | Matthias247 joined #nim |
21:10:27 | * | Ven_ quit (Read error: Connection reset by peer) |
21:12:33 | * | brson joined #nim |
21:12:52 | * | Ven_ joined #nim |
21:19:24 | * | strcmp1 joined #nim |
21:22:39 | * | strcmp2 quit (Ping timeout: 246 seconds) |
21:27:21 | * | Ven_ quit (Read error: Connection reset by peer) |
21:28:15 | * | Demos quit (Ping timeout: 246 seconds) |
21:32:08 | * | desophos joined #nim |
21:33:57 | * | Ven_ joined #nim |
21:40:25 | * | Ven_ quit (Read error: Connection reset by peer) |
21:44:56 | astigmatism | Why does nim feel so complete yet so empty |
21:45:49 | * | Ven_ joined #nim |
21:47:31 | ephja | I too would like to know why you feel that way :p |
21:50:00 | ephja | how can it be both? |
21:50:29 | astigmatism | I think its because I havent seen the source |
21:50:47 | astigmatism | its like Schrödinger's cat |
21:51:08 | astigmatism | I dont neccisarily know if its "complete" etc |
21:52:07 | * | zepolen quit (Remote host closed the connection) |
21:53:36 | * | mal`` joined #nim |
21:54:40 | * | astigmatism quit (Quit: Page closed) |
21:55:05 | * | gokr quit (Ping timeout: 240 seconds) |
21:56:02 | * | Ven_ quit (Read error: Connection reset by peer) |
21:57:30 | * | Ven_ joined #nim |
22:02:39 | * | Trustable quit (Remote host closed the connection) |
22:03:13 | * | Kingsquee joined #nim |
22:09:06 | * | euantor joined #nim |
22:11:26 | * | Ven_ quit (Read error: Connection reset by peer) |
22:13:11 | federico3 | the latest Nim release just landed in Debian Unstable thanks to infinity0 |
22:13:40 | * | euantor quit (Ping timeout: 250 seconds) |
22:29:28 | Araq | great! |
22:32:33 | * | brson_ joined #nim |
22:33:30 | * | brson_ quit (Client Quit) |
22:33:37 | * | brson_ joined #nim |
22:33:46 | * | brson quit (Ping timeout: 260 seconds) |
22:34:36 | * | astigmatism joined #nim |
22:34:50 | astigmatism | Is there a ? in nim? |
22:34:54 | astigmatism | like in true ? 1 : 0 |
22:35:06 | Araq | if true: 1 else: 0 |
22:35:12 | astigmatism | ah |
22:35:22 | astigmatism | in theory i could make my own operator for that? |
22:35:35 | Araq | yes and no |
22:35:40 | astigmatism | i know some other languages that do the same thing and allow you to do so |
22:35:43 | astigmatism | explain please |
22:35:58 | Araq | there are no ternary operators in Nim |
22:36:08 | astigmatism | right |
22:36:22 | Araq | you have to do something like ?(x, y) | z |
22:36:55 | Araq | or x ? (y ! z) |
22:37:16 | astigmatism | x? (y ! z) |
22:37:21 | Araq | but it's not hard, 3 line macro or something |
22:38:39 | * | vendethiel quit (Ping timeout: 255 seconds) |
22:42:08 | astigmatism | havent learned macros yet ;P |
22:42:45 | Araq | template `!`(a, b): untyped = (a, b) |
22:43:11 | Araq | template `?`(a, b): untyped = (if a: b[0] else: b[1]) |
22:43:45 | Araq | but that doesn't take laziness into account |
22:43:53 | Araq | so you need to use a macro |
22:45:30 | Araq | or maybe OnO likes to ensure (a, b)[0] is guaranteed to not evaluate b at all |
22:53:38 | astigmatism | another question: do you plan on making exceptions and such more informative? |
22:53:46 | astigmatism | Error: unhandled exception: index out of bounds [IndexError] Error: execution of an external program failed: 'z:\nvm\testing\euler4.exe ' |
22:54:04 | astigmatism | I have a multitude of sequences and such and cant tell whats the issue so debugging is kinda of a bitch |
22:54:14 | Araq | how can they get more informative? |
22:54:33 | Araq | they give you a stack trace and 'nim doc2' infers them for you |
23:02:25 | * | Demon_Fox joined #nim |
23:03:32 | * | vqrs quit (Max SendQ exceeded) |
23:05:51 | * | vqrs joined #nim |
23:12:38 | * | Ven_ joined #nim |
23:14:25 | * | strcmp2 joined #nim |
23:14:36 | * | gsingh93_ quit (Quit: Connection closed for inactivity) |
23:14:57 | * | Guest67613 is now known as Guest67613isaway |
23:16:43 | * | strcmp1 quit (Ping timeout: 252 seconds) |
23:17:34 | * | Jesin joined #nim |
23:21:30 | * | Ven_ quit (Ping timeout: 260 seconds) |
23:21:48 | * | pregressive quit (Remote host closed the connection) |
23:25:45 | astigmatism | I mean shouldent the exception tell me which sequence was called with an invalid index? |
23:26:54 | * | strcmp2 quit (Ping timeout: 250 seconds) |
23:29:27 | ephja | yes, you should see a stack trace unless it has been disabled |
23:39:54 | Araq | well we can make it tell you which expression failed |
23:45:22 | makoLine | Are confusing error messages considered bugs? |
23:45:52 | Araq | confusion is considered to be the most natural state of a programmer to be in. |
23:46:56 | makoLine | Heheheh. Still. I do find Rust's policy of encouraging reports of outright incoherent compiler errors very admirable, and I think it'll pay off. |
23:48:04 | Araq | you mean Rust's millions of dollars put into its development pay off for you who paid nothing for it? |
23:49:43 | Araq | but seriously, report it, I'm sure it's already been reported and by the time it gets fixed you learned what the error message means |
23:51:26 | Araq | we have a tag "error messages" for bugs |
23:51:56 | Araq | please take a look and see if it's been reported |
23:52:08 | Araq | or if it helps you otherwise |