00:12:23 | * | libman quit (Read error: Connection reset by peer) |
00:19:32 | * | girvo quit (Quit: Textual IRC Client: www.textualapp.com) |
00:30:21 | * | yglukhov joined #nim |
00:31:27 | * | libman joined #nim |
00:35:18 | * | yglukhov quit (Ping timeout: 264 seconds) |
00:54:54 | * | ftsf_ joined #nim |
01:01:29 | * | chemist69 quit (Ping timeout: 265 seconds) |
01:04:39 | * | kulelu88 quit (Quit: Leaving) |
01:05:29 | * | libman left #nim (#nim) |
01:17:51 | * | brson quit (Quit: leaving) |
01:28:50 | * | chemist69 joined #nim |
01:40:09 | * | chemist69 quit (Ping timeout: 265 seconds) |
01:50:02 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=57e9d04a857ab70f7d441b84] |
01:53:10 | * | chemist69 joined #nim |
02:24:05 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:48:14 | FromGitter | <gogolxdong> `h: ptr Histogram` works |
03:19:44 | * | yglukhov joined #nim |
03:24:29 | * | yglukhov quit (Ping timeout: 265 seconds) |
03:25:05 | FromGitter | <gogolxdong> ```code paste, see link``` ⏎ `Error: '(' expected` [https://gitter.im/nim-lang/Nim?at=57e9e691ca69aeb745b2f979] |
03:35:07 | FromGitter | <gogolxdong> What occurred here? Will it mix Iterator object up with its constructor? |
04:02:35 | * | yglukhov joined #nim |
04:06:09 | * | ARCADIVS joined #nim |
04:07:27 | * | yglukhov quit (Ping timeout: 276 seconds) |
04:26:05 | FromGitter | <nigredo-tori> You need parenthesis around cast argument (`cast[ptr Iterator](alloc0(sizeof(Iterator)))`) |
04:28:25 | FromGitter | <gogolxdong> I should keep it in mind.:) |
04:28:42 | FromGitter | <gogolxdong> thanks |
04:41:15 | * | sp33der89 quit (Ping timeout: 272 seconds) |
04:45:01 | * | yglukhov joined #nim |
04:49:35 | * | yglukhov quit (Ping timeout: 244 seconds) |
04:59:48 | FromGitter | <nigredo-tori> As for your previous question: is `Histogram` an `object`? If yes, you can't change an argument of this type inside a proc, since it is passed by value. To pass it by reference, use either one of `var Histogram`, `ref Histogram`, or, indeed, `ptr Histogram`. |
05:33:00 | * | ludocode quit (Read error: Connection reset by peer) |
05:36:37 | * | gokr joined #nim |
05:40:33 | * | desophos quit (Read error: Connection reset by peer) |
05:50:32 | * | spindle joined #nim |
06:17:42 | * | wgf_ joined #nim |
06:27:12 | * | wan1 quit (Ping timeout: 276 seconds) |
06:32:34 | * | wan1 joined #nim |
06:35:55 | FromGitter | <gogolxdong> Histogram is an object, now I have an Iterator object and its constructor Iterator(h:Histogram):ptr Iterator, prompt `redefinition of 'Iterator'` |
06:38:09 | flyx | you shouldn't name the constructor proc like the object |
06:38:15 | flyx | try newIterator |
06:38:39 | FromGitter | <gogolxdong> :) |
06:43:59 | * | Arrrr joined #nim |
06:46:26 | FromGitter | <gogolxdong> Is this a program structure problem?If an object can't have the same name constructor, might it didn't mean to be like this and has more native and natural ways. |
06:48:23 | flyx | if you have an object Iterator, you can initialize it with an empty object constructor `Iterator()` (regardless of whether it has any fields). the compiler needs to be able to differentiate whether this is an object constructor or a proc call, I guess |
06:50:27 | flyx | I think overloading a symbol with different types of values (procs, types, variables, …) is always a very bad idea |
06:53:25 | flyx | seems like the compiler just doesn't allow it. this also doesn't work: `var foo = 1 \\ proc foo(): int = 2` |
06:59:50 | * | yglukhov joined #nim |
07:00:26 | FromGitter | <gogolxdong> yeah,I know where the problem lies . We already have an Iterator object and its constructor, then comes another proc meant to be named iterator() but it's a reserved key word and I changed it to the same. |
07:01:20 | * | filcuc joined #nim |
07:04:10 | * | fredrik92 joined #nim |
07:04:12 | FromGitter | <Araq> @gogolxdong read NEP-1 please |
07:11:49 | * | foocraft joined #nim |
07:11:58 | * | planhths joined #nim |
07:13:42 | FromGitter | <gogolxdong> what is NEP? |
07:16:21 | * | free_beard joined #nim |
07:16:54 | Arrrr | This my friend http://nim-lang.org/docs/nep1.html |
07:16:55 | * | free_beard left #nim ("JOIN #nginx ") |
07:17:32 | Arrrr | But there are ugly stuff, like PascalCase for enums instead of going full uppercase like consts |
07:17:53 | Arrrr | (in my opinion) |
07:20:47 | FromGitter | <gogolxdong> @Arrrr long time no see |
07:21:58 | flyx | I would use full uppercase names only if my editor rendered them with small caps. |
07:22:20 | Arrrr | heh |
07:23:30 | * | ARCADIVS quit (Quit: ARCADIVS) |
07:25:40 | Araq_ | allcaps is still shouting to me |
07:25:55 | Araq_ | hard to read, hard to write, just say no. |
07:26:05 | * | brechtm joined #nim |
07:26:41 | Araq_ | besides they have been introduced because C's preprocessor names clash with C names. Nim doesn't have a preprocessor, so it doesn't need this. |
07:27:49 | Araq_ | if anything, global variables should be shouted since they immediately make your code almost unusable as a library |
07:31:27 | FromGitter | <gogolxdong> read before ,had no awareness it's NEP , abbreviation |
07:31:33 | Arrrr | I'm using to see enums as indexed consts, i like that a first glance you can tell if it is an enum/consts or a simple var. |
07:31:42 | Arrrr | *used |
07:35:41 | * | planhths quit (Quit: Konversation terminated!) |
07:41:40 | FromGitter | <kteza1> Can I `select` on tcp client socket and a channel? |
07:49:37 | Arrrr | I think there is a module for that |
07:52:22 | Arrrr | http://nim-lang.org/docs/selectors.html |
07:52:24 | * | bjz joined #nim |
07:58:08 | Araq_ | Arrrr: channels don't support that though iirc. |
07:58:43 | Araq_ | you can wrap the channel's send op to also emit an event |
08:03:38 | * | PMunch joined #nim |
08:05:56 | cheatfate | kteza1: use pipe or fifo for channeling data and then you will be able to do `select` |
08:07:58 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:12:28 | * | ftsf_ quit (Remote host closed the connection) |
08:13:57 | FromGitter | <kteza1> Thanks |
08:15:09 | cheatfate | kteza1: you can use https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncipc.nim or this https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncpipe.nim depends on what you need |
08:22:16 | * | bjz joined #nim |
08:30:00 | * | Andris_zbx joined #nim |
08:35:48 | * | samuell joined #nim |
08:39:43 | FromGitter | <gogolxdong> ```code paste, see link``` ⏎ `hdr.nim(130, 3) Error: invalid indentation` [https://gitter.im/nim-lang/Nim?at=57ea304f35e0f31c6c4738af] |
08:41:52 | FromGitter | <kteza1> @cheatfate Thanks. I'll check |
08:42:51 | Arrrr | lxdong use 'inc' instead of '++' |
08:43:17 | Arrrr | http://nim-lang.org/docs/system.html#inc,T,int |
08:45:58 | FromGitter | <gogolxdong> yeah,incidentally lose my mind :) |
08:51:00 | * | Trustable joined #nim |
09:15:54 | * | Trioxin joined #nim |
09:40:43 | * | xet7_ joined #nim |
09:56:36 | * | ldlework quit (Ping timeout: 250 seconds) |
10:00:20 | * | bjz quit (Ping timeout: 252 seconds) |
10:00:46 | * | ldlework joined #nim |
10:00:46 | * | ldlework quit (Changing host) |
10:00:46 | * | ldlework joined #nim |
10:01:09 | * | bjz joined #nim |
10:06:54 | * | xet7_ quit (Quit: Leaving) |
10:07:02 | * | xet7 quit (Quit: Leaving) |
10:07:50 | * | xet7 joined #nim |
10:11:59 | * | spindle quit (Remote host closed the connection) |
10:44:23 | * | planhths joined #nim |
10:53:52 | * | brechtm_ joined #nim |
10:57:32 | * | brechtm quit (Ping timeout: 252 seconds) |
11:02:07 | * | Snircle joined #nim |
11:15:18 | * | Arrrr quit (Quit: WeeChat 1.5) |
11:24:36 | * | krux02 joined #nim |
11:35:40 | * | brechtm_ quit (Remote host closed the connection) |
11:36:16 | * | brechtm joined #nim |
11:53:32 | * | Sembei joined #nim |
11:54:03 | * | Trioxin left #nim ("Leaving room") |
11:56:16 | * | wgf_ quit (Quit: Leaving) |
12:06:11 | * | bjz_ joined #nim |
12:06:41 | * | bjz quit (Ping timeout: 265 seconds) |
12:22:54 | krux02 | can I ask what the current construction sites of nim are? |
12:25:50 | krux02 | is it possible to referece a part of a seq without copying the data? |
12:26:19 | flyx | krux02: addr mySeq[index] |
12:26:24 | flyx | also with mitems |
12:27:15 | * | confundus joined #nim |
12:28:17 | * | confundus left #nim (#nim) |
12:29:07 | krux02 | flyx, I mean something like mySeq[begin ..< end] |
12:29:38 | krux02 | the problem is mySeq[1 .. 4] works, but it returns a seq type on it's own |
12:30:18 | krux02 | a seq value is by design not able to be a portion of another seq value |
12:30:31 | krux02 | faik openarry would be |
12:30:32 | flyx | krux02: tuple[a: addr seq[T], begin, end: int] |
12:30:56 | krux02 | you mean ptr seq |
12:31:02 | flyx | err, yeah |
12:31:10 | flyx | an object type would also make more sense |
12:31:24 | krux02 | yea not happy with that |
12:31:31 | flyx | then you implement `[]`, len, items etc on it |
12:31:40 | krux02 | because it means it is my own collection type then where I need to implement all methods |
12:32:15 | flyx | you can shallowCopy a seq, but that will always copy the whole seq |
12:32:32 | flyx | or more like, reference the whole seq |
12:33:01 | krux02 | I am looking into what the slice type for the go language is |
12:33:34 | krux02 | the reason is, that I am porting a lot of scala code right now to nim |
12:33:41 | krux02 | and scala has a lot of functional stuff |
12:34:17 | krux02 | the nature of nim really makes it very grateful to all all the methods to seq that I am missing when migrating away from scala |
12:34:35 | krux02 | but for the `tail` method I am really unhappy when I have to copy the entire sequence |
12:34:58 | krux02 | and I also don't want it to create something completely new |
12:35:22 | krux02 | I therer there was recently a duscussion here about that the openarray type might become what I am looking for |
12:35:23 | flyx | if you know the inner layout of the seq type, you can probably create a seq object that references a part of the original list |
12:35:44 | krux02 | but right now I would not like to abuse it, becaues i am working with code that is executed at compile time |
12:36:03 | flyx | but it would be a dirty hack |
12:36:15 | krux02 | and the bytecode evaluation can be weired at times and doing crazy things really isn't nice at compiletime |
12:36:32 | krux02 | flyx I know the inner layout of the seq tpye |
12:37:20 | krux02 | it is [length, capacity: int; data: array[T]] |
12:37:27 | krux02 | and data is not a pointer |
12:37:28 | FromGitter | <endragor> getting a part of a seq while keeping the seq ref itself means the GC has to keep the whole seq in memory even when the app may only need a small chunk of it. It’s not a decision stdlib would take, I think it makes sense you have to implement that yourself if you think it’s right for whatever reason. |
12:37:42 | krux02 | the data comes directly after the length and capacity |
12:38:32 | FromGitter | <endragor> besides, seqs are mutable so there would be all kinds of side effects possible |
12:39:00 | krux02 | endragor: why is the seq type garbage collected in the first place? it has value semantices everywhere. I don't like that using the seq type introduces garbage collector usage into my program |
12:39:10 | krux02 | I really dislike this behavior of nim |
12:39:33 | FromGitter | <endragor> use `array` then |
12:39:47 | krux02 | no array is only statically sized |
12:40:44 | krux02 | seq behaves like std::vector from c++ in almost every aspect except that it introduces garbace collection for no reason |
12:41:07 | krux02 | same goes with string |
12:42:04 | krux02 | this is really something I simply do not understand |
12:42:47 | FromGitter | <endragor> Nim doesn’t support RAII, that’s the reason. you can’t implement std::vector in Nim |
12:43:14 | FromGitter | <endragor> there are no constructors/destructors that are always called for any object |
12:43:59 | krux02 | yes, but seq is not implemented in nim |
12:44:49 | krux02 | it's a language feature |
12:44:58 | FromGitter | <endragor> it still follows its idioms, as well as string. there is no object lifecycle involved |
12:45:40 | krux02 | meaning that local seq and string values that run out of scope do not get freed? |
12:46:46 | FromGitter | <endragor> they are freed not because they get out of “scope”, but because they get out of stack that GC checks for references. |
12:48:13 | krux02 | do you mean that the GC has to actively invoked before my stack local seq values get freed? |
12:48:29 | krux02 | with actively I mean processor runs GC code |
12:51:31 | FromGitter | <endragor> only the reference is "stack local", the data itself is on GCed heap. Yes, GC has to free it. |
12:53:25 | krux02 | and to say something about that the gc has to keep the whole seq in memory even when only a small chunk of it is still references. I was talking about a nonowning reference, like a pointer, this type of reference that is illegal to keep around when just the size of the seq changes |
12:54:50 | Araq_ | I don't know what so hard about Nim's seqs. they simply don't support O(1) slicing. and they are GC'ed because it was easiest to implement this way, Nim lacking destructors and all that |
12:58:26 | krux02 | Araq_: yea, but the fact that nim had these seq types that really behaved like std::vector types and the string type that is almost identical to std::string really gave me the impression that using these types would not introduce garbage collection to my program |
12:59:37 | Araq_ | can't you just give us some numbers instead of GC fear mongering |
13:00:05 | Araq_ | IME allocations are slow, GC on top of it or not hardly matters. |
13:00:27 | Araq_ | and C++'s implementation is superior because it doesn't allocate for small seqs/strings. |
13:03:04 | FromGitter | <dom96> Araq_: how much work would polishing destructors take? |
13:03:49 | FromGitter | <dom96> It's something that I am really missing from Nim and I'm considering having a go at finishing this feature. |
13:03:56 | FromGitter | <dom96> But I bet you will soon tell me that it's hard. |
13:04:28 | Araq_ | it's hard but what's worse we have no concept of how to do them. |
13:05:01 | Araq_ | I cannot implement anything without a spec. |
13:05:03 | * | nicanaca0 joined #nim |
13:06:48 | FromGitter | <endragor> isn’t there already a half-finished implementation? what is it lacking, exactly? |
13:06:58 | Araq_ | krux02 promised us a wiki page about how they should work, but whining instead seems easier. :P |
13:10:12 | Araq_ | endragor: a spec is lacking. |
13:10:23 | krux02 | I think the only thing that is really missing is the unique ptr |
13:11:13 | krux02 | Araq_: you wanted me to read this article about visual basic and garbage collection |
13:12:01 | krux02 | I think that the real issue this article had, was that it assumed the default of objects to be garbage collected |
13:12:17 | krux02 | and it implicitly converted non gc pointers to gc pointers |
13:14:39 | krux02 | it's really hard to know where to start explaining |
13:16:08 | krux02 | but I think the core misconception this article had, was that share ownership is a good default or a good programming practice ot always use shared pointers for everything and convert ot shared pointers when necessary |
13:16:19 | krux02 | but this is not only horribly slow, but also just wrong. |
13:16:50 | Araq_ | krux02: assume that I agree with you. can we have this wiki page please? ;-) |
13:17:31 | krux02 | ok, where should I write that wiki page, and how should the title be? |
13:17:37 | * | wgf_ joined #nim |
13:17:39 | FromGitter | <dom96> unique ptr? how does this relate to destructors? |
13:17:55 | krux02 | dom96: a lot |
13:18:19 | krux02 | using unique ptr in modern c++ pretty much eleminates all use cases to write a destructor |
13:18:51 | FromGitter | <dom96> so you're saying we shouldn't have destructors but instead have a unique ptr? |
13:19:11 | FromGitter | <dom96> All I want is for my file descriptors to not leak. |
13:19:23 | flyx | a unique ptr also uses a destructor to free its memory. |
13:19:26 | krux02 | a destructor is nothing more that a portion of code to free resources owned by that object, having unique pointern in an object expressis ownership directly and the cleanup code can be generated completely automatically |
13:19:53 | krux02 | dom96 yes |
13:20:52 | FromGitter | <dom96> My initial reaction is: I disagree. But write that wiki page, i'm probably just not understanding. |
13:21:30 | krux02 | flyx: in c++ yes that's true, because in c++ a unique ptr is implemented in the language itself, but since nim already has ref and ptr as language features it would only make sense to put unique pointer at the same level |
13:22:15 | flyx | krux02: then the language would still need to implement a destructor for the unique ptr, because *somehow* it needs to be called. |
13:23:29 | FromGitter | <Tarmean> Strings and seqs semantics are unsafe currently so I really would like unique pointers for them |
13:23:56 | Araq_ | krux02: https://github.com/nim-lang/Nim/wiki/NEP-2-Catching-up-with-C---and-Rust:-Ownership,-destructors,-unique-pointers |
13:24:09 | FromGitter | <Tarmean> Like, pass a global seq into a proc and append to the global alias. The argument to the proc might point to freed memory |
13:24:31 | FromGitter | <dom96> Araq_: I like that, it's a good and catchy title. |
13:25:08 | FromGitter | <dom96> @Tarmean what? How can they be unsafe? |
13:25:59 | krux02 | Tarmean: I think adding unique pointers doesn't prevent all abuses to address freed memory, nim still doesn't have rust like static code analysis, but it also doesn't have so much clutter in the code to describe ownership, and I think it also doesn't need it |
13:26:37 | FromGitter | <Tarmean> If you pass them to the proc you get a reference and if you manipulate the underlying data the reference can point to garbage data |
13:27:06 | FromGitter | <Tarmean> But yeah, don't think nim has to guarantee complete safety and this isn't going to happen in real code |
13:27:29 | krux02 | nim won't become rust |
13:28:51 | FromGitter | <endragor> @Tarmean I’m not quite getting what you’re saying. unless you use stuff like `addr` or `cast`, you’re pretty safe with strings and seqs |
13:33:24 | FromGitter | <recoilme> Hi! I try upload file with Nim (multipart/form-data) and its look broken( May give some example? |
13:34:17 | FromGitter | <recoilme> I try like this: var data = newMultipartData() data["chat_id"] = "@rgonewild" data = data.addFiles({"photo": path2file}) postContent(sendphoto, multipart=data) |
13:38:00 | FromGitter | <dom96> @recoilme https://github.com/nim-lang/Nim/blob/devel/tests/stdlib/thttpclient.nim#L37 |
13:38:22 | FromGitter | <dom96> the only example I'm afraid |
13:42:58 | * | fvs joined #nim |
13:50:39 | * | sp33der89 joined #nim |
14:00:32 | * | Trustable quit (Remote host closed the connection) |
14:09:43 | * | Trustable joined #nim |
14:20:09 | FromGitter | <recoilme> @dom96 wow! it's work, but not very clear in doc (http://nim-lang.org/docs/httpclient.html#MultipartData): read and sent with the automatically determined MIME type BASED ON FILE EXTENSION |
14:21:20 | FromGitter | <dom96> @recoilme PRs always welcome :) |
14:21:44 | FromGitter | <recoilme> I am not good with english( |
14:23:11 | FromGitter | <recoilme> but i like Nim very mutch) ( i try c/rust/d for my project and winner is nim) |
14:28:51 | * | arnetheduck quit (Ping timeout: 276 seconds) |
14:51:31 | * | xet7 quit (Quit: Leaving) |
14:58:57 | krux02 | for writing the wiki articly, I am playing a bit with `destroy=`, but I can't get it to be called at all. Has there been some recent changes? |
14:59:32 | fvs | hi, howto doAssert(h in H[0..5])? I want to test the substring of H, not the first 6 elements thereof? |
15:00:05 | * | Andris_zbx quit (Remote host closed the connection) |
15:01:57 | Araq_ | fvs: no idea what you mean |
15:02:06 | Araq_ | krux02: it's called `=destroy` |
15:02:42 | krux02 | oops |
15:02:56 | krux02 | thanks |
15:04:15 | krux02 | but already found a problem of `=destroy` having a type in it doesn't trigger any warning, it just silently doesn't trigger the destructor |
15:04:34 | * | enthus1ast joined #nim |
15:04:41 | * | Senketsu_ quit (Read error: Connection reset by peer) |
15:06:34 | FromGitter | <dom96> @recoilme please create an issue at least then :) |
15:11:58 | fvs | H: seq[string], then h in H[0][0..5], H[1][0..5], H[3][0..5], ... |
15:13:44 | Araq_ | fvs: os use 'map' or a for loop |
15:32:22 | * | gokr quit (Ping timeout: 265 seconds) |
15:39:54 | * | wgf_ quit (Quit: Leaving) |
15:42:37 | * | foocraft quit (Quit: Leaving) |
15:44:35 | * | brson joined #nim |
15:55:44 | * | chemist69 quit (Quit: WeeChat 1.5) |
15:56:17 | * | chemist69 joined #nim |
15:58:17 | krux02 | Araq_: yea first section is written: https://github.com/nim-lang/Nim/wiki/NEP-2-Catching-up-with-C---and-Rust:-Ownership,-destructors,-unique-pointers |
15:59:24 | krux02 | That's by far not complete, and didn't even start with unique pointers, but that's it for now |
15:59:44 | krux02 | I will continue when I feel less tired |
16:06:31 | * | gokr joined #nim |
16:06:45 | * | chemist69 quit (Quit: WeeChat 1.5) |
16:07:53 | Araq_ | sure thing |
16:09:23 | * | chemist69 joined #nim |
16:12:16 | * | filcuc quit (Read error: Connection reset by peer) |
16:13:25 | cheatfate | Araq_, i thought destructors are {.experimental.} |
16:14:12 | Araq_ | yes that doesn't mean we cannot flesh out their design. |
16:14:13 | * | chemist69 quit (Quit: WeeChat 1.5) |
16:15:02 | gokr | Idiotic question #342: Is pointer same as ptr? |
16:15:44 | Araq_ | no, pointer is 'void*', ptr X is X* |
16:16:55 | gokr | ah |
16:17:35 | gokr | I don't think the manual explains that. |
16:17:45 | Araq_ | krux02: your proposal fails for self-assignments, 'x = x' |
16:17:46 | gokr | I may be wrong, but can't recall seeing it. |
16:17:56 | * | chemist69 joined #nim |
16:18:01 | Araq_ | destroy(x); `=`(x, x) # oops |
16:18:40 | Araq_ | gokr: it's not the manual's job to explain the standard library |
16:21:03 | gokr | Oh, ok. Didn't intuitively connect it with a library. |
16:21:07 | * | enthus1ast quit (Quit: Leaving.) |
16:22:07 | * | yglukhov_ joined #nim |
16:23:19 | gokr | Araq_: Hmmm, it's here: http://nim-lang.org/docs/system.html#pointer .... right along with ref, ptr etc. but those you do explain in the manual, right? |
16:25:51 | * | yglukhov quit (Ping timeout: 276 seconds) |
16:26:28 | * | yglukhov joined #nim |
16:26:47 | * | yglukhov_ quit (Ping timeout: 272 seconds) |
16:29:30 | * | enthus1ast joined #nim |
16:30:50 | * | Trustable quit (Remote host closed the connection) |
16:31:42 | * | yglukhov quit (Ping timeout: 276 seconds) |
16:34:38 | * | Pisuke joined #nim |
16:34:54 | * | cheatfate_ joined #nim |
16:35:44 | * | enthus1ast1 joined #nim |
16:36:37 | * | planhths quit (Remote host closed the connection) |
16:36:37 | * | brson quit (Ping timeout: 255 seconds) |
16:36:41 | * | Sergio965 quit (Ping timeout: 265 seconds) |
16:36:55 | * | gsingh93 quit (Ping timeout: 260 seconds) |
16:36:55 | * | hohlerde quit (Ping timeout: 260 seconds) |
16:36:55 | * | beatmox quit (Ping timeout: 260 seconds) |
16:36:57 | * | ehmry quit (Ping timeout: 240 seconds) |
16:37:10 | * | euantor quit (Ping timeout: 265 seconds) |
16:37:11 | * | M-Quora quit (Ping timeout: 265 seconds) |
16:37:11 | * | zielmicha[m] quit (Ping timeout: 265 seconds) |
16:37:16 | krux02 | Araq_: in what context whould a self assignment make sense? |
16:37:20 | * | gokr quit (Ping timeout: 272 seconds) |
16:37:20 | * | vqrs quit (Ping timeout: 272 seconds) |
16:37:20 | * | niv quit (Ping timeout: 272 seconds) |
16:37:20 | * | flyx quit (Ping timeout: 272 seconds) |
16:37:20 | * | SirCmpwn quit (Ping timeout: 272 seconds) |
16:37:21 | * | jackv quit (Ping timeout: 272 seconds) |
16:37:21 | * | flyx joined #nim |
16:37:24 | * | Kaini quit (Ping timeout: 244 seconds) |
16:37:24 | * | TheManiac quit (Ping timeout: 244 seconds) |
16:37:24 | * | kier quit (Ping timeout: 244 seconds) |
16:37:25 | * | fvs quit (Ping timeout: 260 seconds) |
16:37:26 | * | Sembei quit (Ping timeout: 260 seconds) |
16:37:26 | * | wan1 quit (Ping timeout: 260 seconds) |
16:37:26 | * | lyro quit (Ping timeout: 260 seconds) |
16:37:27 | * | Vendan quit (Ping timeout: 260 seconds) |
16:37:29 | * | cheatfate quit (Write error: Connection reset by peer) |
16:37:36 | * | MyMind quit (Ping timeout: 272 seconds) |
16:37:36 | * | gurki quit (Ping timeout: 272 seconds) |
16:37:37 | * | enthus1ast quit (Ping timeout: 265 seconds) |
16:37:37 | * | sp33der89 quit (Ping timeout: 265 seconds) |
16:37:37 | * | FreezerburnV quit (Ping timeout: 265 seconds) |
16:37:46 | * | fvs joined #nim |
16:37:58 | * | nim-buildbot quit (Ping timeout: 255 seconds) |
16:37:59 | * | PMunch_ joined #nim |
16:38:01 | * | askatasuna quit (Ping timeout: 264 seconds) |
16:38:02 | * | samuell quit (Ping timeout: 264 seconds) |
16:38:02 | * | PMunch quit (Ping timeout: 264 seconds) |
16:38:02 | * | federico3 quit (Ping timeout: 264 seconds) |
16:38:03 | * | planhths joined #nim |
16:38:03 | * | Kaini joined #nim |
16:38:08 | * | pie_ quit (Ping timeout: 265 seconds) |
16:38:12 | * | _stowa quit (Ping timeout: 272 seconds) |
16:38:31 | * | askatasuna joined #nim |
16:38:31 | * | samuell joined #nim |
16:38:32 | PMunch_ | How do I echo without a newline? |
16:38:37 | * | ftsf quit (Ping timeout: 265 seconds) |
16:38:43 | krux02 | stdout.write |
16:38:59 | PMunch_ | Thanks :) |
16:39:09 | * | brson joined #nim |
16:39:38 | * | ldlework quit (Ping timeout: 257 seconds) |
16:39:42 | * | vqrs joined #nim |
16:39:43 | * | Sembei joined #nim |
16:39:46 | * | sp33der89 joined #nim |
16:39:59 | * | SirCmpwn joined #nim |
16:40:24 | * | federico3 joined #nim |
16:41:23 | * | jackv joined #nim |
16:41:56 | * | gokr joined #nim |
16:42:00 | krux02 | Araq_: Or better asked, where does self assignment actuallly occur in practice, becaues I simply didn't think of it, because I think I never encountered it. |
16:42:14 | * | FreezerburnV joined #nim |
16:42:30 | * | kier joined #nim |
16:43:47 | * | _stowa joined #nim |
16:43:47 | * | reactormonk quit (Ping timeout: 244 seconds) |
16:44:59 | * | sp33dster joined #nim |
16:45:30 | * | couven92 joined #nim |
16:46:47 | * | bjz_ quit (Ping timeout: 252 seconds) |
16:46:56 | * | Amrykid2 quit (Ping timeout: 240 seconds) |
16:46:56 | * | gokr quit (Ping timeout: 240 seconds) |
16:47:05 | * | FreezerburnV quit (Ping timeout: 240 seconds) |
16:47:05 | * | PMunch_ quit (Ping timeout: 240 seconds) |
16:47:09 | * | gsingh93 joined #nim |
16:47:13 | * | nim-buildbot quit (Ping timeout: 265 seconds) |
16:47:13 | * | askatasuna quit (Ping timeout: 265 seconds) |
16:47:13 | * | Snircle_ joined #nim |
16:47:17 | * | Snircle quit (Read error: Connection reset by peer) |
16:47:19 | * | fvs` joined #nim |
16:47:19 | * | huonw quit (Ping timeout: 272 seconds) |
16:47:19 | * | kunev quit (Ping timeout: 272 seconds) |
16:47:20 | * | javax quit (Ping timeout: 272 seconds) |
16:47:21 | * | samuell quit (Ping timeout: 265 seconds) |
16:47:22 | * | planhths quit (Ping timeout: 252 seconds) |
16:47:23 | * | fredrik92 quit (Ping timeout: 252 seconds) |
16:47:23 | * | SianaGea1z quit (Ping timeout: 252 seconds) |
16:47:28 | * | Sergio965 joined #nim |
16:47:41 | * | sp33der89 quit (Ping timeout: 272 seconds) |
16:47:53 | * | cheatfate_ quit (Ping timeout: 252 seconds) |
16:47:54 | * | cheatfate__ joined #nim |
16:47:58 | * | askatasuna joined #nim |
16:47:59 | * | zielmicha quit (Ping timeout: 255 seconds) |
16:47:59 | * | brson quit (Ping timeout: 255 seconds) |
16:48:02 | * | Sembei quit (Ping timeout: 255 seconds) |
16:48:04 | * | bjz joined #nim |
16:48:06 | * | javax_ joined #nim |
16:48:06 | * | Vendan joined #nim |
16:48:11 | * | jackv quit (Ping timeout: 264 seconds) |
16:48:15 | * | SirCmpwn quit (Ping timeout: 264 seconds) |
16:48:17 | * | samuell_ joined #nim |
16:48:20 | * | fvs quit (Ping timeout: 272 seconds) |
16:48:39 | * | huonw joined #nim |
16:49:08 | * | Sembei joined #nim |
16:49:32 | * | brson joined #nim |
16:49:47 | * | Amrykid joined #nim |
16:49:54 | * | ldlework joined #nim |
16:49:54 | * | ldlework quit (Changing host) |
16:49:54 | * | ldlework joined #nim |
16:49:57 | * | SirCmpwn joined #nim |
16:50:00 | * | kunev joined #nim |
16:50:15 | * | planhths joined #nim |
16:50:44 | * | pie_ joined #nim |
16:50:47 | * | ftsf joined #nim |
16:50:49 | * | wgf_ joined #nim |
16:50:56 | * | brechtm_ joined #nim |
16:51:15 | * | wan1 joined #nim |
16:51:31 | * | lyro joined #nim |
16:52:06 | * | gurki joined #nim |
16:54:02 | * | gokr joined #nim |
16:54:29 | * | brechtm quit (Ping timeout: 252 seconds) |
16:54:56 | * | pie_ quit (Changing host) |
16:54:57 | * | pie_ joined #nim |
16:54:57 | * | fvs` left #nim ("ERC (IRC client for Emacs 25.1.1)") |
16:56:41 | * | jackv joined #nim |
16:57:08 | * | confundus joined #nim |
16:57:44 | * | enthus1ast1 quit (Ping timeout: 244 seconds) |
17:01:13 | * | SianaGearz joined #nim |
17:01:13 | * | SianaGearz quit (Changing host) |
17:01:13 | * | SianaGearz joined #nim |
17:04:12 | * | gokr quit (Ping timeout: 276 seconds) |
17:05:35 | * | euantor joined #nim |
17:09:00 | * | cheatfate_ joined #nim |
17:09:47 | * | kunev_ joined #nim |
17:09:56 | * | brechtm joined #nim |
17:10:17 | * | couven92 quit (Read error: Connection reset by peer) |
17:10:41 | * | reactormonk joined #nim |
17:10:53 | * | Sergio965 quit (Ping timeout: 240 seconds) |
17:10:54 | * | pie_ quit (Ping timeout: 240 seconds) |
17:11:05 | * | brechtm_ quit (Ping timeout: 240 seconds) |
17:11:05 | * | cheatfate__ quit (Ping timeout: 240 seconds) |
17:11:08 | Araq_ | krux02: I dunno. in C++ it's commonly talked about. |
17:11:15 | Araq_ | so it seems to be important. |
17:11:16 | * | rektide quit (Ping timeout: 272 seconds) |
17:11:27 | * | askatasuna quit (Ping timeout: 265 seconds) |
17:11:31 | * | yglukhov joined #nim |
17:11:45 | Araq_ | we can emit a check though for self assignments |
17:11:46 | * | ftsf quit (Ping timeout: 272 seconds) |
17:11:46 | * | nim-buildbot_ quit (Ping timeout: 272 seconds) |
17:11:47 | * | cnu_ joined #nim |
17:11:54 | * | Vendan quit (Ping timeout: 244 seconds) |
17:11:54 | * | javax_ quit (Ping timeout: 244 seconds) |
17:11:55 | * | bjz quit (Ping timeout: 255 seconds) |
17:11:56 | * | ldlework quit (Ping timeout: 255 seconds) |
17:11:56 | * | cnu- quit (Ping timeout: 255 seconds) |
17:11:57 | * | federico3 quit (Ping timeout: 255 seconds) |
17:11:59 | * | flyx quit (Excess Flood) |
17:12:03 | krux02 | yes |
17:12:05 | * | Sembei quit (Ping timeout: 252 seconds) |
17:12:15 | * | kunev quit (Ping timeout: 264 seconds) |
17:12:17 | * | gurki quit (Ping timeout: 264 seconds) |
17:12:19 | * | ldleworker joined #nim |
17:12:20 | * | brson quit (Read error: Connection reset by peer) |
17:12:21 | * | samuell_ quit (Ping timeout: 264 seconds) |
17:12:22 | * | pie__ joined #nim |
17:12:22 | * | Vendan_ joined #nim |
17:12:24 | * | ftsf_ joined #nim |
17:12:25 | * | flyx joined #nim |
17:12:27 | * | confundus quit (Ping timeout: 265 seconds) |
17:12:32 | * | samuell_ joined #nim |
17:12:52 | krux02 | but I think we could also say that self assignment is illegal |
17:12:58 | * | federico3 joined #nim |
17:13:20 | * | brson joined #nim |
17:13:55 | krux02 | and then the check is like enabled by the compiler like bounds checking |
17:14:00 | * | confundus joined #nim |
17:14:42 | * | askatasuna joined #nim |
17:15:33 | krux02 | c++ has 10000 years of legacy code that could contain selft assignment, and this code may not be broken. But Nim does not have this legacy and could in fact declare selft assignment as undefined behavior |
17:16:11 | * | yglukhov quit (Ping timeout: 272 seconds) |
17:16:15 | * | bjz joined #nim |
17:17:28 | * | javax joined #nim |
17:17:29 | * | rektide joined #nim |
17:17:36 | * | gurki joined #nim |
17:18:49 | * | brson_ joined #nim |
17:19:17 | Araq_ | krux02: illegal or not, we can handle it internally, so yeah, it's not serious |
17:19:30 | Araq_ | so far I like your ideas, go on. |
17:21:06 | krux02 | Araq_: ok thanks for that last statement, because from only your first statement that was not so clear |
17:21:08 | * | shodan45 joined #nim |
17:21:45 | * | jackv quit (Ping timeout: 272 seconds) |
17:21:45 | * | vqrs quit (Ping timeout: 272 seconds) |
17:21:46 | * | bjz quit (Ping timeout: 272 seconds) |
17:21:47 | * | jackv joined #nim |
17:21:47 | * | huonw_ joined #nim |
17:21:56 | * | SirCmpwn quit (Ping timeout: 272 seconds) |
17:22:24 | * | pie___ joined #nim |
17:22:25 | * | ldlework joined #nim |
17:22:29 | * | huonw quit (Ping timeout: 255 seconds) |
17:22:42 | * | ldlework quit (Changing host) |
17:22:42 | * | ldlework joined #nim |
17:22:46 | * | SirCmpwn joined #nim |
17:22:48 | * | ldleworker quit (Ping timeout: 264 seconds) |
17:22:52 | * | brson quit (Ping timeout: 264 seconds) |
17:22:52 | * | samuell_ quit (Ping timeout: 264 seconds) |
17:22:53 | * | pie__ quit (Ping timeout: 264 seconds) |
17:22:54 | * | Sergio965 joined #nim |
17:22:56 | * | Snircle joined #nim |
17:23:30 | * | vqrs joined #nim |
17:24:47 | * | samuell joined #nim |
17:25:20 | * | elrood joined #nim |
17:26:39 | * | MightyJoe is now known as cyraxjoe |
17:27:12 | * | bjz joined #nim |
17:27:57 | * | xet7 joined #nim |
17:28:03 | * | Snircle_ quit (*.net *.split) |
17:31:17 | * | FromGitter quit (Ping timeout: 265 seconds) |
17:32:52 | * | huonw_ quit (Ping timeout: 272 seconds) |
17:32:52 | * | Snircle quit (Ping timeout: 272 seconds) |
17:32:52 | * | jackv quit (Ping timeout: 272 seconds) |
17:32:53 | * | vqrs quit (Ping timeout: 272 seconds) |
17:32:54 | * | gurki quit (Ping timeout: 272 seconds) |
17:32:54 | * | dom96 quit (Ping timeout: 272 seconds) |
17:32:54 | * | huonw joined #nim |
17:33:00 | * | gurki joined #nim |
17:33:18 | * | elrood quit (Ping timeout: 272 seconds) |
17:33:18 | * | pie___ quit (Ping timeout: 272 seconds) |
17:33:19 | * | javax quit (Ping timeout: 272 seconds) |
17:33:19 | * | cnu_ quit (Ping timeout: 272 seconds) |
17:33:24 | * | beatmox joined #nim |
17:33:25 | * | javax joined #nim |
17:33:29 | * | FromGitter joined #nim |
17:33:37 | * | pie___ joined #nim |
17:33:47 | * | cnu- joined #nim |
17:33:56 | * | bjz quit (Ping timeout: 264 seconds) |
17:33:57 | * | Snircle_ joined #nim |
17:33:57 | * | Vendan_ is now known as Vendan |
17:33:58 | * | Sergio965 quit (Ping timeout: 264 seconds) |
17:34:45 | * | vqrs joined #nim |
17:35:50 | * | dom96 joined #nim |
17:35:58 | * | bjz joined #nim |
17:36:34 | * | Sergio965 joined #nim |
17:36:49 | * | jackv joined #nim |
17:40:25 | * | beatmox quit (Ping timeout: 260 seconds) |
17:41:41 | * | zielmicha joined #nim |
17:45:32 | * | ehmry joined #nim |
18:03:31 | * | fredrik92 joined #nim |
18:04:53 | * | gangstacat quit (Ping timeout: 252 seconds) |
18:05:32 | * | Jesin joined #nim |
18:09:23 | * | Amrykid2 joined #nim |
18:09:33 | * | yglukhov joined #nim |
18:10:13 | * | Amrykid quit (Ping timeout: 240 seconds) |
18:10:26 | * | zielmicha quit (Ping timeout: 272 seconds) |
18:10:27 | * | zielmicha joined #nim |
18:10:28 | * | gurki quit (Ping timeout: 272 seconds) |
18:10:29 | * | flyx quit (Excess Flood) |
18:10:31 | * | zielmicha quit (Changing host) |
18:10:31 | * | zielmicha joined #nim |
18:10:42 | * | nim-buildbot quit (Ping timeout: 272 seconds) |
18:10:55 | * | fredrik92 quit (Ping timeout: 265 seconds) |
18:10:57 | * | flyx joined #nim |
18:10:58 | * | couven92 joined #nim |
18:11:26 | * | Snircle_ quit (Ping timeout: 264 seconds) |
18:11:28 | * | gurki_ joined #nim |
18:11:29 | * | dom96 quit (Ping timeout: 264 seconds) |
18:13:53 | * | dom96 joined #nim |
18:14:18 | * | Snircle joined #nim |
18:21:12 | * | confundu1 joined #nim |
18:21:25 | * | nim-buildbot quit (Ping timeout: 272 seconds) |
18:21:55 | * | confundus quit (Ping timeout: 264 seconds) |
18:27:46 | * | confundu1 quit (Quit: leaving) |
18:30:32 | * | nim-buildbot_ quit (Ping timeout: 264 seconds) |
18:31:45 | * | wgf_ quit (Quit: Leaving) |
18:33:34 | * | beatmox joined #nim |
18:33:52 | * | gangstacat joined #nim |
18:36:08 | * | JeffCanJam4a20 joined #nim |
18:36:52 | * | JeffCanJam4a20 quit (Client Quit) |
18:38:50 | * | gokr joined #nim |
18:40:06 | * | nim-buildbot quit (Ping timeout: 264 seconds) |
18:48:05 | * | beatmox quit (Ping timeout: 260 seconds) |
19:00:02 | * | nsf1 joined #nim |
19:00:04 | * | nsf1 quit (Client Quit) |
19:00:46 | * | nsf quit (Ping timeout: 264 seconds) |
19:05:41 | * | brson_ quit (Ping timeout: 240 seconds) |
19:07:51 | * | brson joined #nim |
19:10:41 | * | zielmicha[m] joined #nim |
19:16:00 | * | PMunch joined #nim |
19:16:52 | * | yglukhov quit (Remote host closed the connection) |
19:26:17 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
19:26:32 | * | vqrs quit (Ping timeout: 244 seconds) |
19:26:57 | * | FromGitter quit (Ping timeout: 272 seconds) |
19:26:57 | * | zielmicha quit (Ping timeout: 272 seconds) |
19:26:57 | * | huonw quit (Ping timeout: 272 seconds) |
19:26:59 | * | FromGitter joined #nim |
19:27:19 | * | cnu- quit (Ping timeout: 272 seconds) |
19:27:27 | * | cyraxjoe joined #nim |
19:27:28 | * | huonw joined #nim |
19:28:15 | * | chemist69 quit (Ping timeout: 265 seconds) |
19:28:18 | * | cnu- joined #nim |
19:29:21 | * | zielmicha[m] quit (Ping timeout: 257 seconds) |
19:29:38 | * | gokr quit (Ping timeout: 244 seconds) |
19:30:01 | * | vqrs joined #nim |
19:30:21 | * | ehmry quit (Ping timeout: 240 seconds) |
19:34:54 | * | desophos joined #nim |
19:34:54 | * | lenstr quit (Ping timeout: 250 seconds) |
19:34:54 | * | gmpreussner quit (Ping timeout: 250 seconds) |
19:34:54 | * | Araq_ quit (Ping timeout: 250 seconds) |
19:34:54 | * | BlaXpirit quit (Remote host closed the connection) |
19:35:07 | * | MonsterAbyss quit (Ping timeout: 250 seconds) |
19:35:07 | * | michael_campbell quit (Ping timeout: 250 seconds) |
19:35:25 | baabelfish | krux02: unique_ptr is not part of the language, it's just part of the standard library (you can roll out your own implementation if you want), the point of unique_ptr is to have only one owner of the piece of data contained by it, you still want to define destructors (what happens immediately after that the object is not used anymore) and additionally you can specify destructor function as the second templated |
19:35:25 | baabelfish | parameter which is really useful when using c-libraries |
19:35:33 | * | abruanese quit (Ping timeout: 250 seconds) |
19:35:33 | * | rinukkusu quit (Ping timeout: 250 seconds) |
19:35:33 | * | Sentreen quit (Ping timeout: 250 seconds) |
19:35:33 | * | zxtx quit (Ping timeout: 250 seconds) |
19:35:33 | * | astocko quit (Ping timeout: 250 seconds) |
19:35:33 | * | ekarlso- quit (Ping timeout: 250 seconds) |
19:35:42 | * | huonw_ joined #nim |
19:35:46 | * | FromGitter quit (Ping timeout: 272 seconds) |
19:35:46 | * | huonw quit (Ping timeout: 272 seconds) |
19:35:52 | * | Snircle quit (Ping timeout: 272 seconds) |
19:35:52 | * | Araq joined #nim |
19:35:53 | * | gurki joined #nim |
19:36:02 | * | abruanese joined #nim |
19:36:10 | * | cyraxjoe quit (Ping timeout: 272 seconds) |
19:36:11 | * | rinukkusu joined #nim |
19:36:21 | * | ekarlso_ joined #nim |
19:36:24 | * | vqrs quit (Ping timeout: 264 seconds) |
19:36:25 | * | gurki_ quit (Ping timeout: 264 seconds) |
19:36:25 | * | michael_campbel- joined #nim |
19:36:27 | * | gangstacat quit (Ping timeout: 264 seconds) |
19:36:30 | * | zxtx_ joined #nim |
19:36:34 | * | BlaXpirit joined #nim |
19:36:52 | * | MonsterAbyss joined #nim |
19:36:53 | * | LeNsTR joined #nim |
19:36:58 | * | Snircle joined #nim |
19:37:17 | krux02 | baabelfish: that's true, in c++ std::vector and std::string and std::shared_ptr are also not language features, the Nim counterpart is. |
19:37:47 | * | vqrs joined #nim |
19:38:06 | * | cyraxjoe joined #nim |
19:38:29 | * | gangstacat joined #nim |
19:38:40 | * | FromGitter joined #nim |
19:39:04 | * | gmpreussner joined #nim |
19:39:48 | krux02 | I just think, that with careful design, and having unique_ptr as language feature in nim, used defined destructors could be unnecessary |
19:39:56 | krux02 | but I am not there yet |
19:40:12 | * | jonafato quit (Ping timeout: 276 seconds) |
19:40:16 | * | chemist69 joined #nim |
19:40:20 | * | Sentreen joined #nim |
19:40:54 | baabelfish | krux02: you don't need to define them in c++ either, struct X {}; make_unique<X>(); is quite ok |
19:42:15 | * | jonafato joined #nim |
19:42:15 | * | Snircle_ joined #nim |
19:42:19 | baabelfish | I only wish I could install nimsuggest with the latest stable release of nim and variadic generics of course |
19:43:26 | krux02 | baabelfish: I think you don't need to explain me how smart pointers in c++ work |
19:43:26 | baabelfish | krux02: sorry, I read last part of your sentence wrong |
19:43:56 | * | BlaXpirit_ joined #nim |
19:44:12 | * | joebo quit (Ping timeout: 250 seconds) |
19:44:12 | * | bknox quit (Ping timeout: 250 seconds) |
19:44:45 | * | Snircle quit (Ping timeout: 272 seconds) |
19:44:47 | * | BlaXpirit quit (Read error: Connection reset by peer) |
19:44:53 | * | BlaXpirit_ is now known as BlaXpirit |
19:44:57 | * | yglukhov joined #nim |
19:45:02 | * | gangstacat quit (Ping timeout: 272 seconds) |
19:45:02 | * | ekarlso_ quit (Ping timeout: 272 seconds) |
19:45:02 | * | gurki quit (Ping timeout: 272 seconds) |
19:45:36 | * | flyx quit (Excess Flood) |
19:45:39 | * | cyraxjoe quit (Ping timeout: 272 seconds) |
19:45:44 | * | bknox joined #nim |
19:45:45 | * | MonsterAbyss quit (Ping timeout: 264 seconds) |
19:45:47 | * | Vendan quit (Ping timeout: 264 seconds) |
19:45:48 | * | gurki_ joined #nim |
19:46:07 | * | flyx joined #nim |
19:46:12 | cheatfate_ | Araq, could you please take a look https://gist.github.com/cheatfate/ea659988a8b053294a8cad52f3f9e986#file-somebug-nim |
19:46:24 | * | joebo joined #nim |
19:46:53 | * | ekarlso_ joined #nim |
19:46:56 | * | cyraxjoe joined #nim |
19:46:57 | baabelfish | krux02: It would indeed feel really nice to be sure that there was only one owner of some data at compile time |
19:47:30 | baabelfish | but nim's destructors should be rock solid to avoid leaks |
19:48:00 | * | zielmicha joined #nim |
19:48:14 | * | kunev_ quit (Ping timeout: 244 seconds) |
19:48:27 | * | kunev joined #nim |
19:48:39 | * | gangstacat joined #nim |
19:49:07 | * | astocko joined #nim |
19:49:16 | * | Vendan joined #nim |
19:53:26 | Araq | cheatfate_: SIG1 returns 'void' implicitly |
19:53:39 | cheatfate_ | Araq, yeah just found it thanks |
19:53:55 | * | vqrs quit (Ping timeout: 244 seconds) |
19:55:23 | * | libman joined #nim |
19:55:33 | * | vqrs joined #nim |
19:56:58 | * | MonsterAbyss joined #nim |
20:05:36 | krux02 | baabelfish: yes I think that should be the goal. I think exceptions can really make the situation complicated, because that's the situation that is alse the ugly situation in c++ |
20:06:15 | krux02 | and then it is also one of those features that I am not even using, becaues everything that can be solved with exceptions can be solved better by not using exceptions |
20:07:39 | * | euantor quit (Read error: Connection reset by peer) |
20:09:24 | baabelfish | krux02: good thing about c++ exceptions is that they are used for truly exceptional situations and have zero runtime cost when they are not risen, unlike in many other languages |
20:09:58 | Araq | krux02: how can not using exceptions perform the stack unwinding that needs to happen in every non-toyish case |
20:10:32 | * | euantor joined #nim |
20:10:59 | * | vqrs quit (Ping timeout: 272 seconds) |
20:13:46 | * | shodan45 quit (Quit: Konversation terminated!) |
20:13:59 | krux02 | Araq: I don't know which construct you have right now in your head, but I think that every case where you have a function that can raise an exception, you could also change the type of the function to return a union type that contains either the value or the error |
20:14:14 | krux02 | then you just return the error value, instead of raising an exception |
20:15:36 | * | enthus1ast joined #nim |
20:16:34 | krux02 | and when you read the value that could also be an exception, but you don't want to deal with the case that the value could be an arror, you try to just unwrap the value, and when it fails then, it is obvious that you did not handled that error and the program exists right there. |
20:16:43 | * | vqrs joined #nim |
20:17:15 | krux02 | I am not sure if you need to do some unwinding when you call the quit method directly, because any system resources are then freed anyway |
20:27:45 | * | NimBot joined #nim |
20:30:24 | * | cheatfate joined #nim |
20:32:40 | * | vqrs quit (Ping timeout: 272 seconds) |
20:32:40 | * | MonsterAbyss quit (Ping timeout: 272 seconds) |
20:32:40 | * | libman quit (Ping timeout: 272 seconds) |
20:32:43 | * | cyraxjoe quit (Read error: Connection reset by peer) |
20:32:45 | * | Matthias247 quit (Ping timeout: 272 seconds) |
20:32:47 | * | kunev quit (Ping timeout: 272 seconds) |
20:32:50 | * | Matthias247 joined #nim |
20:32:58 | * | libman joined #nim |
20:33:01 | * | michael_campbell joined #nim |
20:33:08 | * | astocko quit (Ping timeout: 264 seconds) |
20:33:10 | * | ekarlso_ quit (Ping timeout: 264 seconds) |
20:33:11 | * | michael_campbel- quit (Ping timeout: 264 seconds) |
20:33:12 | * | gangstacat quit (Ping timeout: 272 seconds) |
20:33:15 | * | Vendan quit (Ping timeout: 272 seconds) |
20:33:19 | * | cyraxjoe joined #nim |
20:33:45 | * | ekarlso_ joined #nim |
20:33:47 | * | vqrs joined #nim |
20:33:59 | * | kunev joined #nim |
20:34:31 | * | MonsterAbyss joined #nim |
20:35:49 | * | gangstacat joined #nim |
20:35:50 | * | Vendan joined #nim |
20:37:50 | * | astocko joined #nim |
20:38:36 | * | euantor joined #nim |
20:41:27 | * | PMunch quit (Ping timeout: 244 seconds) |
20:41:30 | * | Matthias247_ joined #nim |
20:41:54 | * | PMunch joined #nim |
20:43:37 | * | def- quit (Ping timeout: 250 seconds) |
20:43:38 | * | zielmicha joined #nim |
20:43:41 | * | gmpreussner quit (Ping timeout: 240 seconds) |
20:44:05 | * | Sembei joined #nim |
20:44:27 | * | zaquest quit (Ping timeout: 250 seconds) |
20:44:27 | * | kunev_ joined #nim |
20:44:43 | * | michael_campbel- joined #nim |
20:44:47 | * | ftsf__ joined #nim |
20:45:09 | * | kunev quit (Ping timeout: 264 seconds) |
20:45:11 | * | ekarlso_ quit (Ping timeout: 264 seconds) |
20:45:13 | * | ftsf_ quit (Ping timeout: 264 seconds) |
20:45:14 | * | astocko quit (Ping timeout: 264 seconds) |
20:45:14 | * | Vendan quit (Ping timeout: 264 seconds) |
20:45:17 | * | zxtx_ quit (Ping timeout: 264 seconds) |
20:45:31 | * | zaquest_ joined #nim |
20:45:51 | * | ekarlso_ joined #nim |
20:46:24 | * | euantor quit (Ping timeout: 272 seconds) |
20:46:29 | * | gangstacat quit (Ping timeout: 272 seconds) |
20:46:31 | * | michael_campbell quit (Ping timeout: 272 seconds) |
20:46:31 | * | Matthias247 quit (Ping timeout: 272 seconds) |
20:46:32 | * | flyx quit (Ping timeout: 272 seconds) |
20:46:33 | * | cnu- quit (Ping timeout: 272 seconds) |
20:46:38 | * | cyraxjoe quit (Ping timeout: 272 seconds) |
20:46:51 | * | zxtx joined #nim |
20:46:52 | * | def- joined #nim |
20:46:53 | * | flyx joined #nim |
20:46:56 | * | cnu- joined #nim |
20:47:00 | * | Pisuke quit (Ping timeout: 305 seconds) |
20:47:04 | * | gangstacat joined #nim |
20:47:07 | * | gmpreussner joined #nim |
20:47:16 | * | astocko joined #nim |
20:48:36 | * | cyraxjoe joined #nim |
20:50:51 | * | Vendan joined #nim |
20:53:22 | * | zaquest_ is now known as zaquest |
20:53:22 | * | libman quit (Read error: Connection reset by peer) |
20:53:28 | Araq_ | krux02: calling quit instead of performing a 'raise' is much worse |
20:57:52 | * | euantor joined #nim |
21:02:15 | * | niv joined #nim |
21:02:42 | * | sp33dster left #nim ("Might have choked on too many memes") |
21:04:26 | krux02 | Araq_: It's not quit instead of raise, it's quit, because there is no code that handles the exception yet. It's a bit like a failed assert. I wouldn't write any code that handles my failed asserts, I would write code that prevents the assert from failing. But honestly it was not so welll thought through, because eventually one might want to have code that deals with failed asserts. So exceptions are necessary, they are just not someth |
21:04:26 | krux02 | ing that needs to be deald with in normal application code |
21:06:39 | * | libman joined #nim |
21:08:18 | * | beatmox joined #nim |
21:22:44 | * | libman quit (Read error: Connection reset by peer) |
21:24:29 | * | libman joined #nim |
21:29:03 | * | LeNsTR quit (Changing host) |
21:29:03 | * | LeNsTR joined #nim |
21:39:03 | * | brechtm quit (Remote host closed the connection) |
21:39:42 | * | brechtm joined #nim |
21:53:23 | * | M-Quora joined #nim |
21:57:46 | * | yglukhov quit (Remote host closed the connection) |
21:59:21 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:00:06 | * | Jesin quit (Quit: Leaving) |
22:00:30 | * | vqrs quit (Ping timeout: 244 seconds) |
22:00:49 | * | bjz joined #nim |
22:03:05 | * | vqrs joined #nim |
22:03:44 | * | bjz quit (Client Quit) |
22:09:06 | * | yglukhov joined #nim |
22:09:16 | * | couven92 is now known as fredrik92 |
22:09:33 | * | PMunch quit (Quit: leaving) |
22:12:50 | * | TheManiac joined #nim |
22:13:21 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:19:55 | * | krux02 quit (Quit: Verlassend) |
22:20:10 | * | bjz joined #nim |
22:27:15 | * | brson quit (Ping timeout: 276 seconds) |
22:28:53 | * | brson joined #nim |
22:32:10 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:38:22 | * | Jesin joined #nim |
22:45:45 | * | bjz joined #nim |
22:48:38 | * | bjz quit (Client Quit) |
22:51:24 | * | arnetheduck joined #nim |
22:51:51 | * | yglukhov joined #nim |
22:53:12 | * | chemist69 quit (Ping timeout: 244 seconds) |
22:53:36 | * | chemist69 joined #nim |
22:55:33 | * | Demon_Fox joined #nim |
22:56:01 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:59:34 | * | planhths quit (Quit: Konversation terminated!) |
23:05:04 | * | bjz joined #nim |
23:16:16 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:24:03 | * | Matthias247_ quit (Read error: Connection reset by peer) |
23:25:31 | * | nsf joined #nim |
23:32:24 | * | yglukhov joined #nim |
23:33:01 | * | arnetheduck quit (Ping timeout: 272 seconds) |
23:37:27 | * | yglukhov quit (Ping timeout: 276 seconds) |