<< 02-11-2015 >>

00:01:19*cryzed quit (Ping timeout: 246 seconds)
00:03:29*cryzed joined #nim
00:09:23*shadwick joined #nim
00:13:57ephjaICBM?
00:19:19*shadwick quit (Quit: Page closed)
00:22:30elroodgreat 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:28ephjathat 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:08astigmatismstill new to nim: how do i add types to a seq without using a variable?
02:00:23astigmatisminstead of doing var a: ipair = (1, 2)
02:00:29astigmatismthen seq add a
02:00:39*Kingsquee joined #nim
02:05:59Araq&
02:06:50*sigsegv joined #nim
02:10:02*yglukhov joined #nim
02:10:36astigmatismty
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:52makoLineWould 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:27makoLine--define:os=windows, rather
07:41:02makoLineHrm.. 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:00Soakhello, 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:51Soaksys/mman.h: No such file or directory
08:52:15SoakC:/Nim/dist/mingw/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-min
08:52:15Soakgw32/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:40OnOhello, whazzup?
09:50:19OnOAraq: some new idea about itroducing generic args, prefix them with :, eg. let y = newSeq :int, 10 or y = newSeq(:int, 0)
09:53:08Arrrr+1
10:03:36*Demon_Fox quit (Quit: Leaving)
10:36:02bblAraq: chk = check?
10:39:31coffeepotso, how come the generic syntax is going to be changed?
10:40:00coffeepotwhat's wrong with []
10:42:04*ayia joined #nim
10:44:34*BitPuffin|osx quit (Ping timeout: 260 seconds)
10:45:15ayiaHi, `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:59ayiais it the weirdness of my mind? or should the doc be updated?
10:49:09Araqbbl: yes
10:49:26bblAraq: hype
10:49:54Araqayia: what?
10:51:09Araqthe example produces exactly what the manual claims
10:51:21ayiaI want to say that the "void context" section from the doc seems confusing to me...
10:51:28ayiahere is how my mind goes: http://joxi.ru/BA0MKqGtGJ4lry
10:52:16Araqhow did you get the colors in there?
10:52:46ayiaused the tool for screenshooting...
10:53:18*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
10:53:38Araqbbl: hrm?
10:54:06bblAraq: syntax checking without the need to compile?
10:54:19bblor best practices checker?
10:54:34Araq'nim check' but integrated into nimsuggest
10:54:46Araqso syntax + sematic checking.
10:55:07bblnice, I'll put that to use
10:55:34Araqayia: well I think the manual is perfectly clear about it. how else should we phrase it?
10:56:29Araqthe assignment to 'result' triggers a void context and "invalid" is a string literal, not something yielding yoid, so you get an error
10:57:34ayiabut 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:41Araqyes.
10:58:55Araqand then it goes on with "In addition to this rule "
10:59:27ayiaand this additional rule for me seems to not "negate" the previous, but just tells that following code will work...
11:00:37Araqwell 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:54ayiahm... maybe i am fooling with myself... will try to gather my mind, and will write you privately
11:01:43Araqthere is no contradiction here, the first rule says (void; void; void; something)
11:02:07Araqthe second rule says: something has to be void too, if 'result = ...' occcured
11:02:46ayiaah... that sentence i understood "something has to be void too, if 'result = ...' occcured"
11:03:44ayiajust 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:20Araqwell feel free to create a PR
11:08:36Araqthe manual is still overly terse
11:11:46ayiaok) thanks)
11:21:24*Pisuke quit (Read error: Connection reset by peer)
11:24:43Araqcoffeepot: 1. foo.bar[T](x, y) doesn't do what people think it should do
11:25:12Araq2. it's getting really hard to disambiguate foo[T] from a[i] in the compiler
11:29:07ArrrrWhich one do you like the most coffeepot m/nim-lang/Nim/issues/3502 ?
11:29:30Arrrrhttps://github.com/nim-lang/Nim/issues/3502
11:30:09bbl<T> :PPP
11:30:52bblAll of those choises look ugly
11:32:49bbl"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:39ArrrrWhat do you think of using '()' for array access
11:33:56bblI would confuse it with operator () :D
11:34:09bbl[] are used for that in almost every language
11:34:29bblat least that I use
11:34:42bblWhat's wrong with angle brackets?
11:36:11Arrrryou can see the array as a closure for accessing/setting an array
11:37:11OnOokay, shall I write in the 3502 that <T> is NO go, since you cannot disambiguate it from comparison < or > ops
11:37:18Arrrrnothing wrong with [], but i'd rather have array access with () than weird generic
11:37:45bblOnO: I asked that
11:38:26bblIt works quite well in java, C# and C++
11:38:44coffeepotwell my first reaction is a two character wrap around generics makes me sad and also seems like a typo generator
11:38:54bblcoffeepot: I feel the same
11:39:51bblhttps://doc.rust-lang.org/book/generics.html generic functions here
11:40:24Araqbbl: it surely doesn't work well in C++ and requires arbitrary token lookahead for Java, C#, C++ and Rust afaict
11:40:44coffeepot<> is definitely the most common but I can see that it suffers from the same duplication of purpose as []
11:40:44bblAraq: works well with >= c++11
11:41:29Araq'typename' ?
11:41:47bblAraq: :d
11:41:50Araqgot C++11 rid of that? no? how can you claim it works well then :P
11:41:58bblAraq: I got no problem writing that
11:42:38bblproc lol«T»(x: T) = ...
11:42:40coffeepotit seems to me that generic syntax is one of the most important decisions Nim will have to make
11:43:00Araqwhat? you are kidding, right?
11:43:08*Pisuke joined #nim
11:43:20bblAraq: do you mean that lol function or typename?
11:43:38AraqI meant coffeepot's remark
11:44:13Araqbbl: if we pick [. .] the editor can render it as «T» easily
11:44:18coffeepotin 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:23Arrrri feel the same way, depending on how you handle this, there will be more or less jokes about nim's generics
11:44:31coffeepot[..] is not attractive to me personally
11:44:31bblAraq: I actually use vim's conceal with c++
11:45:06bblI definitely write more generics and pragmas and my fingers ache already with pragmas
11:45:10OnOIMHO 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:10coffeepotpersonally I want to avoid as many symbols as possible
11:46:55OnOagain anyone have anything against prefixing generic args with : and keeping them together with the rest: proc newSeq(:A, size: int) seq :A = …
11:47:07OnOthis is syntax 6.1 in #3502
11:47:48AraqI do, I think it's ugly
11:47:55Araqseq :A wtf
11:48:25OnOyou don't like seq:: int either
11:48:42OnOneither: seq of int
11:49:12OnO:(
11:49:15AraqOnO: font ligatures. yummy, yeah my favourite solution. why not make use of Unicode in 2015.
11:49:32OnObecause there are NO unicode keyboards!?
11:49:40Araqeven though Unicode kinda sucks we cannot pretend it's 1970 forever
11:49:41bblproc myFn of A, B(a: A, b: B)...
11:49:54AraqOnO: you type << >> and it's rendered properly
11:49:56coffeepotthe 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:12bblcoffeepot: exactly
11:50:26OnOcoffeepot: agreed!
11:50:32Arrrrplus one
11:50:44AraqOnO: it's still ascii based, but the editor renders it properly
11:51:03AraqGit still loves you, it's still readable in the browser
11:51:20Araqbut in your editor it looks beautiful.
11:51:26Araqwhat's there not to like?
11:51:27OnOAraq: then I prefer proc myFn<A, B>(a: A, b: B)... with look ahead
11:51:42OnO<< are used commonly to denote shift operations
11:51:53Araqit's just an example
11:52:00Araqwe don't have to pick << >>
11:53:43OnOAraq: are we already relying on look ahead in Nim grammar?
11:53:53Araqno, we don't.
11:56:06OnOare hashes dynamic in Nim?
11:56:27OnOcoz @[ .... ] -> seq, shouldn't @{ } be hash
11:56:29OnO?
11:56:44OnOjust wondering, we may then free { } for generics
11:57:23Araqer
11:57:26coffeepotso <T> requires look ahead to determine it's not greater than/ less than?
11:57:40Araqfirstly {} is a set, not a hash.
11:57:54OnOAraq: argh, geee.. you're right
11:58:02Araqsecondly {} as generics don't bite with sets, but with the {} *accessors*
11:58:04OnOtoo much ObjC coding today
11:58:10coffeepotI would go for {T} but yeah it should be used for sets, would get confusing
11:58:31OnOAraq: okay, let's ditch {} accessors
11:58:37OnOthey're not so common
11:58:49coffeepotso <T> requires look head right?
11:58:51Araqthey are too beautiful to miss
11:58:53Araqcoffeepot: right
11:58:56coffeepot:/
11:59:19OnOAraq: nevertheless they're not really used often
11:59:44bblAraq: nested templates work in c++11 without having the space between brackets
11:59:57Araqbbl: I know.
12:00:13Araqc2nim does support that too ...
12:00:17OnObbl: but they require look ahead, which is PITA when you want to implement grammar via RegEx -> many editors
12:00:22Araqwho do you think you're talking to? :P
12:00:56bblAraq: hehe :D
12:01:18Araqthat a{i} is not common misses the point of a{i}
12:01:23bblI was thinking that using angle brackets is too hard to implement
12:01:42Araqit was *designed* to be freely available for your convenience when *your* use case demands it
12:01:52Araqlike accessing rows in a matrix
12:02:17Araqfor performing a nop a[i] which returns a default rather than IndexError
12:02:35Araqthe stdlib deliberately doesn't use it much.
12:05:08Araqand again, please do consider that [. .] is supposed to be used *rarely* if ambiguity demands it.
12:05:28OnOI 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:50Araqthe examples with proc foo[T](s: seq[T]): seq[T] all miss the point.
12:06:07Araqall the [T] will stay.
12:06:25Araqit's about when you need explicit generics in an expression context.
12:06:57coffeepotAraq: Can you give an example of explicit generics in an expression?
12:07:03OnOlet z = newList[10](1)
12:07:10Arrrrlike newSeq?:
12:07:15OnOmeaning depends on what newList is
12:07:32OnOmaybe it is an array? maybe generic
12:09:16Araqmeh, this is leading to nowhere. we'll just use Foo[T] and live with the complexity in the compiler I guess.
12:09:29bblAraq: +1
12:09:48bblI just actually read the original comment
12:10:18bbljust use nimsuggest highlight for that then :D
12:10:33*flyx quit (Remote host closed the connection)
12:11:02Araqwell nimsuggest is based on the compiler and it's the compiler which has trouble with [], but I see your point.
12:11:27OnObut then you can just forget about generics syntax highlight
12:12:33coffeepotbtw what would let z = newList[10](1) mean? Is that the same as let z = newList[int](1) ?
12:13:33Arrrrit 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:57coffeepotright, so why would you put in a static number to represent a static type?
12:14:40ArrrrThe 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:20OnOcompiler assumes the meaning depending on what newList is, but this require semantics
12:16:38*barosl joined #nim
12:17:38coffeepotI 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:31Arrrryou can define proc '()'(i: int) = echo i
12:19:39Arrrrand use it like 56()
12:19:48coffeepotalso, 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:51bblI think in those cases one should write newList(typedefdeclwhatever(10))(1)
12:20:24OnOcoffeepot: we are not inferring anything, the generic argument can be either a type or static value
12:20:37OnOproc newList[MaxSize: static[int]](initialSize: int) = ...
12:21:17bblOnO: I didn't know static can be used like that
12:21:21coffeepotok so you can define generics to only take specific values? That's mad!
12:21:41coffeepotor rather, impressive.
12:22:09bblI thought it was only usable with the rest of parameters like: proc newList(MaxSize: static[int], initialSize: int) ...
12:22:26coffeepotbbl: I thought that too
12:22:53bblIs there a point using inside the generics?
12:23:00bbl+it
12:25:17OnOproc newList(MaxSize: static[int], initialSize: int) has different meaning than proc newList[MaxSize: static[int]](initialSize: int)
12:25:50OnOeg. 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:24OnObut this is not just about static
12:33:49OnOlet z = newList[pos](2), where: type pos = int; proc newList[T](def: T): seq[T] = newSeq[T](def)
12:34:10OnOvs: 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:49Araqhe he he
12:35:09OnOor arr[2] meaning when template arr: expr = [1, 2, 3, 4] vs template arr[N]: expr = N
12:35:38OnO^-- an original source of confusion :)
12:35:58*flyx joined #nim
12:39:51AraqI really like the ligatures solution but it seems I am the only one...
12:42:05OnOAraq: actually I am rather okay with <<int>> since it looks good with Hasklig
12:42:18OnOno changes necessary
12:42:51Araqbbl: are you working on nimsuggest integration?
12:43:03bblAraq: yeah, trying to get it into vim properly
12:43:21Araqhow far are you? cause for me it behaves weirdly
12:43:35bblAraq: just started yesterday again
12:43:43bblhave been waiting for a stable release
12:43:50Araqit often reports nothing and then *later* produces results referring to the old request
12:43:56bblbefore that I used idetools
12:44:13bblAraq: with sug?
12:44:13Araqsorry bbs
12:44:25Araqbbl: yeah, not sure if my editor is buggy or nimsuggest -.-
12:45:15bblI haven't used anything too complex with it yet, I bet I find trouble soon
12:48:10bblAraq: 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:28Araqwhat does "def on an import" mean?
13:46:07bbl"import os" where cursor is on os
13:46:19Araqwhat should that show?
13:50:14bblAt least the path to that file so I can jump to that file
13:52:34Araqwell I cannot see how this ever worked
13:52:43AraqI didn't touch this logic
13:53:37bblI'm quite sure it worked with idetools... It could also be that my memory is not serving me right
13:54:36bbldef 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:56AraqI'm not saying it shouldn't work.
13:55:15AraqI'm saying I dunno why it ever worked, because the code doesn't implement it.
13:55:43Arrrrthe singularity
13:55:50bblAraq: Yeah, I got that
13:58:16Araqdo you use --v2 ?
13:58:27bblAraq: 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:48bblHow is the "better iterator library" library going along btw? I read about it on the forum some time ago.
14:22:13Araqno 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:14ArrrrIs 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:57Araqhrm? the error is perfectly fine?
16:15:57Arrrri would expect that to work
16:16:13*mikolalysenko joined #nim
16:17:22AraqI wouldn't.
16:18:44Araqin fact, I might throw out overloading of `()`, it's insane
16:18:53*yglukhov_ joined #nim
16:19:56Araqfoo.abc # does that call the () after the abc(foo) transformation?
16:21:57Araqheck 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:11euantorhey, anybody got any ideas why the following may fail with the message "Error: undeclared identifier: 'isDigit'": https://gist.github.com/euantorano/e9a14b63528f059fd09c
19:32:51Araqwas isDigit merged into strutils?
19:33:44Araqusually Nimsters use sets, isDigit is a bit weird
19:33:51Araqif x in Digits
19:34:02Araqor x in {'0'..'9'}
19:36:08*juanfra joined #nim
19:36:12Arrrrwhich version of nim do you have euantor
19:36:43euantorNim Compiler Version 0.11.2 (2015-05-04) [MacOSX: amd64]
19:36:44euantorCopyright (c) 2006-2015 by Andreas Rumpf
19:36:44euantorgit hash: 3bef848a2cf60008f23e72571d7c20c0eb9fd728
19:37:13euantorI'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:31euantorreturn c >= '0' && c <= '9'
19:38:02euantor@Araq looks like it here: https://github.com/nim-lang/Nim/blob/master/lib/pure/strutils.nim#L79
19:38:30Araqeuantor: but that is for 0.12.0 then
19:38:51euantorAh, that would explain it. I'll revert to my old version in that case
19:39:02ArrrrSeems like 0.11.2 didn't have that proc http://ideone.com/QXQKJR
19:40:51euantorwhen not declared(isDigit):
19:40:51euantor proc isDigit(c: char): bool =
19:40:51euantor return c in Digits
19:41:07euantorSeems to work, I'll keep that in until homebrew gets updated
19:41:24Araqyeah that's how awesomely forward compatible Nim is
19:41:31ArrrrThere is already a pull request, so it won't take long
19:41:49Xethat's amazing
19:44:05euantorYeah, 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:32AckZhey 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:22AraqAckZ: 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:27AraqmakoLine: that's an often requested feature but I don't like it.
20:45:05Araqit means Nim code is then hidden in your build system.
20:45:35Araqwhich we cannot prevent anyway of course, but we don't like to encourage it either
20:45:58reactormonkAckZ, .has
20:46:08*euantor joined #nim
20:46:12reactormonk... maybe, lemme see
20:46:16Araqyou can use os.getEnv() at compile-time as a workaround... which is ... worse...
20:49:56*Jesin quit (Quit: Leaving)
20:49:57Arrrrif isSome(option): #whatever
20:50:11Arrrror isNone(option)
20:56:13*euantor quit (Remote host closed the connection)
20:56:22AckZthanks :)
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:56astigmatismWhy does nim feel so complete yet so empty
21:45:49*Ven_ joined #nim
21:47:31ephjaI too would like to know why you feel that way :p
21:50:00ephjahow can it be both?
21:50:29astigmatismI think its because I havent seen the source
21:50:47astigmatismits like Schrödinger's cat
21:51:08astigmatismI 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:11federico3the latest Nim release just landed in Debian Unstable thanks to infinity0
22:13:40*euantor quit (Ping timeout: 250 seconds)
22:29:28Araqgreat!
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:50astigmatismIs there a ? in nim?
22:34:54astigmatismlike in true ? 1 : 0
22:35:06Araqif true: 1 else: 0
22:35:12astigmatismah
22:35:22astigmatismin theory i could make my own operator for that?
22:35:35Araqyes and no
22:35:40astigmatismi know some other languages that do the same thing and allow you to do so
22:35:43astigmatismexplain please
22:35:58Araqthere are no ternary operators in Nim
22:36:08astigmatismright
22:36:22Araqyou have to do something like ?(x, y) | z
22:36:55Araqor x ? (y ! z)
22:37:16astigmatismx? (y ! z)
22:37:21Araqbut it's not hard, 3 line macro or something
22:38:39*vendethiel quit (Ping timeout: 255 seconds)
22:42:08astigmatismhavent learned macros yet ;P
22:42:45Araqtemplate `!`(a, b): untyped = (a, b)
22:43:11Araqtemplate `?`(a, b): untyped = (if a: b[0] else: b[1])
22:43:45Araqbut that doesn't take laziness into account
22:43:53Araqso you need to use a macro
22:45:30Araqor maybe OnO likes to ensure (a, b)[0] is guaranteed to not evaluate b at all
22:53:38astigmatismanother question: do you plan on making exceptions and such more informative?
22:53:46astigmatismError: unhandled exception: index out of bounds [IndexError] Error: execution of an external program failed: 'z:\nvm\testing\euler4.exe '
22:54:04astigmatismI have a multitude of sequences and such and cant tell whats the issue so debugging is kinda of a bitch
22:54:14Araqhow can they get more informative?
22:54:33Araqthey 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:45astigmatismI 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:27ephjayes, you should see a stack trace unless it has been disabled
23:39:54Araqwell we can make it tell you which expression failed
23:45:22makoLineAre confusing error messages considered bugs?
23:45:52Araqconfusion is considered to be the most natural state of a programmer to be in.
23:46:56makoLineHeheheh. 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:04Araqyou mean Rust's millions of dollars put into its development pay off for you who paid nothing for it?
23:49:43Araqbut 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:26Araqwe have a tag "error messages" for bugs
23:51:56Araqplease take a look and see if it's been reported
23:52:08Araqor if it helps you otherwise