00:03:33 | * | nuxdie_ joined #nim |
00:03:55 | * | mal``` joined #nim |
00:06:31 | * | nuxdie quit (Ping timeout: 264 seconds) |
00:06:32 | * | mal`` quit (Ping timeout: 264 seconds) |
00:06:33 | * | yglukhov quit (*.net *.split) |
00:06:35 | * | epictek[m] quit (*.net *.split) |
00:06:36 | * | byteflame quit (*.net *.split) |
00:06:37 | * | solitudesf quit (*.net *.split) |
00:06:37 | * | federico3[m] quit (*.net *.split) |
00:06:58 | * | oprypin quit (*.net *.split) |
00:06:59 | * | jxy quit (*.net *.split) |
00:06:59 | * | ldlework quit (*.net *.split) |
00:07:00 | * | girvo quit (*.net *.split) |
00:07:00 | * | cornfeedhobo quit (*.net *.split) |
00:07:00 | * | FromDiscord quit (*.net *.split) |
00:09:47 | * | pqflx3[m] quit (Ping timeout: 245 seconds) |
00:09:47 | * | Demos[m] quit (Ping timeout: 245 seconds) |
00:10:02 | * | marszym[m] quit (Ping timeout: 260 seconds) |
00:10:27 | * | narimiran[m] quit (Ping timeout: 256 seconds) |
00:10:29 | * | Abnegation quit (Ping timeout: 256 seconds) |
00:10:31 | * | xomachine[m] quit (Ping timeout: 260 seconds) |
00:10:31 | * | endes[m] quit (Ping timeout: 260 seconds) |
00:10:31 | * | Jipok[m] quit (Ping timeout: 260 seconds) |
00:10:34 | * | petersjt014[m] quit (Ping timeout: 276 seconds) |
00:10:37 | * | tyrion[m] quit (Ping timeout: 256 seconds) |
00:10:37 | * | hohlerde quit (Ping timeout: 256 seconds) |
00:10:37 | * | zielmicha[m] quit (Ping timeout: 256 seconds) |
00:10:37 | * | macsek1911[m] quit (Ping timeout: 256 seconds) |
00:10:37 | * | sendell[m] quit (Ping timeout: 256 seconds) |
00:10:37 | * | zacharycarter quit (Ping timeout: 256 seconds) |
00:10:37 | * | gh0st[m] quit (Ping timeout: 256 seconds) |
00:10:37 | * | unclechu quit (Ping timeout: 256 seconds) |
00:10:39 | * | libman[m] quit (Ping timeout: 245 seconds) |
00:10:47 | * | sroecker[m] quit (Ping timeout: 260 seconds) |
00:10:47 | * | TheManiac quit (Ping timeout: 260 seconds) |
00:10:47 | * | hitchhooker[m] quit (Ping timeout: 260 seconds) |
00:10:49 | * | Miguelngel[m] quit (Ping timeout: 260 seconds) |
00:10:58 | * | dyce[m] quit (Ping timeout: 260 seconds) |
00:11:02 | * | notdekka[m] quit (Ping timeout: 256 seconds) |
00:11:02 | * | planetis[m] quit (Ping timeout: 256 seconds) |
00:11:11 | * | sg-james[m] quit (Ping timeout: 276 seconds) |
00:11:11 | * | CodeVance quit (Ping timeout: 276 seconds) |
00:11:12 | * | gitterbot[m] quit (Ping timeout: 276 seconds) |
00:15:42 | * | oprypin joined #nim |
00:15:42 | * | jxy joined #nim |
00:15:42 | * | ldlework joined #nim |
00:15:42 | * | girvo joined #nim |
00:15:42 | * | cornfeedhobo joined #nim |
00:15:42 | * | FromDiscord joined #nim |
00:21:12 | krux02 | citycide: for me it seems odd as well |
00:21:21 | krux02 | == should not return an option, ever |
00:21:49 | krux02 | in the pr there you see that I mentioned the PR in my PR. You can see if you like that better. |
00:36:42 | * | BitPuffin quit (Remote host closed the connection) |
00:37:50 | * | dddddd quit (Remote host closed the connection) |
00:40:15 | * | donlzx joined #nim |
00:50:46 | * | pqflx3[m] joined #nim |
01:00:46 | FromGitter | <kayabaNerve> What would you guys think about ResultError becoming a thing? We have ValueError... asking because of this new Errors RFC. TBH, I probably won't do anything, and even I have a very limited use case for it, but I am curious about the masses thoughts. |
01:04:01 | FromGitter | <kayabaNerve> Especially as it would change how user defined errors and force mapping to an existing Exception. I personally use it to stop code that could run forever without erroring, despite being in error (randomly generated values not being able to be used after 10 attempts when it should take one). |
01:06:36 | FromGitter | <kayabaNerve> Out of the newly suggested set, only ResourceExhustedError seems to be close, but that's basing it on the name of the Error and not its purpose (out of RAM). |
01:07:11 | * | hitchhooker[m] joined #nim |
01:07:12 | * | dyce[m] joined #nim |
01:07:12 | * | Connor[m] joined #nim |
01:07:12 | * | federico3[m] joined #nim |
01:07:13 | * | GitterIntegratio joined #nim |
01:07:13 | * | TheKing[m] joined #nim |
01:07:13 | * | codevance[m] joined #nim |
01:07:13 | * | yglukhov[m] joined #nim |
01:07:14 | * | Miguelngel[m] joined #nim |
01:07:14 | * | Demos[m] joined #nim |
01:07:14 | * | zacharycarter[m] joined #nim |
01:07:14 | * | SolitudeSF[m] joined #nim |
01:07:15 | * | unclechu[m] joined #nim |
01:07:57 | * | marszym[m] joined #nim |
01:07:57 | * | TheManiac[m] joined #nim |
01:07:57 | * | narimiran[m] joined #nim |
01:07:57 | * | Jipok[m] joined #nim |
01:07:57 | * | sendell[m] joined #nim |
01:07:57 | * | gh0st[m] joined #nim |
01:07:58 | * | endes[m] joined #nim |
01:07:58 | * | xomachine[m] joined #nim |
01:07:58 | * | planetis[m] joined #nim |
01:07:58 | * | macsek1911[m] joined #nim |
01:07:58 | * | libman[m] joined #nim |
01:07:59 | * | petersjt014[m] joined #nim |
01:07:59 | * | tyrion[m] joined #nim |
01:07:59 | * | sg-james[m] joined #nim |
01:07:59 | * | zielmicha[m]1 joined #nim |
01:07:59 | * | spymasterd[m] joined #nim |
01:07:59 | * | sroecker[m] joined #nim |
01:07:59 | * | Flox[m] joined #nim |
01:08:00 | * | epictek[m] joined #nim |
01:14:35 | * | mwbrown quit (Ping timeout: 240 seconds) |
01:17:07 | * | mwbrown joined #nim |
01:29:31 | FromGitter | <rayman22201> The comments on the rfc describe a solution that allows custom enums to be used as exception types as a more flexible compromise |
01:31:13 | FromGitter | <kayabaNerve> It describes a replacement of the existing system for an enum |
01:31:22 | FromGitter | <kayabaNerve> Ignore that last message |
01:31:50 | FromGitter | <kayabaNerve> I'm referring to the RFC itself; that wasn't my point of conversation though :P Just the concept of a ResultError |
01:32:19 | FromGitter | <rayman22201> oh, ok. sure lol |
01:36:36 | FromGitter | <rayman22201> Are you talking about ResultError being added to the core set of Errors? |
01:36:53 | FromGitter | <rayman22201> or just the idea of a ResultError in general? |
01:38:24 | * | dorelix quit (Ping timeout: 260 seconds) |
01:38:47 | * | donlzx quit (Remote host closed the connection) |
01:38:53 | * | endragor joined #nim |
01:40:48 | FromGitter | <rayman22201> As a concept, it doesn't seem any more clear to me than ValueError. I would probably just use ValueError, or TimeoutError or something. But that's just me. |
01:49:57 | * | dorelix joined #nim |
01:59:59 | * | krux02 quit (Remote host closed the connection) |
02:03:11 | FromGitter | <Quelklef> Yeah @kayabaNerve what exactly would a ResultError be? |
02:03:23 | FromGitter | <Quelklef> I can't find a description anywhere else so I'm assuming it's your design |
02:04:26 | * | endragor quit (Remote host closed the connection) |
02:06:59 | FromGitter | <kayabaNerve> @rayman22201 Core set. |
02:07:09 | FromGitter | <kayabaNerve> @Quelklef An error for not when the input is wrong, but the output is. |
02:07:16 | FromGitter | <kayabaNerve> It's an idea I have I want feedback on. |
02:07:30 | FromGitter | <Quelklef> Can you give a usecase? |
02:08:44 | FromGitter | <kayabaNerve> I use RNG; not all generated numbers are valid; if after 10 attempts... ⏎ ⏎ You try to get info from a web API. That API says you're rate limited. You can't get the data. ResultError |
02:08:58 | FromGitter | <kayabaNerve> You connect to MySQL. Every query results in an unknown error. |
02:09:15 | FromGitter | <kayabaNerve> For when external services fail you |
02:09:34 | FromGitter | <Quelklef> Hmmm, interesting |
02:09:57 | FromGitter | <Quelklef> Sounds like `Option[T]` to me |
02:10:03 | FromGitter | <Quelklef> but as an exception instead |
02:10:28 | FromGitter | <kayabaNerve> I mean, if we follow this rule which only allows X errors and ones derived from it, this doesn't have on to derive from, is little used but makes sense, and matches ValueError |
02:10:35 | FromGitter | <kayabaNerve> *one to derive from |
02:10:56 | FromGitter | <kayabaNerve> Except possibly ResourceExhausted if you go by itss name and not its pupose? |
02:11:19 | FromGitter | <rayman22201> The RNG example is a timeoutError, the web API example is a protocolError, the MySQL is a valueError (or IOError, or what ever broke inside MySQL, that one is a bit generic) |
02:11:24 | FromGitter | <kayabaNerve> And Option[t] is a form of error handling, not a way of saying the error. |
02:11:41 | FromGitter | <kayabaNerve> How is it a timeout? You connected to the RNG and got results. Somehow, none were usable. |
02:11:43 | FromGitter | <Quelklef> @rayman22201 IMO the SQL one should not be a ValueError |
02:12:07 | FromGitter | <kayabaNerve> The API is not a protocol error. They got your valid request. They said not right now. It's a rule/terms of service error. |
02:12:22 | FromGitter | <rayman22201> That sounds like a protocol error to me |
02:12:22 | FromGitter | <kayabaNerve> The SQL one could be a corrupted DB. You could have proper queries and values... |
02:12:46 | FromGitter | <kayabaNerve> @rayman22201 Is it a protocol error if my HTTP request is valid but the server kicks me out for not being logged in? |
02:12:53 | FromGitter | <kayabaNerve> That's a ValueError for not having a cookie. |
02:12:54 | FromGitter | <rayman22201> corrupted DB sounds like an IOError or OSError |
02:13:02 | FromGitter | <kayabaNerve> But that's not a HTTP Protocol error |
02:13:06 | FromGitter | <Quelklef> No, it wouldn't be either I don't think |
02:13:14 | FromGitter | <kayabaNerve> @rayman22201 IO when it happened |
02:13:19 | FromGitter | <kayabaNerve> But the program doesn't know |
02:13:19 | FromGitter | <Quelklef> There'd be valid data on the disk, but it wouldn't make sense to the reader |
02:13:25 | FromGitter | <Quelklef> I like this idea |
02:13:32 | FromGitter | <Quelklef> Sort of |
02:13:42 | FromGitter | <kayabaNerve> @Quelklef My example had an invalid DB MySQL couldn't handle but the program wasn't the cuase |
02:13:46 | FromGitter | <Quelklef> Because I think a ResultError for one function is actually just a ValueError for a nested function |
02:13:56 | FromGitter | <Quelklef> Typically |
02:13:59 | FromGitter | <kayabaNerve> For another part of the program |
02:14:03 | FromGitter | <kayabaNerve> Or another program |
02:14:17 | * | yglukhov[i] joined #nim |
02:14:25 | FromGitter | <Quelklef> Right |
02:14:26 | FromGitter | <kayabaNerve> It's a ValueError that isn't the fault of the program and someone else complained about and the program is forced to deal with. |
02:14:39 | FromGitter | <Quelklef> Nono but do you see my point |
02:14:42 | FromGitter | <Quelklef> Is that |
02:14:57 | FromGitter | <kayabaNerve> Also, possibly logins. An invalid password causing a failed login is technically a string but a incorrect value but the program doesn't know. That is either way. |
02:15:04 | FromGitter | <Quelklef> I think these kinds of things are already going to be raised and bubble up, as ValueErrors. All a ResultError would do would be to wrap a ValueError in the API |
02:15:12 | FromGitter | <rayman22201> Honestly this is all bikeshedding. There will never be the perfect finite set of error enums. Error codes are like ice cream flavors, every library author has a preference. This is why the modification to the RFC described in the comments is important. Allow the library author to define their own Error Set where appropriate. |
02:15:16 | FromGitter | <kayabaNerve> Eh. That's also a possibility. I like that |
02:15:23 | FromGitter | <Quelklef> Well my point is that's dumb |
02:15:32 | FromGitter | <Quelklef> Well, maybe |
02:15:32 | FromGitter | <Quelklef> hm |
02:15:42 | FromGitter | <Quelklef> OK, here's my opinion: |
02:15:46 | FromGitter | <kayabaNerve> What if we ignore that for the RFC? I put this out there not for a plan, but for reviews and thoughts |
02:15:48 | FromGitter | <Quelklef> ResultError should exist, and not be a fatal error |
02:15:53 | FromGitter | <kayabaNerve> We can agree it's worth debating |
02:16:04 | FromGitter | <Quelklef> Because if it's a fatal error, it's nearly useless |
02:16:08 | FromGitter | <kayabaNerve> Agreed |
02:16:15 | FromGitter | <Quelklef> but if it's recoverable, then it serves a possibly useful part of an API |
02:16:25 | FromGitter | <Quelklef> Especially for connection type stuff like you've given |
02:16:37 | FromGitter | <Quelklef> I think the web API example is the most enticing one |
02:18:03 | FromGitter | <rayman22201> I don't think it's necessary, but like I said, ice cream flavors... |
02:18:33 | FromGitter | <Quelklef> Well, exceptions aren't necessary, either ;-) |
02:18:49 | * | yglukhov[i] quit (Ping timeout: 260 seconds) |
02:18:58 | FromGitter | <rayman22201> The problem with ResultError, is that it's too generic. It adds no clarity at all. |
02:19:16 | FromGitter | <Quelklef> I don't agree |
02:19:17 | FromGitter | <rayman22201> ValueError is pretty generic as well, but there is precedent for it. |
02:19:32 | FromGitter | <Quelklef> It can be reified quite well as: "ResultError: the call made was valid, but was unable to be completed for some reason" |
02:19:37 | FromGitter | <kayabaNerve> @rayman22201 It's just as generic as ValueError |
02:19:38 | FromGitter | <Quelklef> And then that can be extended somehow |
02:19:48 | FromGitter | <Quelklef> It's like a StateError |
02:19:55 | FromGitter | <Quelklef> Which already exists in some languages IIRC |
02:20:05 | FromGitter | <rayman22201> if a computation returns an unexpected result, that is more like a bug than an Error, which the RFC is specifically considering a non issue |
02:20:14 | FromGitter | <Quelklef> No, that's the point |
02:20:21 | FromGitter | <Quelklef> That ResultError would not be fatal |
02:20:50 | FromGitter | <Quelklef> It's not a bug and it should be handled |
02:20:58 | FromGitter | <Quelklef> Just *perhaps* not with this function, maybe with the main loop |
02:21:10 | FromGitter | <Quelklef> I think the usecase would fit well with the stack unwinding of exceptions |
02:21:24 | FromGitter | <Quelklef> Shit, I need to learn about Lisp exception handling... |
02:21:32 | FromGitter | <Quelklef> I've been meaning to do that for like 6 months |
02:21:35 | FromGitter | <rayman22201> that's a rabbit hole... |
02:21:44 | FromGitter | <Quelklef> Lisp exception handling? |
02:21:49 | FromGitter | <rayman22201> yeah |
02:22:01 | FromGitter | <Quelklef> I've heard it's more elegant and better than anything else out there |
02:22:10 | FromGitter | <Quelklef> I get the feeling Araq would disagree but hey |
02:22:16 | FromGitter | <Quelklef> I should see it for myself, eh? |
02:22:25 | FromGitter | <Quelklef> Or not exceptions, "conditions and restarts" |
02:22:33 | FromGitter | <rayman22201> I would probably side with Araq on that one, but definitely see for yourself |
02:22:40 | FromGitter | <rayman22201> Continuations are super interesting |
02:22:50 | FromGitter | <Quelklef> Oh no |
02:22:57 | FromGitter | <Quelklef> Am I gonna have to revisit `call/cc` and co. |
02:22:59 | FromGitter | <Quelklef> ? |
02:23:29 | FromGitter | <rayman22201> It's been a while, but I believe so |
02:23:37 | FromGitter | <Quelklef> Oh boy |
02:23:44 | FromGitter | <Quelklef> This should keep me occupied for a while.. |
02:23:51 | FromGitter | <rayman22201> :-P |
02:24:01 | FromGitter | <rayman22201> stack trampolines for days! |
02:24:13 | FromGitter | <Quelklef> wheeeeeEeeEEeee! |
02:25:54 | FromGitter | <kayabaNerve> It's as generic as value error; it has use cases; it shouldn't ever be fatal. That's like saying if ARR[1] is ever not "a", crash the entire program (a resource returned an unexpected value for a valid request). |
02:28:03 | FromGitter | <rayman22201> none of the Errors I was using as examples where the fatal kind. Those were all from the recoverable list |
02:28:04 | FromGitter | <Quelklef> Hmmm |
02:28:20 | FromGitter | <Quelklef> You know, whether or not an error should be recoverable seems like it depends on context |
02:28:37 | FromGitter | <Quelklef> Should an IOError be recoverable in a data crunching app? probably not |
02:28:48 | FromGitter | <Quelklef> In a file explorer? Abso-fucking-lutely |
02:29:01 | FromGitter | <rayman22201> Well, that's debatable as well. But from a practical / performance standpoint you have to draw a line. Which Araq very clearly does in the RFC |
02:29:19 | FromGitter | <Quelklef> I mean |
02:29:25 | FromGitter | <Quelklef> do you have to draw it language-wide? |
02:30:00 | FromGitter | <Quelklef> I don't know if it's possible, but making a compiler flag for it seems perhaps meritful |
02:30:06 | FromGitter | <rayman22201> You do, at least partially, because the core runtime and libraries will use those Error classes, and thus bubble up to everything above it |
02:31:03 | FromGitter | <Quelklef> hmm |
02:31:24 | FromGitter | <Quelklef> I think we've reached a point where I don't technically understand the RFC enough to continue |
02:31:27 | FromGitter | <Quelklef> oh, well :\ |
02:31:29 | FromGitter | <rayman22201> part 2 of this comment: https://github.com/nim-lang/Nim/issues/8363#issuecomment-406189955 |
02:32:25 | FromGitter | <Quelklef> nnn |
02:32:49 | FromGitter | <rayman22201> Technically, there as an escape hatch in the RFC though. The supervisor idea is super interesting. And actually very similar to lisp "restart" error handlers, and more directly Erlang. |
02:32:50 | FromGitter | <Quelklef> You know, I'm fine with IndexError being fatal if checking for permission rather than forgiveness is the superior paradigm |
02:33:03 | FromGitter | <Quelklef> But I don't know if it is, and I'm so used to asking for forgiveness from Python |
02:33:17 | FromGitter | <Quelklef> Yeah, I saw the supervisor, but couldn't understand it |
02:33:40 | FromGitter | <rayman22201> Basically, it's an exception handler for the fatal errors |
02:33:53 | * | FromGitter * rayman22201 hand waves |
02:34:01 | FromGitter | <rayman22201> kind of :-P |
02:34:12 | FromGitter | <Quelklef> No, I got that |
02:34:15 | FromGitter | <Quelklef> I don't get the implementation |
02:34:21 | FromGitter | <Quelklef> I'm not sure I want to yet, haha |
02:34:25 | FromGitter | <rayman22201> lol |
02:34:56 | FromGitter | <rayman22201> have to go eat dinner. brb |
02:35:22 | FromGitter | <kayabaNerve> @Quelklef That's why error handling exists |
02:35:32 | FromGitter | <Quelklef> What is |
02:38:19 | FromGitter | <kayabaNerve> FileExplorer IO Error not being fatal but yes in other casess |
02:38:56 | FromGitter | <Quelklef> Was your statement as in "that's why try/except exists", or "that's why shield: exists"? |
02:39:29 | FromGitter | <kayabaNerve> I think the first? |
02:39:42 | FromGitter | <Quelklef> But IOError is (IIRC) fatal, and can't be caught |
02:39:50 | FromGitter | <kayabaNerve> Or is the comment IOError is guaranteed to crash no matter what? |
02:39:54 | FromGitter | <kayabaNerve> Got it. |
02:40:00 | FromGitter | <Quelklef> It can be caught with shield; fatal errors *may* be caught, but they're not generally supposed to be |
02:40:03 | FromGitter | <kayabaNerve> That seems iffy |
02:40:18 | FromGitter | <Quelklef> My point is just that the RFC makes a division line which should perhaps not be so concrete as it is |
02:40:28 | FromGitter | <Quelklef> As IMO it's domain-dependent and Nim is a general-purpose programming language |
02:42:49 | * | endragor joined #nim |
02:42:54 | FromGitter | <Varriount> @rayman22201 The main problem I have with the proposal is extensibility. If I have a database wrapper, how do I differentiate between a connectivity error and an authentication error? |
02:50:45 | * | endragor quit (Remote host closed the connection) |
02:51:44 | * | dorelix quit (Ping timeout: 276 seconds) |
03:01:24 | FromGitter | <kayabaNerve> @Varriount Because the DB won't respond with the first? |
03:01:50 | FromGitter | <kayabaNerve> it would respond to the second. What if everything is fine except for a single table though in a DB you have permissions over? |
03:02:04 | FromGitter | <kayabaNerve> Unknown error despite you having valid values. |
03:12:14 | * | ftsf joined #nim |
03:14:01 | * | dorelix joined #nim |
03:20:41 | skrylar | Quelklef: i think its a matter of how exceptions that may never arise in production are to be handled |
03:21:04 | FromGitter | <Quelklef> I disagree |
03:21:06 | skrylar | it gets sticky because if you rely on catching an index error to do some behavior, that check may not exist in a -d:release |
03:21:16 | FromGitter | <Quelklef> Right |
03:21:19 | FromGitter | <Quelklef> Well, that's not so bad |
03:21:31 | FromDiscord | <awr> just found something curious with `when` and checking if a type is a proc |
03:21:33 | FromGitter | <Quelklef> just transform all `try X except IndexError` into `if inRage: X` |
03:21:38 | skrylar | it does lead you to an expectation that catch will handle an error that never throws |
03:22:04 | FromDiscord | <awr> `when x is proc:` fails to compile but `when (x is proc):` does |
03:22:31 | FromGitter | <Quelklef> ok wait im distracted i cant hold convo right now |
03:23:05 | * | arecacea1 quit (Remote host closed the connection) |
03:23:29 | * | arecacea1 joined #nim |
03:25:27 | skrylar | i will be happier when the days of json bytecode are over. |
03:29:29 | * | endragor joined #nim |
03:38:28 | ftsf | hmm is there a way with re module or similar to replace text with the output of a function that's passed the original string? |
03:39:00 | ftsf | eg. replace '#include "foo.inc"' with readFile($1) |
03:40:42 | ftsf | obviously re is the wrong tool for that specific job, but curious about general text replacement with a function |
03:43:39 | skrylar | like, at compile time? |
03:45:19 | ftsf | at runtime |
03:46:56 | ftsf | i'm reading a file into a string, then i want to modify that string, (context: preprocessing GLSL when loading into a shader) |
03:50:33 | ftsf | ahh just found nre module, looks like that supports it |
03:59:34 | * | xylef quit (Quit: WeeChat 2.2) |
04:10:35 | * | xylef joined #nim |
04:24:04 | skrylar | i took a first stab at the SOAP stuff https://github.com/Skrylar/Soapstone |
04:40:09 | skrylar | it's actually not that much different from anything else, although there are.. ambiguous ways of expressing certain constructs in xml |
05:08:02 | * | amosbird quit (Read error: Connection reset by peer) |
05:08:33 | * | amosbird joined #nim |
05:21:55 | * | nsf joined #nim |
05:24:01 | * | miran joined #nim |
05:31:29 | * | Vladar joined #nim |
05:36:17 | skrylar | so scgi looks neat. |
05:36:53 | skrylar | hot take: "no, [caddy] won't support scgi because REASONS" ffs. its even easier to support than fastcgi, what the crap is the problem |
05:37:01 | FromGitter | <rayman22201> @gogolxdong will be happy about this |
05:37:29 | FromGitter | <rayman22201> @Varriount poke? |
05:37:36 | FromGitter | <rayman22201> you around |
05:37:41 | FromGitter | <rayman22201> ? |
05:37:50 | skrylar | oh he was doing AWS stuff |
05:37:56 | skrylar | for some reason i thought he was doing vmware stuff |
05:38:21 | FromGitter | <rayman22201> I think he was doing both? |
05:38:53 | FromGitter | <rayman22201> or I'm just confused |
05:40:57 | skrylar | i dunno. but i miss the days when nginx docs weren't full of "oh yeah half these features are proprietary :D" |
05:42:51 | FromGitter | <rayman22201> oh really? It's been a long time since I've played with nginx... or web servers for that matter |
05:43:16 | skrylar | they went commercial and so the docs are full of mentions of the commercial edition |
05:43:42 | skrylar | it's mostly caching/proxy stuff that can be done with varnish or haproxy, but you can pay for the privilegeo f losing the source code |
05:44:00 | FromGitter | <rayman22201> I can't say I blame them for cashing in. lol |
05:44:09 | * | yglukhov[i] joined #nim |
05:44:15 | skrylar | well elastic is curious |
05:44:26 | skrylar | elasticsearch decided to open source their xpack stuff but its still technically commercial |
05:44:52 | skrylar | they said that it was unfair for a supposedly OSS reliant company to pull the rug out from under you just because you want to pay to use extra stuff |
05:45:20 | skrylar | afaik nginx (and a lot of other OSS/"Pro" projects) you either get the source for one, or no source but some addon features, unless you pay even more :\ |
05:45:35 | skrylar | although caddy technically requires a license to use the binaries >.> |
05:45:47 | skrylar | i mean its not that hard to build them yourself, so its kind of amusing |
05:46:11 | FromGitter | <rayman22201> Yeah. It's a weird model. But from a business perspective I kind of get it. |
05:46:40 | skrylar | its sort of necessary because investors want it and businesses tend not to be willing to be reasonable |
05:46:49 | skrylar | i mean nginx is deserving of being paid, i just don't believe in subscriptions |
05:48:15 | * | yglukhov[i] quit (Ping timeout: 244 seconds) |
05:48:58 | skrylar | there's always the pipe dream that you follow the Babylon model where you pay back some percentage of income to the community of workers that made your own work possible (ex. richest man in babylon talks about keeping 10% of total income for your personal savings for investments, and another 10% for "charity and gifts") |
05:49:16 | skrylar | although with the way a lot of laws and corporate boards get set up, they see anything that isn't a license cost as embezzlement |
05:50:25 | skrylar | which is weird because it costs less (collectively) to hire someone to ex. fix parts of GIMP than it does to keep renting photoshop every month |
05:50:47 | FromGitter | <codenoid> hi all |
05:50:49 | FromGitter | <codenoid> i love you |
05:50:50 | FromGitter | <codenoid> <3 |
05:50:54 | skrylar | helloes |
05:51:02 | FromGitter | <codenoid> <3 |
05:52:26 | skrylar | dreading the eventual gtk4 release |
05:52:38 | skrylar | i'm not sure gtk 1 -> 2 -> 3 has accomplished much more than bit rot |
05:53:11 | FromGitter | <Varriount> @rayman22201 I'm here. |
05:53:18 | FromGitter | <rayman22201> yay |
05:53:33 | FromGitter | <rayman22201> lets get you some working doc search shall we? |
05:54:16 | FromGitter | <rayman22201> if you are up for it |
05:55:25 | FromGitter | <Varriount> I honestly don't know what the problem is. The search functionality sends out a request for the index and gets a response. |
05:56:54 | FromGitter | <rayman22201> anything weird show up in the console? |
05:57:00 | FromGitter | <Varriount> Nope. |
05:57:21 | FromGitter | <rayman22201> hrmm... |
05:58:11 | FromGitter | <rayman22201> time for some print statement debugging. Can you add an echo to the top of the fuzzyMatch function to see if it even gets called? |
05:58:43 | FromGitter | <Varriount> It does get called. |
05:58:54 | FromGitter | <rayman22201> side note... this is why I want to get that JS sourcemaps PR working in the near future |
05:59:07 | FromGitter | <Varriount> However the input to the function is only ever nulls |
05:59:16 | FromGitter | <rayman22201> interesting |
05:59:32 | FromGitter | <codenoid> i use nim for osint application, and it's work pretty damn cool |
06:01:05 | FromGitter | <rayman22201> can you open the "theIndex.html" directly and see if it has the "data-doc-search-tag" attribute on the li elements? |
06:01:42 | FromGitter | <rayman22201> other question, what browser are you using? |
06:01:46 | FromGitter | <Varriount> Chrome. |
06:01:58 | FromGitter | <codenoid> nim is pretty cool |
06:02:02 | FromGitter | <codenoid> i wanna be nim boyfriend |
06:03:24 | FromGitter | <rayman22201> my primary browser is FF, but Chrome should have no issues with data attribute tags... |
06:06:22 | FromGitter | <Varriount> No, there are no data-doc-attribute tags anywhere in the source for 0.18.1/theindex.html |
06:06:57 | * | miran quit (Ping timeout: 264 seconds) |
06:07:04 | FromGitter | <Araq> @rayman22201 the source maps PR can be cleaned up by anybody ;-) *hint* |
06:07:16 | FromGitter | <rayman22201> I know! It's my next project! |
06:07:27 | FromGitter | <rayman22201> I just need to make some time to do it |
06:08:33 | FromGitter | <rayman22201> @Varriount *red neck mechanic voice* "There's your problem!" |
06:09:49 | FromGitter | <rayman22201> you used koch web to build the docs? |
06:10:08 | FromGitter | <Varriount> Yes. |
06:11:21 | FromGitter | <rayman22201> weird... I modified the rstgen.nim to add those attributes... Did you rebuild the compiler from the PR source to pick up the changes to rstgen.nim? |
06:11:54 | FromGitter | <Varriount> Hm, that might be my issue. |
06:13:40 | FromGitter | <rayman22201> Yeah. I tried to get away with not messing with the compiler itself, but it was either a small change to the doc generator, or a massive amount of ugly code on the JS side |
06:37:22 | * | xylef quit (Quit: WeeChat 2.2) |
06:41:06 | * | xylef joined #nim |
06:49:26 | * | BitPuffin joined #nim |
06:50:09 | * | Jesin quit (Ping timeout: 248 seconds) |
06:53:45 | FromGitter | <Araq> can you explain why it was required? |
06:54:43 | FromGitter | <Araq> I wonder why stuff like `<tag id = "foo>` needs ever more html stuff in order for css/js to work |
06:55:05 | FromGitter | <rayman22201> Well, it's a hack. But a slightly cleaner hack than the alternative. |
06:55:39 | FromGitter | <Araq> mind to share some details? |
06:56:54 | FromGitter | <rayman22201> the js search originally pulled elements with the class "reference external". In the rst-generator.nim code this mapped to stdlib api defintions that were exported and nothing else. |
06:57:27 | FromGitter | <rayman22201> The problem is that is only a small subset of the information contained in the index |
06:58:09 | FromGitter | <Araq> ah ok. |
06:58:19 | FromGitter | <rayman22201> Since the fuzzy match allows for a more intuitive search, I wanted to allow for more of the manual to be searched. |
06:59:25 | FromGitter | <rayman22201> The problem is, the fuzzy match was designed to search on the link text for exposed api calls. which follow a specific format. "module : function signature" |
06:59:52 | FromGitter | <Araq> I dunno why my search is bad. I designed it for Nim, back then. |
07:00:13 | FromGitter | <Araq> (so that you can search for += ) |
07:00:26 | FromGitter | <rayman22201> other parts of the manual don't have that. So I fudged it by creating a new attribute that was "heading : subsection" which is more general |
07:01:34 | FromGitter | <rayman22201> it amounts to creating a normalized "search tags" that allow for uniform matching code across everything |
07:02:15 | FromGitter | <rayman22201> You can search for "+=", but searching for "exec" does not show very relevant results. |
07:02:26 | * | amosbird quit (Quit: ZNC 1.6.5 - http://znc.in) |
07:02:38 | FromGitter | <Araq> ha, let me see about that |
07:02:46 | FromGitter | <rayman22201> and the latter is the more common use case, especially for new people looking through manual |
07:03:02 | FromGitter | <rayman22201> lol. I did say it was subjective |
07:03:17 | FromGitter | <Araq> returns valid hits, sadly nothing from osproc |
07:03:34 | FromGitter | <rayman22201> Your search isn't bad, I just thought it could be improved :-P |
07:03:51 | FromGitter | <Araq> what can't. ;-) |
07:04:22 | FromGitter | <Araq> btw I imported angliokala and its search was shit, so I wrote my own. |
07:04:32 | FromGitter | <rayman22201> lol. impossible! |
07:05:17 | FromGitter | <rayman22201> I also wanted an excuse to implement a fuzzy match algorithm. It seemed like a fun thing to do, and this seemed like a useful contribution. |
07:06:10 | FromGitter | <rayman22201> I have never heard of angliokala, but I believe you that it is terrible. It has a terrible name |
07:08:00 | FromGitter | <Araq> lol, I don't remember the correct name. |
07:08:38 | FromGitter | <narimiran> algolia? |
07:08:50 | FromGitter | <Araq> probably. |
07:09:41 | FromGitter | <rayman22201> lol. Still seems terrible |
07:10:05 | * | yglukhov[i] joined #nim |
07:10:22 | FromGitter | <Araq> I also use "muslimC" instead of "musl-c" or whatever it's called |
07:11:13 | FromGitter | <rayman22201> hahaha...unintentional politics joke? |
07:11:34 | * | amosbird joined #nim |
07:11:34 | * | amosbird quit (Max SendQ exceeded) |
07:12:08 | * | amosbird joined #nim |
07:12:17 | FromGitter | <Araq> definitely unintentional. |
07:14:17 | FromGitter | <rayman22201> I spent months trying to get Apache Lucene to index and search a website probably and ended up throwing it out the window... These pre-made search systems are all crap. |
07:15:32 | FromGitter | <rayman22201> Much sorrow drowned in beer and whiskey over that project.... |
07:16:09 | FromGitter | <Araq> sounds familiar. and then you get complaints about a NIH syndrome |
07:18:04 | FromGitter | <rayman22201> Indeed |
07:30:54 | * | Yardanico_ joined #nim |
07:32:27 | * | Yardanico quit (Ping timeout: 276 seconds) |
07:32:27 | * | Yardanico_ is now known as Yardanico |
07:32:27 | * | dvn quit (Ping timeout: 276 seconds) |
07:34:10 | skrylar | rayman22201: try elastic or solr |
07:34:19 | skrylar | lucene wasn't meant to be a search server |
07:34:51 | FromGitter | <Varriount> Isn't the setup ELK - Elasticsearch, Logstash, Kibana? |
07:34:55 | skrylar | Also if you want to be cheeky, Postgres will do the job (yes, fkin postgres is a fulltext god) |
07:35:16 | FromGitter | <Varriount> skrylar: Postgres is amazing. |
07:35:35 | FromGitter | <Varriount> I fully expect it to be able to make french fries for me at some point. |
07:36:10 | skrylar | http://rachbelaid.com/postgres-full-text-search-is-good-enough/ |
07:36:30 | skrylar | Postgres will basically carry your sorry ass up until you can no longer fit all the data on a single node (then you're boned) |
07:37:03 | skrylar | although theres one or two companies that have sharding, and there's slony, but i dunno anything about them |
07:37:30 | skrylar | i was reading about jsonb and i am now mind boggled that postgres is even eating mongodb's lunch |
07:38:43 | skrylar | cockroachdb is worth watching, it seems. they are suffering performance-wise, but i think the cluster/sharding stuff is built in and they have geo-zones for GDPR/Russia/China gating nonsense |
07:40:55 | skrylar | they also offer all their 'pro' features in the source builds, so i wish them all the best |
07:41:42 | * | skrylar has never really done much with the big data frameworks like hadoop and whatever. they seem neat, i guess? always hear people moan about them tho |
07:43:50 | skrylar | but yes, the short interjection to varriount and rayman22201's issue is probably shove it on postgres (article relevant) because from what i've been able to read, it performs well as a search server until your needs become too weird |
07:44:27 | skrylar | and now that jsonb is a thing, your needs can probably be 'very weird' before lucene (solr/elastic's engine)'s nosql stuff is worthwhile |
07:46:33 | * | floppydh quit (Remote host closed the connection) |
07:46:56 | skrylar | there is also this weird shit by the tokyocabinet guy http://fallabs.com/hyperestraier/index.html |
07:47:16 | FromGitter | <Varriount> skrylar: Don't forget Splunk (if you have the money). |
07:47:26 | * | floppydh joined #nim |
07:47:47 | skrylar | i have no money :> |
07:48:19 | FromGitter | <Varriount> You sure you don't have a few thousand on hand? |
07:48:58 | skrylar | i have zero income and less than a hundred dollars in storage |
07:49:13 | FromGitter | <Varriount> :O |
07:49:17 | FromGitter | <Varriount> Are you ok? |
07:49:41 | skrylar | i have a place to live, and it has food in it |
07:50:43 | FromGitter | <kayabaNerve> How can I get the max supported value of the standard int type? |
07:51:02 | skrylar | doesn't int.max or int.high do that |
07:51:39 | FromGitter | <kayabaNerve> Thanks |
07:52:23 | skrylar | reading some stuff about git-lfs and s3 storage. have been curious about minio |
07:53:04 | skrylar | also slightly amused by these very tiny tools that almost do the same jobs as huge ones (fossil v. git, kak v. vimacs) |
07:54:12 | FromGitter | <Varriount> Who knows, perhaps 20 years down the line fossil will replace git. |
07:54:28 | skrylar | i doubt it |
07:54:34 | skrylar | although we need a good non-dvcs |
07:55:07 | FromGitter | <Varriount> What advantages does a centralized VCS have over a distributed one? |
07:55:20 | skrylar | doing multimedia work is a pain because coders get this whole huge selection of hg/git/fossil/darcs/rm-rf, artists have ... well, svn still? |
07:55:52 | skrylar | by non-vcs i mean for storing art assets |
07:56:00 | skrylar | git is absolutely bad at it |
07:56:29 | skrylar | art assets generally don't diff at all, or if they did they require specific differs, and nobody really cares except perforce |
07:56:39 | skrylar | they are also huge |
07:57:27 | FromGitter | <rayman22201> Sorry. Fell asleep there. This was years ago and we did use Solr which is built on top of Lucerne. Postgress is what I finally convinced them to do and it was great |
07:57:37 | FromGitter | <rayman22201> Well much better |
07:57:48 | FromGitter | <Varriount> skrylar: How about we all use Sharepoint. :D |
07:58:23 | skrylar | i have internet ptsd from sharepoint |
07:58:49 | skrylar | family used to have one of those high paying IT jobs but he was always shitty to everyone; wanted them all to use sharepoint no matter what |
07:59:03 | FromGitter | <Varriount> Ugh. |
07:59:05 | skrylar | i tried sharepoint on a demo machine and performance for simple tasks was awful |
07:59:15 | skrylar | he said "well it was running on a low end laptop so thats why" |
07:59:23 | FromGitter | <Varriount> My experience with Sharepoint is that it's great if set up for very specific tasks. |
07:59:29 | skrylar | but i ran owncloud off a desktop and it ran just fine? :| |
07:59:57 | FromGitter | <Varriount> EG: Hosting intranet sites and highly structured projects. |
08:00:09 | skrylar | git-lfs is a neat protocol it just should be attached to a standalone thing probably |
08:00:50 | FromGitter | <rayman22201> I agree about git-lfs |
08:01:15 | skrylar | well it only interacts with git as much as annex does, (that is, storing shims) |
08:01:19 | FromGitter | <rayman22201> @Varriount did you get the search working? |
08:01:59 | skrylar | you would need to use things like borg/rsync's rolling checksum bins instead of line deltas, and/or the zsync protocol |
08:02:32 | FromGitter | <rayman22201> Yeah. It's a neat idea, but almost defeats the purpose of git decentralization |
08:03:09 | skrylar | i don't find the decentralization useful most of the time |
08:03:23 | skrylar | there are rare cases i need to go in to the history very far |
08:04:36 | FromGitter | <Varriount> Hrm, how am I supposed to install a version of Nim from another repo using choosenim |
08:04:47 | Yardanico | you are not supposed to do that :P |
08:05:30 | FromGitter | <rayman22201> Lol. I just kept my fork in a side directory away from choosenim |
08:05:55 | FromGitter | <rayman22201> Cheating but it works |
08:06:04 | skrylar | hrm |
08:06:23 | skrylar | this is now a vaguely interesting problem, although i don't think anyone cares about the solution (the people who care that hard just buy perforce licenses) |
08:07:25 | FromGitter | <rayman22201> The decentralization problem is not about history, it's about being able to independently make changes and merge them with out locking files |
08:07:25 | skrylar | git-annex is almost that, but they don't version the files |
08:07:45 | skrylar | well, you .. can't do that with a lot of files? |
08:08:02 | skrylar | ora's aren't diffable sanely |
08:08:22 | skrylar | okay technically you CAN diff an ora if you tear it out of the zip enclosure and compare individual png blocks |
08:08:27 | FromGitter | <rayman22201> It works real well with code! Which is why git works so well for that usecase |
08:08:41 | FromGitter | <rayman22201> Unfortunately art assets and large files have very different properties |
08:09:00 | skrylar | the thing that i've been pondering and seeing is that art assets need versioning too but the tools don't exist (or only exist in super expensive forms) |
08:09:02 | FromGitter | <rayman22201> Although arguably git is crap too |
08:09:13 | skrylar | git is crappily built but is not crap |
08:09:49 | FromGitter | <rayman22201> Merge conflicts? Three way merge. Bad |
08:10:45 | FromGitter | <rayman22201> The idea is good. Patches are good. Git is meh. It's just popular |
08:11:22 | FromGitter | <rayman22201> See pijul for an interesting alternative with better theoretical foundation based on patch sets and gadts |
08:11:48 | skrylar | fossil would be great, but the maintainer is opinionated against adding things like rebase or branch merges |
08:12:09 | skrylar | you can't just like, selectively merge someone else's repo full of shit in to yours by just taking one feature branch |
08:12:41 | skrylar | "hurr must have whole dev history even mistakes" that would be fine if it was just the mistakes, but i also have to take EVERY branch they didn't make specifically nonpropagating |
08:12:45 | * | PMunch joined #nim |
08:13:48 | FromGitter | <rayman22201> That's the thing. Patches are all that matters. Every body talks about vcs as a history tool but it really is a code sharing tool. |
08:14:37 | FromGitter | <rayman22201> If we just cared about backups and versioning we could use file versions or databases. |
08:14:46 | FromGitter | <rayman22201> Tldr I agree with you |
08:15:35 | skrylar | well i think its probably fine to keep that history available but git doesn't have the concept of windowing |
08:15:49 | skrylar | "i only care about the head and two releases back" |
08:16:00 | skrylar | its either full history or one checkout or get fucked |
08:16:23 | FromGitter | <rayman22201> Anyway. For art / binary / big files. Yeah. Sucks but all the good solutions are proprietary. It's because most of the people that care about big files have lots of money. |
08:16:28 | skrylar | i think probably the large file vcs is solved and it just requires someone to collate the papers and then suffer through implementing them |
08:16:32 | FromGitter | <Varriount> What about a sparse checkout? |
08:17:04 | skrylar | ex. borg is just using the rsync algorithm with a trick |
08:17:10 | FromGitter | <rayman22201> Honestly, aws S3 solves the big file problem |
08:17:20 | FromGitter | <Varriount> @rayman22201 How did you deal with compiling the new nim compiler? |
08:17:40 | skrylar | rayman22201 through apis, and a single host (i'm aware s3 clones exist) |
08:17:48 | FromGitter | <Varriount> Mine gives `Error: module names need to be unique per Nimble package; module clashes with ./nim-better-docs/compiler/pluginsupport.nim` |
08:18:00 | skrylar | although reading minio and ceph's s3 frontends and some git-lfs stuff for s3 is what started the mind voyage |
08:18:01 | FromGitter | <Varriount> When using `koch boot` |
08:18:22 | FromGitter | <rayman22201> @Varriount I did not get that error |
08:19:41 | FromGitter | <rayman22201> Oh. Use the local kock |
08:19:43 | FromGitter | <rayman22201> Koch |
08:19:47 | skrylar | > kock |
08:19:52 | * | skrylar chortles |
08:20:01 | FromGitter | <Varriount> You mean, the one that is used by the system Nim? |
08:20:07 | FromGitter | <rayman22201> Damnit. Worst possible typo |
08:20:23 | FromGitter | <rayman22201> No. The one inside the pr repo |
08:22:00 | FromGitter | <rayman22201> Either that or nimble is coming from your path and is confusing the pr nim directory with the system nim directory? I'm guessing |
08:22:39 | FromGitter | <rayman22201> In which case temporarily remove nimble from your path? |
08:22:43 | skrylar | I guess all it really needs is to buzhash binary files in to chunks (borg does it), map artifact id's to a list of chunks, map commits to a list of artifacts and a parent, and then just slap on a configurable backend and some stable ftp code :ponders: |
08:23:40 | skrylar | fossil does this and handles what they call 'forks' where history can diverge in to branches and it just stores the endpoints as "leaves" |
08:23:57 | skrylar | so if two people do non-compatible commits, you get forks instead of merge errors |
08:24:10 | FromGitter | <rayman22201> And maybe we should ask @dom96 and/or create an issue on the nimble repo for dealing with pr branches with nimble? |
08:26:01 | FromGitter | <rayman22201> @skrylar you have to merge / choose eventually though |
08:26:16 | FromGitter | <rayman22201> Can't be forks forever |
08:26:22 | skrylar | true but for art files that has to be done by hand regardless |
08:27:01 | FromGitter | <rayman22201> Which is why the centralized model of locking files is probably better for art assets |
08:28:57 | skrylar | didn't people hate the locked file workflows |
08:29:07 | FromGitter | <rayman22201> As an artist, I'm unlikely to be painting the same texture as another artist, and if I am, It's because I'm using the texture in another part of the pipeline (modeling / lighting for example) and it's read only |
08:29:20 | FromGitter | <rayman22201> That's what the pros do for art pipelines |
08:30:09 | FromGitter | <rayman22201> Programmers hate locked work flows. Artists loved it |
08:33:26 | FromGitter | <gogolxdong> I found this http://techgenix.com/vmware-rest-api/ and this http://techgenix.com/soap-vs-rest-vmware-environments/ |
08:34:02 | FromGitter | <rayman22201> @skrylar http://www.alienbrain.com/ |
08:37:38 | skrylar | i just saw that page |
08:37:53 | skrylar | there was a hackernews that mentioned them and also said there are few artists happy with their bin managers |
08:38:24 | FromGitter | <rayman22201> @gogolxdong it looks like you can use the rest api and it may be much easier. |
08:42:06 | FromGitter | <Varriount> @rayman22201 The generated index still doesn't have data-doc-attribute tags |
08:42:36 | FromGitter | <Varriount> Nor can I find "data-doc-attribute" using `grep -r` in the downloaded repo |
08:43:22 | skrylar | soap is actually not so bad, it's rest+xml instead of rest+json |
08:44:14 | skrylar | although i put some notes in the soapstone repo; xml has some freedom of choice issues |
08:45:01 | FromGitter | <rayman22201> https://github.com/nim-lang/Nim/pull/8260/files |
08:45:07 | skrylar | am quite satisfied with CBOR, but meh |
08:45:19 | FromGitter | <rayman22201> @Varriount first file |
08:45:44 | skrylar | (cbor is basically msgpack, but as a standardized rfc and better handling of unknown data types) |
08:46:12 | skrylar | like in msgpack and protobuf you only have blobs, whereas cbor allows you to slap a type id on values |
08:46:54 | FromGitter | <rayman22201> @Varriount it's "data-doc-search-tag" |
08:52:41 | * | amosbird_ joined #nim |
08:53:44 | * | amosbird quit (Ping timeout: 256 seconds) |
08:55:15 | * | yglukhov[i] quit (Remote host closed the connection) |
08:58:58 | FromGitter | <Varriount> "Error: system module needs: nimZeroMem" |
08:59:07 | * | amosbird joined #nim |
09:00:13 | * | amosbird_ quit (Read error: Connection reset by peer) |
09:01:00 | FromGitter | <rayman22201> Wth is going on with your nim install? I've never had this many problems building the compiler before... Bizarre |
09:03:03 | * | amosbird_ joined #nim |
09:03:15 | FromGitter | <Varriount> @rayman22201 All I really need to know is, have you checked out the latest version and tested it? |
09:04:39 | * | amosbird quit (Ping timeout: 260 seconds) |
09:06:34 | FromGitter | <gogolxdong> yes, but REST API requires VCenter which is so expensive that customers prefer not buying. pyvmomi can manage both ESXi and VCenter but it's based on SOAP which we have to transform the SOAP response from XML to our backend specified Json data. |
09:07:46 | FromGitter | <rayman22201> @Varriount yed |
09:07:48 | FromGitter | <rayman22201> Yes |
09:11:07 | * | NamPNQ joined #nim |
09:12:34 | FromGitter | <rayman22201> @gogolxdong well, @skrylar attempted to make a soap library for you https://github.com/Skrylar/Soapstone |
09:15:15 | FromGitter | <rayman22201> I have to to get to bed. @Varriount I'm sure the code works, but I am sad that we had so much trouble with your build process. Sorry about that. |
09:15:18 | * | TheLemonMan joined #nim |
09:16:03 | TheLemonMan | hmm, what's wrong with this signature `proc foo[T:SomeFloat](x: openArray[T], y: T or openArray[T])`? |
09:16:19 | TheLemonMan | I can't call the procedure with eg. two seqs |
09:16:36 | * | yglukhov[i] joined #nim |
09:17:11 | Araq | tyOr doesn't like the "convertible" relation |
09:17:25 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
09:17:40 | FromGitter | <rayman22201> I'm also concerned about the deployment process of this change. Hopefully @Araq or @dom96 can clarify the deployment process for updating the docs and the dochack.js files on the web site. |
09:17:41 | Araq | and I'm not sure it would be sound to do that. probably it would solve more problems than it causes, though. |
09:18:01 | * | yglukhov[i] joined #nim |
09:18:16 | Araq | rayman22201: there is little to say, it gets deployed with the next release. |
09:19:22 | FromGitter | <rayman22201> @Araq I like that answer 😁 |
09:19:30 | FromGitter | <Varriount> TheLemonMan: Perhaps you want varargs? |
09:19:38 | TheLemonMan | Araq, do you have any use-case in mind where such a transformation is unsound? |
09:20:01 | TheLemonMan | Varriount, nah, I just wanted to avoid splitting this proc in two |
09:20:25 | FromGitter | <Varriount> I mean, wouldn't a varargs parameter do the trick |
09:21:15 | skrylar | "oh. deis worfklow sounds cool! oh. bought out by microsoft. :E" |
09:25:47 | Araq | TheLemonMan: (A|B) <: C iff A <: C *and* B <: C. |
09:26:19 | Araq | but since | causes a specialization, it should be fine |
09:26:48 | Araq | and keep in mind that I'm bad at type theory. |
09:31:31 | FromGitter | <gogolxdong> that's cool. |
09:42:48 | * | SolitudeSF[m] quit (Remote host closed the connection) |
09:42:49 | * | planetis[m] quit (Read error: Connection reset by peer) |
09:42:50 | * | narimiran[m] quit (Read error: Connection reset by peer) |
09:42:50 | * | macsek1911[m] quit (Remote host closed the connection) |
09:42:50 | * | Demos[m] quit (Read error: Connection reset by peer) |
09:42:53 | * | xomachine[m] quit (Read error: Connection reset by peer) |
09:42:53 | * | TheKing[m] quit (Remote host closed the connection) |
09:42:53 | * | petersjt014[m] quit (Read error: Connection reset by peer) |
09:42:53 | * | hitchhooker[m] quit (Read error: Connection reset by peer) |
09:42:53 | * | gh0st[m] quit (Read error: Connection reset by peer) |
09:42:54 | * | Jipok[m] quit (Remote host closed the connection) |
09:42:54 | * | codevance[m] quit (Read error: Connection reset by peer) |
09:42:55 | * | libman[m] quit (Read error: Connection reset by peer) |
09:42:56 | * | zielmicha[m]1 quit (Remote host closed the connection) |
09:42:59 | * | Miguelngel[m] quit (Read error: Connection reset by peer) |
09:43:00 | * | Flox[m] quit (Remote host closed the connection) |
09:43:01 | * | sendell[m] quit (Read error: Connection reset by peer) |
09:43:01 | * | sroecker[m] quit (Read error: Connection reset by peer) |
09:43:02 | * | zacharycarter[m] quit (Remote host closed the connection) |
09:43:02 | * | spymasterd[m] quit (Remote host closed the connection) |
09:43:02 | * | pqflx3[m] quit (Remote host closed the connection) |
09:43:03 | * | yglukhov[m] quit (Read error: Connection reset by peer) |
09:43:04 | * | sg-james[m] quit (Remote host closed the connection) |
09:43:04 | * | tyrion[m] quit (Remote host closed the connection) |
09:43:04 | * | GitterIntegratio quit (Read error: Connection reset by peer) |
09:43:04 | * | endes[m] quit (Read error: Connection reset by peer) |
09:43:04 | * | marszym[m] quit (Read error: Connection reset by peer) |
09:43:05 | * | unclechu[m] quit (Read error: Connection reset by peer) |
09:43:05 | * | Connor[m] quit (Read error: Connection reset by peer) |
09:43:06 | * | epictek[m] quit (Read error: Connection reset by peer) |
09:43:06 | * | federico3[m] quit (Read error: Connection reset by peer) |
09:43:08 | * | dyce[m] quit (Write error: Connection reset by peer) |
09:43:09 | * | TheManiac[m] quit (Remote host closed the connection) |
09:45:08 | Yardanico | matrix irc bridge crashed again! consistency! |
09:45:50 | skrylar | :( |
09:46:04 | * | BitPuffin quit (Ping timeout: 260 seconds) |
09:47:32 | TheLemonMan | Araq, I'm no TT expert either but the /and/ on the RHS implies that A and B *must* be related somehow since they're both subtypes of C |
09:47:59 | * | benjikun2 joined #nim |
09:49:32 | * | cspar quit (Ping timeout: 244 seconds) |
09:50:06 | * | pqflx3[m] joined #nim |
09:50:10 | skrylar | i probably don't understand what you're talking about, but this is one of those times i have to admire the few languages that just take a hard stance on evaluating left-to-right |
09:50:36 | * | benjikun quit (Ping timeout: 268 seconds) |
09:51:40 | * | dvn joined #nim |
09:54:51 | Araq | Nim evaluates from left-to-right. |
09:54:58 | Araq | it will be in the spec soon. |
09:55:11 | Araq | and the C++ backend will be fixed. |
09:57:10 | Yardanico | is it ok if compiler crashes if I try to print a variant object via echo? |
09:57:27 | FromGitter | <Varriount> TheLemonMan == LemonBoy? |
09:57:28 | Araq | TheLemonMan: it's not clear if the "is convertible" relation can be mapped to <: |
09:58:52 | TheLemonMan | Varriount, yep |
09:59:30 | Araq | but I think it can. anyway, the problem to watch out for is always this: A <: B does not imply C[A] <: C[B], just because 3 converts to 'byte', an array of integers does not convert to an array of bytes |
09:59:31 | FromGitter | <Varriount> TheLemonMan: Cool. I've been really impressed with the contributions you've made. |
09:59:46 | TheLemonMan | Araq, if you see isConvertible as a "weaker" isEqual it may be fine |
10:00:01 | skrylar | Araq, dont we evaluate in math-esque order? |
10:00:40 | Araq | skrylar: well obviously function calls have to be evaluated from inside-out or whatever you want to call it |
10:01:01 | TheLemonMan | aren't arrays covariant in T? |
10:01:34 | TheLemonMan | Varriount, compiler work is a wonderful (and productive) way to relax |
10:02:22 | Araq | arrays are neither covariant nor contravariant. |
10:02:25 | Yardanico | is my code even valid? https://github.com/nim-lang/Nim/issues/8374#issue-343047363 AFAIK I should use "ref object" if I have fields like seq[sameObjectType] |
10:02:52 | Araq | Yardanico: no, 'seq' works with recursive value types |
10:02:58 | Yardanico | ok, thanks for the info |
10:03:13 | Araq | and yeah, $ cannot handle that, this bug has been reported at least ten times now |
10:06:17 | TheLemonMan | gotcha, but isn't typerel smart enough to avoid that case? |
10:07:37 | * | NamPNQ quit (Remote host closed the connection) |
10:08:47 | * | dddddd joined #nim |
10:08:52 | * | krux02 joined #nim |
10:09:32 | * | hitchhooker[m] joined #nim |
10:09:32 | * | federico3[m] joined #nim |
10:09:33 | * | gh0st[m] joined #nim |
10:09:33 | * | TheKing[m] joined #nim |
10:09:33 | * | GitterIntegratio joined #nim |
10:09:34 | * | dyce[m] joined #nim |
10:09:34 | * | yglukhov[m] joined #nim |
10:09:35 | * | Demos[m] joined #nim |
10:09:35 | * | Miguelngel[m] joined #nim |
10:09:35 | * | zacharycarter[m] joined #nim |
10:09:35 | * | unclechu[m] joined #nim |
10:09:36 | * | codevance[m] joined #nim |
10:09:39 | * | marszym[m] joined #nim |
10:09:39 | * | narimiran[m] joined #nim |
10:09:40 | * | macsek1911[m] joined #nim |
10:09:40 | * | epictek[m] joined #nim |
10:09:40 | * | endes[m] joined #nim |
10:09:40 | * | sendell[m] joined #nim |
10:09:40 | * | TheManiac[m] joined #nim |
10:09:40 | * | Connor[m]1 joined #nim |
10:09:40 | * | petersjt014[m] joined #nim |
10:09:41 | * | Jipok[m] joined #nim |
10:09:42 | * | planetis[m] joined #nim |
10:09:42 | * | zielmicha[m] joined #nim |
10:09:42 | * | tyrion[m] joined #nim |
10:09:42 | * | spymasterd[m] joined #nim |
10:09:42 | * | xomachine[m] joined #nim |
10:09:42 | * | Flox[m] joined #nim |
10:09:42 | * | sg-james[m] joined #nim |
10:09:42 | * | libman[m] joined #nim |
10:09:43 | * | SolitudeSF[m] joined #nim |
10:09:43 | * | sroecker[m] joined #nim |
10:10:40 | skrylar | http://mesos.apache.org/ is this something we should care about? |
10:10:43 | * | endragor quit (Remote host closed the connection) |
10:10:56 | skrylar | poking around to see what their apis are like; i guess its supposed to make random stuff more erlang-y |
10:12:52 | Araq | ah! Section 15.6 "Coercion semantics for subtyping" |
10:12:58 | Araq | seems to cover it... |
10:13:45 | FromGitter | <mratsim> @skrylar Mesos should be a library I think. Just do well on a single CPU, then worry about 100k CPU. |
10:15:41 | skrylar | mratsim: skimming over their talk, it sounds neat, but i have no use for these :\ |
10:16:12 | skrylar | apparently it just goes over protobuf |
10:17:30 | FromGitter | <mratsim> I put Mesos in the same basket as Hadoop, Hive, Pig and Kafka. Buzzword you don’t need until you are at Uber/AirBNB scale. |
10:22:36 | Araq | TAPL seems to confirm what I said but doesn't offer new insights |
10:26:34 | * | endragor joined #nim |
10:31:02 | * | endragor quit (Ping timeout: 245 seconds) |
10:32:33 | FromGitter | <tim-st> is there no difference between a variable `var a = 1` and `var a* = 1` in global scope, regarding implementation? |
10:45:02 | Araq | no. |
10:47:36 | FromGitter | <tim-st> ok, thought without `*` it can be translated to a var passed as addtional param to each function |
10:50:14 | FromGitter | <tim-st> and then it can be created in the scope where it's called first |
10:51:34 | * | Ven`` joined #nim |
10:52:26 | FromGitter | <tim-st> Araq: is it bad when I dont close a FileStream? |
10:52:41 | FromGitter | <kayabaNerve> World-ending bad |
10:53:15 | skrylar | it might get closed by a finalizer but you should still close them |
10:53:28 | FromGitter | <tim-st> to match the json implementation of nim I'd need to but the stream ref inside each JsonNode and at the last Node the user would close it^^ |
10:53:48 | skrylar | io handles are technically a finite resource :f |
10:54:12 | FromGitter | <tim-st> I cannot give JsonNode a finalizer, afaik a finalizer calls for each object of same type |
10:54:27 | FromGitter | <tim-st> that would mean, on the first unused node the stream is close |
10:57:22 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
10:57:33 | FromGitter | <codem4ster> Hi I wrote this (https://tio.run/##hVJNa9tAEL3rVwzkkoIwxlAKghJaesshJS30YHxYSWPvxqsdZTWqpf55d/bDdpySFCSkmXnz5s2HM93xaLqePMPoTEMtFgXPPRYAXyYzwGdAN3ZiAWjy5g85VraE3@jZNMpKQJ5vxmPDhtxLuMUtl@DNTstn7Eto6eAS/iu5cbg3rs14iAkH8m0paczoixNKEB63QPWTVADawiMRP9RPMWMvFNWFLfq60bLprUFfgXEciH48j8rju0ytYlXB4@gwmlPKDb/z5bcOhXK9c4tVpo@O2O2VZ@yvzDCDsyNo@26J31KWxnJzA0NqYMBdh46BtWJolIMagUfvgkASCmXjDIdTmj |
10:57:33 | FromGitter | ... V7hDu0d7SAn1qW@U@ORmvpBFfQBzEZtAKJr5bQaOVVIysZwJLbwYtxKe/VvF4ty9zQJsaUnE0VjyeaQtcawaM4B3xeD@yN2yVoo7HZo6ywJrJhGr9E/rt7ekX@lo54Peo/XAfTsr5sV2Na3slOQz@pljeTC7vcqEhO/LHObeb6VJ5pPn4oii15mIQQlotFxC8STvhDaL4K5cR8acGTFaynzXreSKkk4FaOcyrDXc5SAhtNGe6x98fjXw "Nim – Try It Online") code but getting; ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ error is not explanatory ... [https://gitter.im/ |
10:57:33 | FromGitter | ... nim-lang/Nim?at=5b51c01db2411177a25cec2a] |
10:58:49 | dom96 | You should really put that link through a URL shortener :) |
10:59:21 | FromGitter | <zetashift> it shwos it shortened in gitter |
11:00:26 | FromGitter | <codem4ster> I'm using markdown with gitter. I think its because IRC :( Sorry. |
11:00:33 | FromGitter | <krux02> in irc the link is split into multiple messages |
11:01:10 | FromGitter | <zetashift> https://bit.ly/2LzCIO9 for da irc peeps |
11:03:22 | Yardanico | @codem4ster the issue here is probably is that you didn't initialize the sequence. But you wouldn't need to initialize it in the next version so you can just use devel or initialize it explicitly |
11:03:50 | Yardanico | oh, and also |
11:04:27 | Yardanico | you can't assign like this "board.squares[x][y]" because Nim doesn't know the lenght of the seq. |
11:04:59 | krux02 | (offtopic) I am proudly downloading all the data google has about me. It is 742 MB of data. |
11:05:13 | Yardanico | krux02, yeah, I downloaded it once too |
11:05:17 | Yardanico | nothing interesting ;) |
11:05:26 | krux02 | well it is all the data about me |
11:05:38 | krux02 | I also downloaded the data from facebook it was just 7MB |
11:05:49 | krux02 | I think facebook is hiding most of it's data. |
11:06:00 | FromGitter | <codem4ster> how can I implement a game board like this, then. |
11:06:16 | krux02 | I don't think they have just that data, I am also pretty sure they know exactley when and where I logged in and on what browser. |
11:06:21 | krux02 | that data I could not find |
11:06:47 | krux02 | also the data that they collect via the fb-thumb integration on other websites. |
11:06:53 | krux02 | I could not find anything about that. |
11:07:06 | krux02 | I think facebook wants a big EU fine. |
11:07:31 | Yardanico | @codem4ster something like https://gist.github.com/Yardanico/dcaccd73e02f0f8340816d4feebea36e |
11:08:01 | FromGitter | <narimiran> @codem4ster use `newSeq` |
11:08:36 | FromGitter | <narimiran> or if you know the width and height in advance, you could use array instead of seq |
11:08:47 | krux02 | wow I found my bookmarks |
11:08:48 | Yardanico | yeah, (if you know width and height at compile time) |
11:09:07 | krux02 | whenever I did bookmarks on chrome, I saw this funny bookmark animation. And the it was gone |
11:09:10 | krux02 | never saw it back |
11:09:18 | krux02 | now I see all the bookmarks in a file |
11:09:20 | krux02 | that is handy |
11:09:52 | * | nsf quit (Quit: WeeChat 2.1) |
11:14:07 | FromGitter | <Yardanico> @codem4ster also, are you sure you will need inheritance? |
11:14:10 | FromGitter | <Yardanico> for your objects |
11:14:34 | FromGitter | <Yardanico> if you will not use inheritance, you don't need to write "of RootObj" |
11:17:30 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:19:37 | FromGitter | <codem4ster> ah thanks @narimiran @Yardanico but its a little bit confusing that this can be successfully compiled but gives null error on runtime :( |
11:20:55 | * | stefanos82 joined #nim |
11:21:24 | Yardanico | @codem4ster well, it's because seq is not initialized |
11:22:06 | Yardanico | your code with nim devel gives "Error: unhandled exception: index out of bounds [IndexError]" which is correct because there's no element in sequences with that index |
11:26:27 | FromGitter | <narimiran> @codem4ster that was something that had confused me too when i started with nim (coming from python). the new nim version (currently nim v0.18.1 devel) will solve the first part (initialization) of your problem |
11:27:44 | FromGitter | <codem4ster> ok thats great ;) what about which line the problem is? |
11:29:43 | FromGitter | <narimiran> @codem4ster see @Yardanico's code, lines 49 and 52 |
11:30:13 | FromGitter | <narimiran> he initializes the seqs, and gives them the wanted length |
11:30:38 | FromGitter | <codem4ster> nope I tried to say; is devel version saying the line number, where is the problem. |
11:30:43 | Yardanico | yes |
11:30:52 | Yardanico | well, not quite :P |
11:31:07 | FromGitter | <codem4ster> bad news then :) |
11:31:16 | Yardanico | but it will if you wrap your code in a proc |
11:31:18 | Yardanico | like main |
11:32:11 | Yardanico | after I wrapped the code (excluding type section) in main proc: "/home/dian/Projects/NimNBT/tt.nim(58) tt" and then "Error: unhandled exception: index out of bounds [IndexError]" |
11:32:19 | Yardanico | ignore folder name (nimnbt) :) |
11:33:11 | FromGitter | <codem4ster> oh ok. I will make this `main` a habit :) |
11:35:53 | skrylar | hum. i guess rkt is dead |
11:37:55 | FromGitter | <narimiran> isn't `main` implicit in nim, so we don't have to do it? |
11:42:03 | skrylar | usually it is |
11:46:42 | FromGitter | <krux02> skrylar: what is (was) rkt |
11:53:38 | * | BitPuffin joined #nim |
12:15:57 | * | nsf joined #nim |
12:18:06 | * | xylef quit (Quit: WeeChat 2.2) |
12:18:47 | * | amosbird_ quit (Quit: ZNC 1.7.0 - https://znc.in) |
12:19:08 | * | amosbird joined #nim |
12:19:15 | * | amosbird quit (Max SendQ exceeded) |
12:19:43 | * | amosbird joined #nim |
12:19:49 | * | amosbird quit (Max SendQ exceeded) |
12:19:57 | * | mal``` quit (Quit: Leaving) |
12:20:13 | * | amosbird joined #nim |
12:20:17 | * | amosbird quit (Max SendQ exceeded) |
12:20:42 | * | amosbird joined #nim |
12:20:53 | * | amosbird quit (Max SendQ exceeded) |
12:21:23 | * | amosbird joined #nim |
12:21:30 | * | amosbird quit (Max SendQ exceeded) |
12:24:15 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
12:24:50 | * | yglukhov[i] joined #nim |
12:25:04 | * | mal`` joined #nim |
12:28:58 | FromGitter | <mratsim> @codem4ster For fixed game boards I suggestt you use arrays like here for a go board: https://github.com/mratsim/golem-prime/blob/master/src/datatypes.nim#L95 |
12:29:56 | * | xylef joined #nim |
12:55:37 | * | chopzwei joined #nim |
13:09:02 | Araq | https://www.technologyreview.com/s/611568/evolutionary-algorithm-outperforms-deep-learning-machines-at-video-games/ offtopic, but at least it's programming related |
13:11:52 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51df98f9ffc4664bef3fe0] |
13:12:12 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51dfac4b880b3e6a399eb3] |
13:15:45 | skrylar | there was something.. i forget the name now |
13:16:15 | skrylar | well short version if you compare deep learning's AIC score to an evolutionary system's AIC score the evo systems win |
13:16:28 | skrylar | because they end up learning more general solutions with less data |
13:16:40 | skrylar | but are super duper sensitive to your grading function |
13:17:56 | skrylar | i think kurzweil also wrote in his books that nuance used genetic solvers to tune his speech recognizers |
13:19:31 | FromGitter | <tim-st> @Araq why is it "not very efficient"? is it because of getPosition / setPosition or because of the string? https://github.com/nim-lang/Nim/blob/855956bf617f68ac0be3717329e9e1181e5dc0c6/lib/pure/streams.nim#L334 |
13:20:38 | skrylar | krux02: rkt was dockers competitor; it was a spec+mpl insstead of a product. although it seems that rkt was eaten by red hat and then became yet a newer standard, and now there is just the open container layout format or whatever |
13:20:59 | skrylar | i guess kubernetes is trying to dump docker like a dock fire |
13:21:45 | krux02 | I have never used docker, but it seems to spread like a wiled fire. People seem to really like it. |
13:23:51 | skrylar | containers are useful |
13:24:28 | skrylar | i wasted a few hours trying to use not-docker and the docs are bad as ever. rkt talks about using tools that are dead/have "we're dead now" posts on github, managed to find the new generation of tools |
13:24:47 | skrylar | then screw around trying to figure out how to get `runc` and OCI containers to bind sockets :| |
13:25:56 | krux02 | not everything that is "dead" is bad. Some things are just good reliable software that doesn't need constant patching. |
13:26:16 | krux02 | but I agree when it sayis "I am dead" then it is probably superseeded by some other project |
13:30:38 | skrylar | the new stuff is okay, it just needs coherent docs |
13:33:19 | * | amosbird joined #nim |
13:33:24 | * | amosbird quit (Max SendQ exceeded) |
13:33:59 | * | amosbird joined #nim |
13:34:00 | * | amosbird quit (Max SendQ exceeded) |
13:34:34 | * | amosbird joined #nim |
13:34:34 | * | amosbird quit (Max SendQ exceeded) |
13:35:09 | * | amosbird joined #nim |
13:35:10 | * | amosbird quit (Max SendQ exceeded) |
13:35:58 | * | amosbird joined #nim |
13:36:03 | * | amosbird quit (Max SendQ exceeded) |
13:36:24 | * | amosbird joined #nim |
13:42:12 | Yardanico | https://github.com/exercism/nim/pull/99 :D |
13:47:30 | FromGitter | <codem4ster> > @codem4ster For fixed game boards I suggestt you use arrays like here for a go board: https://github.com/mratsim/golem-prime/blob/master/src/datatypes.nim#L95 ⏎ ⏎ thanks @mratsim I changed it to ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51e7f263cf1636bddeaade] |
13:50:42 | FromGitter | <mratsim> @Araq, journalists being journalists, for video games, evolutionary algorithms have always being used to train “Agents” (i.e. genetic algorithms) which is also called reinforcement learning, the deep learning revolution was adding deep learning for “perception” and “evaluation/scoring” to the agent. |
13:51:19 | * | Vladar quit (Quit: Leaving) |
13:52:23 | FromGitter | <mratsim> aka, a paper about something that has been used for several years already ... |
13:54:50 | FromGitter | <narimiran> @Yardanico i still don't see nim on the main page |
13:55:01 | Yardanico | @narimiran updates are not instant |
13:56:29 | * | benjikun joined #nim |
13:57:42 | * | benjikun2 quit (Ping timeout: 245 seconds) |
14:03:20 | * | cspar joined #nim |
14:03:40 | FromGitter | <amscotti> Can I get some feedback on https://github.com/exercism/nim/pull/106 ? ⏎ I just feel like it could be a bit cleaner. |
14:04:29 | FromGitter | <codem4ster> there is a type Rune in unicode module. I suppose it as unicode char. But when I try to check is this empty it fails ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ when I print it with echo it prints `space` when I use `repr` it prints `0` how can I check its default state (empty state). [https://gitter.im/nim-lang/Nim?at=5b51ebed63cf1636bddeb903] |
14:07:37 | FromGitter | <tim-st> if you mean it's deault value, I think it's Rune(0) |
14:09:36 | FromGitter | <tim-st> also you are using $Rune(0) you have to compare if data == Rune(0) or data.int == 0 |
14:12:49 | FromGitter | <tim-st> @amscotti you're checking if even numbers are prime, you can increment by 2; also number mod5 is never prime, it has to end with [1,3,7,9] to be possible prime |
14:12:54 | FromGitter | <codem4ster> Great. Thanks @tim-st. I think I need some time to get used to type conventions in Nim. |
14:13:27 | FromGitter | <tim-st> You can just look at underlying type, it's int32 if I remember correct. int32 default is 0 |
14:13:29 | FromGitter | <narimiran> @codem4ster here are some quick style-fixes: http://ix.io/1hQl/ |
14:13:47 | FromGitter | <narimiran> oops, not @codem4ster but @tim-st |
14:13:59 | FromGitter | <narimiran> good dammit, i mean @amscotti |
14:14:04 | FromGitter | <tim-st> ^^ |
14:14:06 | FromGitter | <codem4ster> :D |
14:14:49 | FromGitter | <narimiran> sorry for the confusion, it is friday afternoon and i'm about to go home from work |
14:15:22 | FromGitter | <amscotti> @narimiran Thanks! |
14:15:58 | FromGitter | <tim-st> @codem4ster unfortunately Rune(0) is a valid codepoint so you cannot be sure that it's the default state, you could init by Rune(-1) but I'm not sure if that breaks some things |
14:16:20 | FromGitter | <amscotti> @tim-st So, I can use `countup` with a step of 2. |
14:16:35 | FromGitter | <tim-st> yes, and check mod 5 |
14:16:53 | FromGitter | <tim-st> I also you could use Miller Rabin, but maybe that's overkill |
14:16:56 | FromGitter | <tim-st> *also |
14:17:12 | FromGitter | <codem4ster> @tim-st it worked like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51eee8e06d7e74098fcd88] |
14:18:45 | FromGitter | <tim-st> that looks a bit cleaner I think: `if data.int != 0: dataStr = $data` |
14:19:02 | FromGitter | <codem4ster> its default is Rune(0) I think because I didn't fill that field of square initially. |
14:19:41 | FromGitter | <tim-st> yes |
14:22:21 | * | leorize quit (Ping timeout: 240 seconds) |
14:22:59 | FromGitter | <codem4ster> how is Rune.int valid for this? Is that it because of `RuneImpl = int32 # underlying type of Rune`? |
14:23:19 | * | floppydh quit (Quit: WeeChat 2.1) |
14:23:22 | * | cspar quit (Ping timeout: 244 seconds) |
14:24:08 | FromGitter | <tim-st> yes it does int(int32); you could even use Rune.int32 instead of int; smaller types like Rune.int16 could have information loss because valid codepoint is in 0 .. 0x10ffff |
14:26:10 | FromGitter | <codem4ster> I got it. Thanks. :) |
14:29:25 | FromGitter | <amscotti> @tim-st using `countup(2, sqrt(n.toFloat).toInt, 2)` I’m getting some errors in the test now. Did I mess up the `countup` in some way? |
14:30:36 | FromGitter | <mratsim> you need to start at 3 |
14:30:42 | FromGitter | <mratsim> special case the 2 |
14:30:45 | FromGitter | <mratsim> start at 3 |
14:30:48 | FromGitter | <mratsim> count 2 |
14:30:53 | FromGitter | <mratsim> countup 2 |
14:31:17 | FromGitter | <mratsim> I’ve added my review, your `count` variable should be renamed `candidate` |
14:31:34 | FromGitter | <mratsim> otherwise I think it’s good |
14:31:56 | FromGitter | <amscotti> @mratsim Thanks! |
14:31:56 | FromGitter | <mratsim> the tests can be more exhaustive though. |
14:32:11 | FromGitter | <amscotti> The test are from the main project |
14:32:45 | FromGitter | <amscotti> They are not from the individual language tracks |
14:33:00 | FromGitter | <mratsim> ah I see |
14:38:22 | * | miran joined #nim |
14:41:25 | FromGitter | <amscotti> @mratsim Still got something wrong with the `isPrime` code, here is what I have, ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51f495f9ffc4664bef883a] |
14:42:52 | FromGitter | <Quelklef> Should it be ceiling(sqrt(n))? |
14:45:13 | FromGitter | <amscotti> @Quelklef I’ll give that a try |
14:45:53 | * | cspar joined #nim |
14:46:12 | FromGitter | <amscotti> No, still getting errors when using ceiling |
14:46:28 | FromGitter | <Quelklef> what case |
14:49:32 | FromGitter | <amscotti> prime(1) == 2, prime(1) was 3 ⏎ prime(2) == 3, prime(2) was 5 ⏎ prime(6) == 13, prime(6) was 17 |
14:50:38 | FromGitter | <Quelklef> ? |
14:50:46 | FromGitter | <Quelklef> Which cases? I'm confused what that means |
14:50:47 | FromGitter | <amscotti> "Given a number n, determine what the nth prime is" |
14:50:57 | FromGitter | <Quelklef> got it |
14:50:57 | FromGitter | <amscotti> Seems to be off by 1. |
14:51:09 | FromGitter | <Quelklef> Oh and you're doing it with looping and isPrime? |
14:51:46 | FromGitter | <amscotti> Yup |
14:51:47 | FromGitter | <narimiran> @amscotti does the example have to be efficient, or should it be as basic/simple as possible? |
14:52:01 | FromGitter | <Quelklef> Any reason you're not using a sieve? |
14:52:56 | FromGitter | <amscotti> basic/simple is good, as this is for people to learn. They will be writing there own code to make the test pass but if they need help and go to Git to look at the code they should be able to understand it. |
14:53:55 | * | chopzwei quit (Ping timeout: 250 seconds) |
14:58:13 | * | PMunch quit (Quit: Leaving) |
15:00:03 | FromGitter | <narimiran> @amscotti yeah, that's why i'm thinking that the optimized versions should be left for (more experienced) learners, and the example should be the basic version, where you can look if you have some syntax problems |
15:00:29 | * | Perkol joined #nim |
15:01:10 | Perkol | https://bpaste.net/show/6b0521e33d5d This function still crashes the whole program on error. What to do? |
15:01:34 | Perkol | Despite being wrapped in except try block |
15:03:28 | FromGitter | <amscotti> @narimiran agree. |
15:06:39 | FromGitter | <mratsim> @amscotti because in programming we start counting at 0 |
15:09:15 | FromGitter | <amscotti> Sure, but I can’t really change the test to match the code, the test are created by the main exercism project and shared by all the language tracks. |
15:11:12 | miran | if you start looking for primes from 3, you need `yield 2` in the `primeIter` before the while loop |
15:12:01 | * | cspar quit (Ping timeout: 248 seconds) |
15:12:58 | miran | btw, @mratsim, is `n.toFloat` preferred way to use for "sqrting", or is just `n.float` better? |
15:13:50 | FromGitter | <mratsim> The proper way to do integer square root is this: https://github.com/numforge/number-theory/blob/master/src/integer_math.nim#L9-L16 |
15:14:11 | miran | :) |
15:14:16 | FromGitter | <mratsim> floats cannot represent all integers if you go other 2^32 |
15:16:06 | FromGitter | <mratsim> but for this exercise it’s fine, it can be “left as an exercise to the reader" |
15:16:31 | miran | ok, in general situations like these, when you need to convert X to Y, is there any pros/cons to use `n.toY` rather than `n.Y`? |
15:19:31 | FromGitter | <mratsim> I never used to toY proc, i wasn’t even aware of them :P |
15:19:35 | * | chopzwei joined #nim |
15:20:16 | miran | hehe, same here - that's why i'm asking :) |
15:21:05 | FromGitter | <Quelklef> How does `Y(x)` even work? |
15:21:11 | FromGitter | <Quelklef> In general |
15:22:11 | FromGitter | <mratsim> I think it checks if a converter exists |
15:22:47 | FromGitter | <mratsim> for inherited types and distinct types it also works automatically. |
15:23:19 | * | benjikun2 joined #nim |
15:23:49 | FromGitter | <Quelklef> what if there are multiple? |
15:24:41 | FromGitter | <stisa> I think `nimble path <pkg>` returns the wrong path (doesn't remove `srcDir`) if used on packages which set `srcDir`, could anyone else check? |
15:25:38 | * | benjikun quit (Ping timeout: 276 seconds) |
15:31:09 | miran | @amscotti @Yardanico - i have tried to install exercism and solve some basic nim examples - whenever i copy/paste the commands given on exercism, there is some error |
15:31:33 | * | nsf quit (Quit: WeeChat 2.1) |
15:31:38 | miran | neither "configure --token=xyz" works, nor "exercism download --exercise=hello-world --track=nim" |
15:31:57 | * | xylef quit (Ping timeout: 240 seconds) |
15:32:16 | FromGitter | <kaushalmodi> miran: They refreshed the token on v2 |
15:32:17 | FromGitter | <amscotti> What error are you getting from the `configure` command? |
15:32:44 | FromGitter | <amscotti> Yeah, there been a lot of changes with the update for V2. |
15:32:45 | FromGitter | <kaushalmodi> I had exercism set up earlier, but had to delete the old .json config file and create a new one for v2 |
15:32:53 | miran | @amscotti: "Incorrect Usage. (...) flag provided but not defined: -token" |
15:33:19 | FromGitter | <amscotti> Is your `exercism` up to date? |
15:33:40 | miran | so i used "--key" instead of "--token", don't know if that's what is correct |
15:33:40 | FromGitter | <kaushalmodi> miran: With the latest exercism cli, just run `exercism configure` |
15:33:48 | miran | i have used the version from AUR |
15:33:50 | FromGitter | <kaushalmodi> AFAIS it got rid of `--` from switches |
15:34:06 | FromGitter | <amscotti> I think you can run `exercism upgrade` to make sure you have the newest. |
15:34:17 | miran | and now i see that AUR version is flagged out of date |
15:36:40 | FromGitter | <kaushalmodi> miran: easiest way to install it if you have `go` installed is: |
15:36:43 | FromGitter | <kaushalmodi> ```go get -u -v github.com/exercism/cli/exercism``` |
15:37:02 | FromGitter | <kaushalmodi> It will install it in `~/go.apps/bin` by default |
15:37:10 | miran | i upgraded it |
15:37:14 | FromGitter | <kaushalmodi> ok |
15:37:32 | FromGitter | <mratsim> @Quelklef probably ambiguous call |
15:38:18 | miran | yup, now it seems to work |
15:38:32 | FromGitter | <amscotti> Sweet! :) |
15:46:26 | * | leorize joined #nim |
15:48:04 | * | ieatnerds joined #nim |
15:48:14 | ieatnerds | Hi! |
15:49:57 | * | benji__ joined #nim |
15:53:47 | * | benjikun2 quit (Ping timeout: 244 seconds) |
15:57:58 | FromGitter | <mratsim> Hello cannibal ;) |
15:58:23 | ieatnerds | I swear its only wonka nerds ;) |
15:58:55 | * | chopzwei quit (Ping timeout: 250 seconds) |
16:00:49 | ieatnerds | I feel like this may be a 'dumb' question, but how would I get a random element from a set? I'm using AllChars from strutils. |
16:01:18 | FromGitter | <amscotti> @Yardanico Looks like we need to wait a bit longer before the Nim track is live, https://github.com/exercism/exercism.io/issues/4023 but it sounds like it will be soon. |
16:05:43 | miran | ieatnerds: heh, there is no `pop` for sets, unfortunately. what i did is that i have set-up a for loop that breaks after the first iteration. ugly hack, but it works |
16:06:34 | miran | here's my code: `for coord in maze: dfs(coord); break # Nim doesn't have HashSet.pop()` |
16:08:36 | miran | and another one with the same theme `for d in allowed: result = (d, period); break` |
16:09:01 | miran | if somebody knows a better way, i'm all ears |
16:09:29 | ieatnerds | Even if theres a way to just make the set into a sequence or other data type, I'd take it. |
16:09:37 | ieatnerds | Thanks Miran! |
16:26:21 | * | yglukhov_ joined #nim |
16:26:22 | * | yglukhov[i] quit (Remote host closed the connection) |
16:30:27 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
16:42:08 | * | PMunch joined #nim |
16:54:32 | * | rockcavera quit (Remote host closed the connection) |
17:09:13 | * | ftsf quit (Ping timeout: 244 seconds) |
17:09:58 | * | dorelix quit (Ping timeout: 264 seconds) |
17:14:03 | * | NimBot joined #nim |
17:19:40 | * | dorelix joined #nim |
17:21:54 | * | nsf joined #nim |
17:26:15 | * | DarkArctic joined #nim |
17:30:22 | FromGitter | <mratsim> sets do not remember insertion order so you can’t pop |
17:32:22 | FromGitter | <mratsim> @ieatnerds, I also needed *very* efficient sets for integer from which I could take a random element for monte Carlo simulation. Here is my implementation - https://github.com/mratsim/golem-prime/blob/master/src/datatypes.nim#L106-L119 |
17:32:33 | FromGitter | <mratsim> And the corresponding proc: https://github.com/mratsim/golem-prime/blob/master/src/core/c_empty_points.nim |
17:33:33 | ieatnerds | I'' take a look o0nce im out of work, Thank you so much! |
17:33:37 | ieatnerds | I'll* |
17:37:05 | FromGitter | <mratsim> I don’t see a way to make it more efficient: it has no branching at all, and you can’t use bitpacking as that prevents from taking a random value from the set in constant time. |
17:38:19 | ieatnerds | I dont need anything super efficient, I'm just derping around with generational algo's. |
17:39:00 | ieatnerds | My day job is tech support and I havent had a lot of time to work on projects, so I've just been doing small things that I can use later on when I do have more time. |
17:39:21 | FromGitter | <mratsim> what’s a generational algo? |
17:41:03 | ieatnerds | sorry genetic/evolutionary. basically starts of ith some random algorithms that are supposed to get better at a task over time. |
17:41:22 | ieatnerds | https://en.wikipedia.org/wiki/Genetic_algorithm |
17:54:08 | * | ftsf joined #nim |
17:59:00 | * | ng0 joined #nim |
18:01:23 | * | Sembei joined #nim |
18:17:35 | FromGitter | <Vindaar> @stisa haha, funny you mention it. Stumbled upon the same thing last week and started fixing it today. Then noticed there's a PR which fixes a related thing here: https://github.com/nim-lang/nimble/pull/465. See the comment I just made there |
18:20:19 | * | Perkol quit (Quit: Leaving) |
18:41:12 | miran | @mratsim re: set.pop. i know that pop usually means "remove and return the last value", and you cannot do that with sets, but what i would like to have is to remove/return some random element from a set, it doesn't matter which one |
18:43:06 | miran | that exists for python sets - https://docs.python.org/3.6/library/stdtypes.html#frozenset.pop |
18:57:19 | * | Tanger quit (Ping timeout: 260 seconds) |
18:57:47 | * | Tanger joined #nim |
19:01:36 | * | rockcavera joined #nim |
19:03:41 | FromGitter | <deech> Do functions on immutable data structures do any kind of node sharing? For instance when `concat` in `sequtils` is called with immutable `seq`'s does create a fresh array with copies or use share with the existing ones? |
19:04:10 | FromGitter | <tim-st> at this thread the author writes about the same thing I also encountered with variant objects, which is unexpected: https://forum.nim-lang.org/t/4065 |
19:04:16 | FromGitter | <tim-st> "object invariants can't have the same property in each case of match" |
19:05:22 | FromGitter | <tim-st> at least I think he means the object fields of different variants cant have the same |
19:06:03 | FromGitter | <tim-st> @deech "and returns them inside a new sequence." |
19:06:49 | FromGitter | <tim-st> oh, what you meant is whether the refs are deep copied? I think they the refs are just copied so no deep copy |
19:09:24 | FromGitter | <deech> I'm asking if the compiler can count of things in `let` being immutable all the way down (except for explicit references). |
19:10:31 | FromGitter | <deech> I'm trying to evaluate how suitable Nim is for functional programming which relies on immutable data structures and node sharing. |
19:15:27 | Araq | it does not help you much but it's entirely possible |
19:15:45 | Araq | including Closure-like mega awesome finger tries |
19:15:57 | Araq | I think somebody had a nimble package for that |
19:16:51 | FromGitter | <rayman22201> It's definitely not in the stdlib though. sequitls works more like C++ semantics, just copy the container and all items in the container |
19:17:30 | FromGitter | <deech> A link to that package would be very helpful. I've already seen https://github.com/vegansk/nimfp. |
19:19:13 | FromGitter | <rayman22201> This one by @PMunch I think? https://github.com/PMunch/nim-persistent-vector |
19:19:30 | FromGitter | <deech> Nice! |
19:20:22 | FromGitter | <rayman22201> I've never used it so I can't vouch for it's quality. YMMV |
19:20:59 | PMunch | It's based on the Clojure implementation, so the performance should be decent :) |
19:21:40 | FromGitter | <rayman22201> and you can always complain to @PMunch if you have problems :-P |
19:21:59 | PMunch | Haha, always :) |
19:27:51 | FromGitter | <Varriount> @rayman22201 I wonder what algorithm Chrome uses for matching previously visited URLs |
19:27:51 | FromGitter | <mratsim> @miran you can’t remove an element at random for Nim sets. Try it ;), you need a container which supports random access, otherwise you need to try random values until you get a hit. |
19:28:12 | FromGitter | <mratsim> @Varriount Bloom filters are probably the most efficient |
19:30:02 | miran | ok, so to access a random element, my ugly hack with breaking immediately from a for-loop is the best we can do? |
19:30:07 | FromGitter | <mratsim> @deech, stack objects, seq and string can be immutable all the way down as long as you don’t directly take the address. Ref objects cannot, see: https://github.com/nim-lang/Nim/issues/8370 |
19:32:17 | FromGitter | <mratsim> to access a random element you need: ⏎ ⏎ 1) a random access container like an array or a seq ⏎ 2) or a list you can pop elements from (if random, you need to know the length rand(length - 1) [https://gitter.im/nim-lang/Nim?at=5b5238c14b880b3e6a3ab195] |
19:33:19 | FromGitter | <mratsim> HashSets uses seq as a backend, but the seq is private so you’re out of luck |
19:33:24 | FromGitter | <rayman22201> @Varriount good question. I think Chrome just feeds it into Google's search honestly. It probably just phones home |
19:34:07 | FromGitter | <rayman22201> Although a quick google found this very interesting slightly tangential article: https://www.quora.com/How-does-Google-Chrome-search-text-Ctrl-F-on-a-page-so-quickly |
19:34:11 | FromGitter | <mratsim> @rayman22201 that would be strange, previously visited URL have a different color/shade, that would be super inefficient to query google every-time |
19:34:22 | FromGitter | <Varriount> miran: Does the set contain an enum without holes? |
19:34:36 | FromGitter | <mratsim> @Varriount it’s a HashSet |
19:34:41 | FromGitter | <rayman22201> It probably does some caching |
19:34:45 | FromGitter | <Varriount> Ah. Hm. |
19:35:39 | FromGitter | <Varriount> The only way I can think of removing an element is to either have a mirrored sequence that you use to calculate the elements to remove (based off a random index) |
19:36:17 | FromGitter | <Varriount> or to generate a number X , iterate over the keys X times, then remove the key that is iterated over when X is reached. |
19:36:18 | FromGitter | <mratsim> copy the HashSet source code, add a random function @miran ;) |
19:37:25 | miran | @mratsim my oneliner seems easier `for element in mySet: doSth(element); break` |
19:37:56 | FromGitter | <Varriount> In Python you would probably do `del myDict[choice(myDict.keys)]` |
19:38:27 | FromGitter | <mratsim> @miran, but it’s not random? |
19:38:28 | FromGitter | <Varriount> Sorry, `del myDict[choice(myDict.keys())]` |
19:39:10 | miran | @mratsim: it isn't, but i needed *any* element, so this is good enough for me |
19:39:26 | FromGitter | <mratsim> ah I see |
19:39:46 | miran | @Varriount, you would use `dict.pop(key)` in python, of course ;) |
19:40:21 | miran | and there is also `dict.popitem()` which: "Remove and return an arbitrary (key, value) pair from the dictionary." |
19:42:37 | FromGitter | <rayman22201> chrome could also just be using Boyer–Moore on the search history either directly or by using sql-lite. |
19:47:46 | * | yglukhov[i] joined #nim |
19:58:28 | FromGitter | <Varriount> miran: Oh, I thought you wanted a non-destructive operation. |
20:00:14 | FromGitter | <Varriount> miran: Also, keep in mind that arbitrary != random, it just means "up to the implementation". |
20:00:32 | miran | true, sorry for the confusion |
20:00:56 | FromGitter | <Varriount> For example, popitem() in Python 3's dictionary implementation seems to return the most recently added key/value pair. |
20:01:17 | FromGitter | <Varriount> Since dictionaries in 3.6 became ordered by default. |
20:08:27 | * | dorelix quit (Ping timeout: 240 seconds) |
20:10:25 | Calinou | is it just me or enableTrueColors() is not working? |
20:10:31 | Calinou | (export COLORTERM="truecolor" works anyway) |
20:13:37 | Calinou | also, what would be a nice way to format colored messages in my code? |
20:13:47 | Calinou | calling setForegroundColor/setBackgroundColor in-between echo prints sounds pretty bad :( |
20:18:44 | FromGitter | <Varriount> Calinou: Isn't there a echoStyle proc or something? |
20:19:07 | FromGitter | <Varriount> https://nim-lang.org/docs/terminal.html#styledEcho.m,varargs[untyped] |
20:19:07 | Calinou | oh yeah, styledEcho |
20:29:29 | * | dom96 added a little banner to nim-lang.org to hopefully advertise the survey more |
20:29:41 | dom96 | Consider this another reminder for you guys to answer the survey :) |
20:33:28 | Calinou | I answered yet |
20:33:40 | Calinou | ironically, I started writing something in Nim just after answering it :P |
20:33:43 | FromGitter | <kayabaNerve> dom96: How long has it been out for? |
20:33:50 | FromGitter | <kayabaNerve> I forget if I've done it lol |
20:33:53 | dom96 | Almost a month now |
20:33:58 | FromGitter | <kayabaNerve> If your answer is months, I did it when it released |
20:34:02 | FromGitter | <kayabaNerve> Yeah I think I did it |
20:34:50 | Calinou | https://i.imgur.com/WzKkqAX.png |
20:34:51 | Calinou | :D |
20:35:16 | Calinou | I'm rewriting a Node.js CLI app I made to Nim |
20:35:34 | dom96 | nice |
20:35:50 | dom96 | bet it runs much much much much faster :D |
20:36:09 | Calinou | yeah |
20:37:11 | Calinou | according to hyperfine, startup time is 0.9 ms (-d:release) or 1.1 ms (-d:release --opt:size), the binary is pretty small too (231 KB optimized for speed and stripped, 153 KB optimized for size and stripped) |
20:38:57 | dom96 | great, you should publish it on Nimble :) |
20:39:36 | Calinou | in comparison, the Node.js app takes 168 ms to start when not packaged into a standalone binary. If I package it using `pkg`, it's faster (114 ms) but the binary is 40 MB as it bundles Node.js |
20:39:54 | Calinou | I do use a CLI framework that's known to be slow though |
20:40:11 | Calinou | I just use docopt in Nim, it's simple but does enough stuff for me |
20:40:52 | * | nsf quit (Quit: WeeChat 2.1) |
20:43:42 | * | TheLemonMan joined #nim |
20:44:30 | TheLemonMan | mratsim, is it possible to do a parallel fold with stride along a given tensor axis? |
20:48:23 | dom96 | Calinou: The only problem with docopt sadly is that it depends on `re` which in turn depends on pcre :/ |
20:48:50 | FromGitter | <kaushalmodi> Calinou: Look at cligen |
20:49:09 | FromGitter | <kaushalmodi> https://github.com/c-blake/cligen |
20:49:47 | Calinou | dom96: I already use re to parse hsl()/hsv() color declarations |
20:50:25 | dom96 | ahh, then it's perfect |
20:50:35 | dom96 | Hopefully soon we'll be able to integrate nim-regex into the stdlib |
20:50:40 | Calinou | does the dependency on PCRE make it harder to build on Windows? |
20:51:07 | dom96 | no, it just means you need a pcre.dll |
20:51:42 | FromGitter | <kaushalmodi> cligen allows easily creating sub command helps |
20:52:41 | FromGitter | <kaushalmodi> In my little cli utility, I have just one sub-command `init` for now, and ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b524b99f9ffc4664bf087e0] |
20:52:52 | Calinou | I don't need subcommand help here, it's a fairly simple utility |
20:53:03 | Calinou | it's not Git :P |
20:53:23 | FromGitter | <kaushalmodi> Right, just saying that subcommand help is there if you need. It of course has regular help command support too. |
20:54:52 | FromGitter | <kaushalmodi> the thing is that it interprets the switch names from the linked proc params |
20:55:13 | FromGitter | <kaushalmodi> example.. the only cligen code is ⏎ ⏎ ``` dispatchGen(nistow, ⏎ version = ("version", "0.1.0"))``` [https://gitter.im/nim-lang/Nim?at=5b524c30c579673e6b8428d8] |
20:55:15 | FromGitter | <mratsim> @TheLemonMan, you can do parallel fold along an axis, but it does not support stride, though you can slice the tensor before hand to simulate that: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/higher_order_foldreduce.nim#L51 ⏎ ⏎ To be honest I want to kill this template |
20:55:34 | FromGitter | <kaushalmodi> but the help it generates is: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b524c4605e1cc3553fdb143] |
20:55:54 | FromGitter | <kaushalmodi> it derives those short/long switch names from that `nistow` proc parameters linked to cligen |
20:56:22 | FromGitter | <kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b524c76e06d7e740990e6c4] |
20:58:22 | * | BitPuffin quit (Remote host closed the connection) |
20:58:34 | Calinou | how can I pass truecolors to styledEcho? |
20:58:57 | Calinou | the example works, but I don't know how to pass true colors (which seem to be created using setForegroundColor/setBackgroundColor only) |
20:59:37 | dom96 | I don't think styledEcho supports that |
20:59:42 | Calinou | aw |
21:01:12 | * | icebattle quit (Ping timeout: 244 seconds) |
21:03:41 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
21:04:31 | Calinou | how can I echo without having a newline at the end? |
21:04:49 | Calinou | (I Ctrl+F'd in the manual and didn't find an answer) :P |
21:04:57 | miran | stdout? |
21:05:15 | Calinou | in stdout, yes |
21:05:24 | miran | stdout.write |
21:05:38 | FromGitter | <kaushalmodi> Calinou: Are you on devel? |
21:05:47 | Calinou | yeah |
21:05:58 | Calinou | thanks, stdout.write works |
21:05:59 | FromGitter | <kaushalmodi> use `styledWrite` for no-newline colored echoes |
21:06:25 | FromGitter | <kaushalmodi> `stdout.styledWrite` |
21:07:22 | Calinou | does it support truecolor? |
21:07:40 | FromGitter | <kaushalmodi> Calinou: i am trying to figure that out |
21:07:45 | FromGitter | <kaushalmodi> .. looks like it should |
21:08:07 | FromGitter | <kaushalmodi> dom96: Wondering why styledEcho shouldn't support truecolor.. |
21:08:16 | FromGitter | <kaushalmodi> with this code in devel: https://github.com/nim-lang/Nim/blob/060871e64ac9d665430d4d9ae912bf7a379ee976/lib/pure/terminal.nim#L699-L730 |
21:08:38 | dom96 | because truecolor support is very recent and the person that implemented likely didn't think to implement it for styledEcho |
21:08:54 | FromGitter | <kaushalmodi> I don't understand macros yet |
21:09:07 | Calinou | oh, that reminds me |
21:09:09 | FromGitter | <kaushalmodi> In that macro, when is `styledEchoProcessArg` reached? |
21:09:16 | Calinou | what should I use for looping over a range, countup() or {start..end}? |
21:09:18 | FromGitter | <kaushalmodi> because we have: ⏎ ⏎ ```template styledEchoProcessArg(f: File, color: Color) = ⏎ setTrueColor f, color``` [https://gitter.im/nim-lang/Nim?at=5b524f7e4b880b3e6a3af342] |
21:09:20 | Calinou | the latter seems to work for me |
21:09:47 | * | xet7 joined #nim |
21:09:49 | FromGitter | <kaushalmodi> Calinou: either `countUp` or `1 .. 4` would work |
21:10:47 | FromGitter | <kaushalmodi> Calinou: I am building up quite some notes on Nim as I am learning it: https://scripter.co/notes/nim/#counting-up-and-down |
21:12:05 | Calinou | yeah, no need for {} |
21:16:41 | * | Jipok[m] quit (Ping timeout: 240 seconds) |
21:16:42 | * | gh0st[m] quit (Ping timeout: 240 seconds) |
21:16:42 | * | unclechu[m] quit (Ping timeout: 240 seconds) |
21:16:47 | * | Flox[m] quit (Ping timeout: 255 seconds) |
21:16:47 | * | Connor[m]1 quit (Ping timeout: 255 seconds) |
21:16:47 | * | petersjt014[m] quit (Ping timeout: 255 seconds) |
21:16:48 | * | TheKing[m] quit (Ping timeout: 255 seconds) |
21:16:51 | * | tyrion[m] quit (Ping timeout: 240 seconds) |
21:16:51 | * | spymasterd[m] quit (Ping timeout: 240 seconds) |
21:16:51 | * | epictek[m] quit (Ping timeout: 240 seconds) |
21:16:51 | * | narimiran[m] quit (Ping timeout: 240 seconds) |
21:16:52 | * | GitterIntegratio quit (Ping timeout: 240 seconds) |
21:16:53 | * | zielmicha[m] quit (Ping timeout: 245 seconds) |
21:16:53 | * | macsek1911[m] quit (Ping timeout: 245 seconds) |
21:16:53 | * | marszym[m] quit (Ping timeout: 245 seconds) |
21:16:54 | * | hitchhooker[m] quit (Ping timeout: 245 seconds) |
21:16:58 | * | dyce[m] quit (Ping timeout: 245 seconds) |
21:16:58 | * | endes[m] quit (Ping timeout: 245 seconds) |
21:16:58 | * | Demos[m] quit (Ping timeout: 245 seconds) |
21:16:58 | Yardanico | goodbye, matrix users |
21:16:58 | * | xomachine[m] quit (Ping timeout: 256 seconds) |
21:16:58 | * | sendell[m] quit (Ping timeout: 256 seconds) |
21:16:58 | * | TheManiac[m] quit (Ping timeout: 256 seconds) |
21:16:59 | * | zacharycarter[m] quit (Ping timeout: 256 seconds) |
21:16:59 | * | pqflx3[m] quit (Ping timeout: 256 seconds) |
21:17:02 | * | sroecker[m] quit (Ping timeout: 260 seconds) |
21:17:02 | * | sg-james[m] quit (Ping timeout: 260 seconds) |
21:17:02 | * | libman[m] quit (Ping timeout: 260 seconds) |
21:17:02 | * | Miguelngel[m] quit (Ping timeout: 260 seconds) |
21:17:02 | * | federico3[m] quit (Ping timeout: 260 seconds) |
21:17:06 | * | planetis[m] quit (Ping timeout: 256 seconds) |
21:17:07 | * | yglukhov[m] quit (Ping timeout: 256 seconds) |
21:17:23 | * | SolitudeSF[m] quit (Ping timeout: 276 seconds) |
21:17:24 | * | codevance[m] quit (Ping timeout: 276 seconds) |
21:19:22 | Calinou | thanks for the help :) |
21:24:04 | FromGitter | <kaushalmodi> Calinou: I don't have a terminal set up with truecolors. |
21:24:41 | FromGitter | <kaushalmodi> Looking at the code, the truecolor should work if your non-Windows system has a terminal with COLORTERM env var set to "truecolor" or "24bit" |
21:24:54 | FromGitter | <kaushalmodi> For Windows system terminals, it calls some different API |
21:25:44 | FromGitter | <kaushalmodi> With a compliant terminal, this should have worked: ⏎ ⏎ ```enableTrueColors() ⏎ styledEcho(colAliceBlue, "aliceblue text")``` [https://gitter.im/nim-lang/Nim?at=5b52535805e1cc3553fdc507] |
21:29:56 | Calinou | yeah, I saw that |
21:30:12 | Calinou | if you call enableTrueColors(), the variable needs to be set, which makes sense but I'd like it to be always enabled |
21:30:29 | Calinou | (at least unless the user explicitly disables it) |
21:30:41 | Calinou | you can't preview a 24-bit color accurately without a truecolor terminal anyway :) |
21:31:16 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
21:31:55 | FromGitter | <kaushalmodi> ok |
21:31:57 | FromGitter | <kaushalmodi> works! |
21:32:10 | FromGitter | <kaushalmodi> I just set env var `COLORTERM` to `truecolor` |
21:32:34 | FromGitter | <kaushalmodi> then ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b5254f2c579673e6b844050] |
21:33:17 | FromGitter | <kaushalmodi> (https://files.gitter.im/nim-lang/Nim/VKcg/image.png) |
21:33:53 | FromGitter | <kaushalmodi> *pretty sure the colors don't match up with their names on my terminal, but it sure seems to be doing something* - RHEL 6.8, xterm |
21:47:55 | * | amosbird quit (Ping timeout: 256 seconds) |
21:50:08 | * | amosbird joined #nim |
21:52:23 | * | miran quit (Ping timeout: 276 seconds) |
21:56:33 | * | yglukhov[i] quit (Remote host closed the connection) |
21:57:42 | FromGitter | <Vindaar> took long enough, but seems to work fine for me |
21:57:51 | FromGitter | <Vindaar> (https://files.gitter.im/nim-lang/Nim/Y4ja/true_color_terminal_.png) |
21:58:07 | FromGitter | <Vindaar> was trying to get a prettier range of colors, but failed :D |
21:59:11 | FromGitter | <Vindaar> there's some color banding due to printing of only 64 hex values in steps of 4 |
21:59:18 | FromGitter | <Vindaar> And I just print spaces |
22:06:28 | * | pqflx3[m] joined #nim |
22:08:31 | FromGitter | <Vindaar> (https://files.gitter.im/nim-lang/Nim/Y5Wf/viridis.png) |
22:09:37 | FromGitter | <Vindaar> now I'm happy. All I did was make sure my tmux was running with true color support. point 1 from https://github.com/tmux/tmux/issues/1246 |
22:13:11 | FromGitter | <Vindaar> and I'm using `styledWrite` with a `Color` as the 2nd argument |
22:24:03 | * | hitchhooker[m] joined #nim |
22:24:04 | * | federico3[m] joined #nim |
22:24:04 | * | gh0st[m] joined #nim |
22:24:05 | * | TheKing[m] joined #nim |
22:24:05 | * | dyce[m] joined #nim |
22:24:05 | * | zacharycarter[m] joined #nim |
22:24:05 | * | GitterIntegratio joined #nim |
22:24:05 | * | yglukhov[m] joined #nim |
22:24:05 | * | codevance[m] joined #nim |
22:24:06 | * | Miguelngel[m] joined #nim |
22:24:06 | * | Demos[m] joined #nim |
22:24:06 | * | unclechu[m] joined #nim |
22:24:11 | * | Jipok[m] joined #nim |
22:24:11 | * | marszym[m] joined #nim |
22:24:11 | * | sendell[m] joined #nim |
22:24:12 | * | narimiran[m] joined #nim |
22:24:12 | * | planetis[m] joined #nim |
22:24:12 | * | Connor[m]1 joined #nim |
22:24:12 | * | libman[m] joined #nim |
22:24:12 | * | endes[m] joined #nim |
22:24:12 | * | xomachine[m] joined #nim |
22:24:12 | * | petersjt014[m] joined #nim |
22:24:13 | * | macsek1911[m] joined #nim |
22:24:13 | * | TheManiac[m] joined #nim |
22:24:13 | * | Flox[m] joined #nim |
22:24:13 | * | epictek[m] joined #nim |
22:24:13 | * | tyrion[m] joined #nim |
22:24:13 | * | sroecker[m] joined #nim |
22:24:13 | * | SolitudeSF[m] joined #nim |
22:24:14 | * | sg-james[m] joined #nim |
22:24:14 | * | zielmicha[m] joined #nim |
22:24:14 | * | spymasterd[m] joined #nim |
22:32:44 | FromGitter | <rayman22201> not good enough. must write a new terminal emulator in Nim :-P j/k |
22:36:36 | FromGitter | <Varriount> What I sorta wish the whole color-code-escape mechanism supported is a count of bytes/characters that should be colored. |
22:37:44 | FromGitter | <Varriount> Otherwise you end up in situations where ctrl+c-ing a program causes the colors to go wonky. |
22:39:32 | Araq | length prefixes are un-Unixy though. it's better to have stupid escaping rules. after all, who has ever seen a wrong & on a website. |
22:40:12 | FromGitter | <rayman22201> lol. Yeah. It's a "won't fix" situation |
22:40:24 | Araq | ah! |
22:40:49 | Araq | now it all makes sense: "won't fix" == "unfix" == "unix" |
22:41:32 | FromGitter | <rayman22201> lol |
22:42:13 | FromGitter | <kaushalmodi> @Varriount You can reset the colors in Ctrl+c handler, finally: and other places? right? |
22:42:50 | FromGitter | <Varriount> The Ctrl+c handler doesn't get called if a program is forcibly terminated, unfortunately. |
22:42:56 | FromGitter | <rayman22201> Yes, but those are all work arounds. If the program crashes / you kill -9 it, your terminal is screwed. You can't catch all the cases |
22:43:34 | FromGitter | <kaushalmodi> `reset` |
22:43:42 | FromGitter | <kaushalmodi> :) |
22:43:53 | FromGitter | <Varriount> Hm, can a parent process detect if a subprocess gets killed? |
22:43:59 | FromGitter | <rayman22201> lol. yup. turn it off and on again :-P |
22:44:05 | FromGitter | <kaushalmodi> No |
22:44:12 | FromGitter | <Varriount> :/ |
22:44:30 | FromGitter | <kaushalmodi> That's a command to reset the terminal |
22:44:40 | FromGitter | <kaushalmodi> Doesn't restart the computer |
22:44:52 | FromGitter | <kaushalmodi> Try it /not kidding |
22:45:11 | FromGitter | <kaushalmodi> See "man reset". There should be an entry |
22:45:16 | FromGitter | <Varriount> Yes, but the fact is that you still have to reset the terminal maunally. |
22:45:16 | FromGitter | <rayman22201> I know about reset. I was making a joke |
22:45:24 | FromGitter | <kaushalmodi> Ok |
22:45:42 | Araq | be a man and press reset after you killed your cat 9 times. |
22:46:12 | FromGitter | <kaushalmodi> @Varriount I agree. `reset` was a workaround, not a solution. |
22:46:55 | FromGitter | <kaushalmodi> Araq: Didn't get the reference to that. Also not at computer right now. |
22:47:21 | Araq | it will grow on you. |
22:49:51 | FromGitter | <kaushalmodi> https://stackoverflow.com/a/18607773/1219634 |
22:56:26 | dyce[m] | could a library like this be useful with nim? https://github.com/Puchaczov/Musoq |
22:56:27 | dyce[m] | or is it mostly novelty |
22:58:25 | Demos[m] | https://gitlab.gnome.org/GNOME/libgda |
22:58:36 | Demos[m] | https://github.com/StefanSalewski/gintro |
22:58:56 | Demos[m] | it can work. it's rare to actually want to use sql on something that isn't a database though |
23:22:25 | FromGitter | <Varriount> I've always wondered what an OS with "everything is a table" would look like. |
23:29:58 | * | xet7 quit (Quit: Leaving) |
23:34:00 | FromGitter | <rayman22201> Didn't BeOS try something like that? |
23:34:34 | FromGitter | <rayman22201> https://arstechnica.com/information-technology/2018/07/the-beos-filesystem/ |
23:39:01 | FromGitter | <rayman22201> It's actually kind of a cool idea. Might be better than everything is a file |