<< 20-07-2018 >>

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:12krux02citycide: for me it seems odd as well
00:21:21krux02== should not return an option, ever
00:21:49krux02in 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:46FromGitter<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:01FromGitter<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:36FromGitter<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:31FromGitter<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:13FromGitter<kayabaNerve> It describes a replacement of the existing system for an enum
01:31:22FromGitter<kayabaNerve> Ignore that last message
01:31:50FromGitter<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:19FromGitter<rayman22201> oh, ok. sure lol
01:36:36FromGitter<rayman22201> Are you talking about ResultError being added to the core set of Errors?
01:36:53FromGitter<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:48FromGitter<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:11FromGitter<Quelklef> Yeah @kayabaNerve what exactly would a ResultError be?
02:03:23FromGitter<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:59FromGitter<kayabaNerve> @rayman22201 Core set.
02:07:09FromGitter<kayabaNerve> @Quelklef An error for not when the input is wrong, but the output is.
02:07:16FromGitter<kayabaNerve> It's an idea I have I want feedback on.
02:07:30FromGitter<Quelklef> Can you give a usecase?
02:08:44FromGitter<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:58FromGitter<kayabaNerve> You connect to MySQL. Every query results in an unknown error.
02:09:15FromGitter<kayabaNerve> For when external services fail you
02:09:34FromGitter<Quelklef> Hmmm, interesting
02:09:57FromGitter<Quelklef> Sounds like `Option[T]` to me
02:10:03FromGitter<Quelklef> but as an exception instead
02:10:28FromGitter<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:35FromGitter<kayabaNerve> *one to derive from
02:10:56FromGitter<kayabaNerve> Except possibly ResourceExhausted if you go by itss name and not its pupose?
02:11:19FromGitter<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:24FromGitter<kayabaNerve> And Option[t] is a form of error handling, not a way of saying the error.
02:11:41FromGitter<kayabaNerve> How is it a timeout? You connected to the RNG and got results. Somehow, none were usable.
02:11:43FromGitter<Quelklef> @rayman22201 IMO the SQL one should not be a ValueError
02:12:07FromGitter<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:22FromGitter<rayman22201> That sounds like a protocol error to me
02:12:22FromGitter<kayabaNerve> The SQL one could be a corrupted DB. You could have proper queries and values...
02:12:46FromGitter<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:53FromGitter<kayabaNerve> That's a ValueError for not having a cookie.
02:12:54FromGitter<rayman22201> corrupted DB sounds like an IOError or OSError
02:13:02FromGitter<kayabaNerve> But that's not a HTTP Protocol error
02:13:06FromGitter<Quelklef> No, it wouldn't be either I don't think
02:13:14FromGitter<kayabaNerve> @rayman22201 IO when it happened
02:13:19FromGitter<kayabaNerve> But the program doesn't know
02:13:19FromGitter<Quelklef> There'd be valid data on the disk, but it wouldn't make sense to the reader
02:13:25FromGitter<Quelklef> I like this idea
02:13:32FromGitter<Quelklef> Sort of
02:13:42FromGitter<kayabaNerve> @Quelklef My example had an invalid DB MySQL couldn't handle but the program wasn't the cuase
02:13:46FromGitter<Quelklef> Because I think a ResultError for one function is actually just a ValueError for a nested function
02:13:56FromGitter<Quelklef> Typically
02:13:59FromGitter<kayabaNerve> For another part of the program
02:14:03FromGitter<kayabaNerve> Or another program
02:14:17*yglukhov[i] joined #nim
02:14:25FromGitter<Quelklef> Right
02:14:26FromGitter<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:39FromGitter<Quelklef> Nono but do you see my point
02:14:42FromGitter<Quelklef> Is that
02:14:57FromGitter<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:04FromGitter<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:12FromGitter<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:16FromGitter<kayabaNerve> Eh. That's also a possibility. I like that
02:15:23FromGitter<Quelklef> Well my point is that's dumb
02:15:32FromGitter<Quelklef> Well, maybe
02:15:32FromGitter<Quelklef> hm
02:15:42FromGitter<Quelklef> OK, here's my opinion:
02:15:46FromGitter<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:48FromGitter<Quelklef> ResultError should exist, and not be a fatal error
02:15:53FromGitter<kayabaNerve> We can agree it's worth debating
02:16:04FromGitter<Quelklef> Because if it's a fatal error, it's nearly useless
02:16:08FromGitter<kayabaNerve> Agreed
02:16:15FromGitter<Quelklef> but if it's recoverable, then it serves a possibly useful part of an API
02:16:25FromGitter<Quelklef> Especially for connection type stuff like you've given
02:16:37FromGitter<Quelklef> I think the web API example is the most enticing one
02:18:03FromGitter<rayman22201> I don't think it's necessary, but like I said, ice cream flavors...
02:18:33FromGitter<Quelklef> Well, exceptions aren't necessary, either ;-)
02:18:49*yglukhov[i] quit (Ping timeout: 260 seconds)
02:18:58FromGitter<rayman22201> The problem with ResultError, is that it's too generic. It adds no clarity at all.
02:19:16FromGitter<Quelklef> I don't agree
02:19:17FromGitter<rayman22201> ValueError is pretty generic as well, but there is precedent for it.
02:19:32FromGitter<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:37FromGitter<kayabaNerve> @rayman22201 It's just as generic as ValueError
02:19:38FromGitter<Quelklef> And then that can be extended somehow
02:19:48FromGitter<Quelklef> It's like a StateError
02:19:55FromGitter<Quelklef> Which already exists in some languages IIRC
02:20:05FromGitter<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:14FromGitter<Quelklef> No, that's the point
02:20:21FromGitter<Quelklef> That ResultError would not be fatal
02:20:50FromGitter<Quelklef> It's not a bug and it should be handled
02:20:58FromGitter<Quelklef> Just *perhaps* not with this function, maybe with the main loop
02:21:10FromGitter<Quelklef> I think the usecase would fit well with the stack unwinding of exceptions
02:21:24FromGitter<Quelklef> Shit, I need to learn about Lisp exception handling...
02:21:32FromGitter<Quelklef> I've been meaning to do that for like 6 months
02:21:35FromGitter<rayman22201> that's a rabbit hole...
02:21:44FromGitter<Quelklef> Lisp exception handling?
02:21:49FromGitter<rayman22201> yeah
02:22:01FromGitter<Quelklef> I've heard it's more elegant and better than anything else out there
02:22:10FromGitter<Quelklef> I get the feeling Araq would disagree but hey
02:22:16FromGitter<Quelklef> I should see it for myself, eh?
02:22:25FromGitter<Quelklef> Or not exceptions, "conditions and restarts"
02:22:33FromGitter<rayman22201> I would probably side with Araq on that one, but definitely see for yourself
02:22:40FromGitter<rayman22201> Continuations are super interesting
02:22:50FromGitter<Quelklef> Oh no
02:22:57FromGitter<Quelklef> Am I gonna have to revisit `call/cc` and co.
02:22:59FromGitter<Quelklef> ?
02:23:29FromGitter<rayman22201> It's been a while, but I believe so
02:23:37FromGitter<Quelklef> Oh boy
02:23:44FromGitter<Quelklef> This should keep me occupied for a while..
02:23:51FromGitter<rayman22201> :-P
02:24:01FromGitter<rayman22201> stack trampolines for days!
02:24:13FromGitter<Quelklef> wheeeeeEeeEEeee!
02:25:54FromGitter<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:03FromGitter<rayman22201> none of the Errors I was using as examples where the fatal kind. Those were all from the recoverable list
02:28:04FromGitter<Quelklef> Hmmm
02:28:20FromGitter<Quelklef> You know, whether or not an error should be recoverable seems like it depends on context
02:28:37FromGitter<Quelklef> Should an IOError be recoverable in a data crunching app? probably not
02:28:48FromGitter<Quelklef> In a file explorer? Abso-fucking-lutely
02:29:01FromGitter<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:19FromGitter<Quelklef> I mean
02:29:25FromGitter<Quelklef> do you have to draw it language-wide?
02:30:00FromGitter<Quelklef> I don't know if it's possible, but making a compiler flag for it seems perhaps meritful
02:30:06FromGitter<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:03FromGitter<Quelklef> hmm
02:31:24FromGitter<Quelklef> I think we've reached a point where I don't technically understand the RFC enough to continue
02:31:27FromGitter<Quelklef> oh, well :\
02:31:29FromGitter<rayman22201> part 2 of this comment: https://github.com/nim-lang/Nim/issues/8363#issuecomment-406189955
02:32:25FromGitter<Quelklef> nnn
02:32:49FromGitter<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:50FromGitter<Quelklef> You know, I'm fine with IndexError being fatal if checking for permission rather than forgiveness is the superior paradigm
02:33:03FromGitter<Quelklef> But I don't know if it is, and I'm so used to asking for forgiveness from Python
02:33:17FromGitter<Quelklef> Yeah, I saw the supervisor, but couldn't understand it
02:33:40FromGitter<rayman22201> Basically, it's an exception handler for the fatal errors
02:33:53*FromGitter * rayman22201 hand waves
02:34:01FromGitter<rayman22201> kind of :-P
02:34:12FromGitter<Quelklef> No, I got that
02:34:15FromGitter<Quelklef> I don't get the implementation
02:34:21FromGitter<Quelklef> I'm not sure I want to yet, haha
02:34:25FromGitter<rayman22201> lol
02:34:56FromGitter<rayman22201> have to go eat dinner. brb
02:35:22FromGitter<kayabaNerve> @Quelklef That's why error handling exists
02:35:32FromGitter<Quelklef> What is
02:38:19FromGitter<kayabaNerve> FileExplorer IO Error not being fatal but yes in other casess
02:38:56FromGitter<Quelklef> Was your statement as in "that's why try/except exists", or "that's why shield: exists"?
02:39:29FromGitter<kayabaNerve> I think the first?
02:39:42FromGitter<Quelklef> But IOError is (IIRC) fatal, and can't be caught
02:39:50FromGitter<kayabaNerve> Or is the comment IOError is guaranteed to crash no matter what?
02:39:54FromGitter<kayabaNerve> Got it.
02:40:00FromGitter<Quelklef> It can be caught with shield; fatal errors *may* be caught, but they're not generally supposed to be
02:40:03FromGitter<kayabaNerve> That seems iffy
02:40:18FromGitter<Quelklef> My point is just that the RFC makes a division line which should perhaps not be so concrete as it is
02:40:28FromGitter<Quelklef> As IMO it's domain-dependent and Nim is a general-purpose programming language
02:42:49*endragor joined #nim
02:42:54FromGitter<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:24FromGitter<kayabaNerve> @Varriount Because the DB won't respond with the first?
03:01:50FromGitter<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:04FromGitter<kayabaNerve> Unknown error despite you having valid values.
03:12:14*ftsf joined #nim
03:14:01*dorelix joined #nim
03:20:41skrylarQuelklef: i think its a matter of how exceptions that may never arise in production are to be handled
03:21:04FromGitter<Quelklef> I disagree
03:21:06skrylarit 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:16FromGitter<Quelklef> Right
03:21:19FromGitter<Quelklef> Well, that's not so bad
03:21:31FromDiscord<awr> just found something curious with `when` and checking if a type is a proc
03:21:33FromGitter<Quelklef> just transform all `try X except IndexError` into `if inRage: X`
03:21:38skrylarit does lead you to an expectation that catch will handle an error that never throws
03:22:04FromDiscord<awr> `when x is proc:` fails to compile but `when (x is proc):` does
03:22:31FromGitter<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:27skrylari will be happier when the days of json bytecode are over.
03:29:29*endragor joined #nim
03:38:28ftsfhmm 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:00ftsfeg. replace '#include "foo.inc"' with readFile($1)
03:40:42ftsfobviously re is the wrong tool for that specific job, but curious about general text replacement with a function
03:43:39skrylarlike, at compile time?
03:45:19ftsfat runtime
03:46:56ftsfi'm reading a file into a string, then i want to modify that string, (context: preprocessing GLSL when loading into a shader)
03:50:33ftsfahh 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:04skrylari took a first stab at the SOAP stuff https://github.com/Skrylar/Soapstone
04:40:09skrylarit'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:17skrylarso scgi looks neat.
05:36:53skrylarhot 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:01FromGitter<rayman22201> @gogolxdong will be happy about this
05:37:29FromGitter<rayman22201> @Varriount poke?
05:37:36FromGitter<rayman22201> you around
05:37:41FromGitter<rayman22201> ?
05:37:50skrylaroh he was doing AWS stuff
05:37:56skrylarfor some reason i thought he was doing vmware stuff
05:38:21FromGitter<rayman22201> I think he was doing both?
05:38:53FromGitter<rayman22201> or I'm just confused
05:40:57skrylari dunno. but i miss the days when nginx docs weren't full of "oh yeah half these features are proprietary :D"
05:42:51FromGitter<rayman22201> oh really? It's been a long time since I've played with nginx... or web servers for that matter
05:43:16skrylarthey went commercial and so the docs are full of mentions of the commercial edition
05:43:42skrylarit'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:00FromGitter<rayman22201> I can't say I blame them for cashing in. lol
05:44:09*yglukhov[i] joined #nim
05:44:15skrylarwell elastic is curious
05:44:26skrylarelasticsearch decided to open source their xpack stuff but its still technically commercial
05:44:52skrylarthey 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:20skrylarafaik 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:35skrylaralthough caddy technically requires a license to use the binaries >.>
05:45:47skrylari mean its not that hard to build them yourself, so its kind of amusing
05:46:11FromGitter<rayman22201> Yeah. It's a weird model. But from a business perspective I kind of get it.
05:46:40skrylarits sort of necessary because investors want it and businesses tend not to be willing to be reasonable
05:46:49skrylari 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:58skrylarthere'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:16skrylaralthough 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:25skrylarwhich 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:47FromGitter<codenoid> hi all
05:50:49FromGitter<codenoid> i love you
05:50:50FromGitter<codenoid> <3
05:50:54skrylarhelloes
05:51:02FromGitter<codenoid> <3
05:52:26skrylardreading the eventual gtk4 release
05:52:38skrylari'm not sure gtk 1 -> 2 -> 3 has accomplished much more than bit rot
05:53:11FromGitter<Varriount> @rayman22201 I'm here.
05:53:18FromGitter<rayman22201> yay
05:53:33FromGitter<rayman22201> lets get you some working doc search shall we?
05:54:16FromGitter<rayman22201> if you are up for it
05:55:25FromGitter<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:54FromGitter<rayman22201> anything weird show up in the console?
05:57:00FromGitter<Varriount> Nope.
05:57:21FromGitter<rayman22201> hrmm...
05:58:11FromGitter<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:43FromGitter<Varriount> It does get called.
05:58:54FromGitter<rayman22201> side note... this is why I want to get that JS sourcemaps PR working in the near future
05:59:07FromGitter<Varriount> However the input to the function is only ever nulls
05:59:16FromGitter<rayman22201> interesting
05:59:32FromGitter<codenoid> i use nim for osint application, and it's work pretty damn cool
06:01:05FromGitter<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:42FromGitter<rayman22201> other question, what browser are you using?
06:01:46FromGitter<Varriount> Chrome.
06:01:58FromGitter<codenoid> nim is pretty cool
06:02:02FromGitter<codenoid> i wanna be nim boyfriend
06:03:24FromGitter<rayman22201> my primary browser is FF, but Chrome should have no issues with data attribute tags...
06:06:22FromGitter<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:04FromGitter<Araq> @rayman22201 the source maps PR can be cleaned up by anybody ;-) *hint*
06:07:16FromGitter<rayman22201> I know! It's my next project!
06:07:27FromGitter<rayman22201> I just need to make some time to do it
06:08:33FromGitter<rayman22201> @Varriount *red neck mechanic voice* "There's your problem!"
06:09:49FromGitter<rayman22201> you used koch web to build the docs?
06:10:08FromGitter<Varriount> Yes.
06:11:21FromGitter<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:54FromGitter<Varriount> Hm, that might be my issue.
06:13:40FromGitter<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:45FromGitter<Araq> can you explain why it was required?
06:54:43FromGitter<Araq> I wonder why stuff like `<tag id = "foo>` needs ever more html stuff in order for css/js to work
06:55:05FromGitter<rayman22201> Well, it's a hack. But a slightly cleaner hack than the alternative.
06:55:39FromGitter<Araq> mind to share some details?
06:56:54FromGitter<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:27FromGitter<rayman22201> The problem is that is only a small subset of the information contained in the index
06:58:09FromGitter<Araq> ah ok.
06:58:19FromGitter<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:25FromGitter<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:52FromGitter<Araq> I dunno why my search is bad. I designed it for Nim, back then.
07:00:13FromGitter<Araq> (so that you can search for += )
07:00:26FromGitter<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:34FromGitter<rayman22201> it amounts to creating a normalized "search tags" that allow for uniform matching code across everything
07:02:15FromGitter<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:38FromGitter<Araq> ha, let me see about that
07:02:46FromGitter<rayman22201> and the latter is the more common use case, especially for new people looking through manual
07:03:02FromGitter<rayman22201> lol. I did say it was subjective
07:03:17FromGitter<Araq> returns valid hits, sadly nothing from osproc
07:03:34FromGitter<rayman22201> Your search isn't bad, I just thought it could be improved :-P
07:03:51FromGitter<Araq> what can't. ;-)
07:04:22FromGitter<Araq> btw I imported angliokala and its search was shit, so I wrote my own.
07:04:32FromGitter<rayman22201> lol. impossible!
07:05:17FromGitter<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:10FromGitter<rayman22201> I have never heard of angliokala, but I believe you that it is terrible. It has a terrible name
07:08:00FromGitter<Araq> lol, I don't remember the correct name.
07:08:38FromGitter<narimiran> algolia?
07:08:50FromGitter<Araq> probably.
07:09:41FromGitter<rayman22201> lol. Still seems terrible
07:10:05*yglukhov[i] joined #nim
07:10:22FromGitter<Araq> I also use "muslimC" instead of "musl-c" or whatever it's called
07:11:13FromGitter<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:17FromGitter<Araq> definitely unintentional.
07:14:17FromGitter<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:32FromGitter<rayman22201> Much sorrow drowned in beer and whiskey over that project....
07:16:09FromGitter<Araq> sounds familiar. and then you get complaints about a NIH syndrome
07:18:04FromGitter<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:10skrylarrayman22201: try elastic or solr
07:34:19skrylarlucene wasn't meant to be a search server
07:34:51FromGitter<Varriount> Isn't the setup ELK - Elasticsearch, Logstash, Kibana?
07:34:55skrylarAlso if you want to be cheeky, Postgres will do the job (yes, fkin postgres is a fulltext god)
07:35:16FromGitter<Varriount> skrylar: Postgres is amazing.
07:35:35FromGitter<Varriount> I fully expect it to be able to make french fries for me at some point.
07:36:10skrylarhttp://rachbelaid.com/postgres-full-text-search-is-good-enough/
07:36:30skrylarPostgres 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:03skrylaralthough theres one or two companies that have sharding, and there's slony, but i dunno anything about them
07:37:30skrylari was reading about jsonb and i am now mind boggled that postgres is even eating mongodb's lunch
07:38:43skrylarcockroachdb 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:55skrylarthey 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:50skrylarbut 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:27skrylarand 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:56skrylarthere is also this weird shit by the tokyocabinet guy http://fallabs.com/hyperestraier/index.html
07:47:16FromGitter<Varriount> skrylar: Don't forget Splunk (if you have the money).
07:47:26*floppydh joined #nim
07:47:47skrylari have no money :>
07:48:19FromGitter<Varriount> You sure you don't have a few thousand on hand?
07:48:58skrylari have zero income and less than a hundred dollars in storage
07:49:13FromGitter<Varriount> :O
07:49:17FromGitter<Varriount> Are you ok?
07:49:41skrylari have a place to live, and it has food in it
07:50:43FromGitter<kayabaNerve> How can I get the max supported value of the standard int type?
07:51:02skrylardoesn't int.max or int.high do that
07:51:39FromGitter<kayabaNerve> Thanks
07:52:23skrylarreading some stuff about git-lfs and s3 storage. have been curious about minio
07:53:04skrylaralso slightly amused by these very tiny tools that almost do the same jobs as huge ones (fossil v. git, kak v. vimacs)
07:54:12FromGitter<Varriount> Who knows, perhaps 20 years down the line fossil will replace git.
07:54:28skrylari doubt it
07:54:34skrylaralthough we need a good non-dvcs
07:55:07FromGitter<Varriount> What advantages does a centralized VCS have over a distributed one?
07:55:20skrylardoing 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:52skrylarby non-vcs i mean for storing art assets
07:56:00skrylargit is absolutely bad at it
07:56:29skrylarart assets generally don't diff at all, or if they did they require specific differs, and nobody really cares except perforce
07:56:39skrylarthey are also huge
07:57:27FromGitter<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:37FromGitter<rayman22201> Well much better
07:57:48FromGitter<Varriount> skrylar: How about we all use Sharepoint. :D
07:58:23skrylari have internet ptsd from sharepoint
07:58:49skrylarfamily 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:03FromGitter<Varriount> Ugh.
07:59:05skrylari tried sharepoint on a demo machine and performance for simple tasks was awful
07:59:15skrylarhe said "well it was running on a low end laptop so thats why"
07:59:23FromGitter<Varriount> My experience with Sharepoint is that it's great if set up for very specific tasks.
07:59:29skrylarbut i ran owncloud off a desktop and it ran just fine? :|
07:59:57FromGitter<Varriount> EG: Hosting intranet sites and highly structured projects.
08:00:09skrylargit-lfs is a neat protocol it just should be attached to a standalone thing probably
08:00:50FromGitter<rayman22201> I agree about git-lfs
08:01:15skrylarwell it only interacts with git as much as annex does, (that is, storing shims)
08:01:19FromGitter<rayman22201> @Varriount did you get the search working?
08:01:59skrylaryou would need to use things like borg/rsync's rolling checksum bins instead of line deltas, and/or the zsync protocol
08:02:32FromGitter<rayman22201> Yeah. It's a neat idea, but almost defeats the purpose of git decentralization
08:03:09skrylari don't find the decentralization useful most of the time
08:03:23skrylarthere are rare cases i need to go in to the history very far
08:04:36FromGitter<Varriount> Hrm, how am I supposed to install a version of Nim from another repo using choosenim
08:04:47Yardanicoyou are not supposed to do that :P
08:05:30FromGitter<rayman22201> Lol. I just kept my fork in a side directory away from choosenim
08:05:55FromGitter<rayman22201> Cheating but it works
08:06:04skrylarhrm
08:06:23skrylarthis 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:25FromGitter<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:25skrylargit-annex is almost that, but they don't version the files
08:07:45skrylarwell, you .. can't do that with a lot of files?
08:08:02skrylarora's aren't diffable sanely
08:08:22skrylarokay technically you CAN diff an ora if you tear it out of the zip enclosure and compare individual png blocks
08:08:27FromGitter<rayman22201> It works real well with code! Which is why git works so well for that usecase
08:08:41FromGitter<rayman22201> Unfortunately art assets and large files have very different properties
08:09:00skrylarthe 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:02FromGitter<rayman22201> Although arguably git is crap too
08:09:13skrylargit is crappily built but is not crap
08:09:49FromGitter<rayman22201> Merge conflicts? Three way merge. Bad
08:10:45FromGitter<rayman22201> The idea is good. Patches are good. Git is meh. It's just popular
08:11:22FromGitter<rayman22201> See pijul for an interesting alternative with better theoretical foundation based on patch sets and gadts
08:11:48skrylarfossil would be great, but the maintainer is opinionated against adding things like rebase or branch merges
08:12:09skrylaryou can't just like, selectively merge someone else's repo full of shit in to yours by just taking one feature branch
08:12:41skrylar"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:48FromGitter<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:37FromGitter<rayman22201> If we just cared about backups and versioning we could use file versions or databases.
08:14:46FromGitter<rayman22201> Tldr I agree with you
08:15:35skrylarwell i think its probably fine to keep that history available but git doesn't have the concept of windowing
08:15:49skrylar"i only care about the head and two releases back"
08:16:00skrylarits either full history or one checkout or get fucked
08:16:23FromGitter<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:28skrylari 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:32FromGitter<Varriount> What about a sparse checkout?
08:17:04skrylarex. borg is just using the rsync algorithm with a trick
08:17:10FromGitter<rayman22201> Honestly, aws S3 solves the big file problem
08:17:20FromGitter<Varriount> @rayman22201 How did you deal with compiling the new nim compiler?
08:17:40skrylarrayman22201 through apis, and a single host (i'm aware s3 clones exist)
08:17:48FromGitter<Varriount> Mine gives `Error: module names need to be unique per Nimble package; module clashes with ./nim-better-docs/compiler/pluginsupport.nim`
08:18:00skrylaralthough reading minio and ceph's s3 frontends and some git-lfs stuff for s3 is what started the mind voyage
08:18:01FromGitter<Varriount> When using `koch boot`
08:18:22FromGitter<rayman22201> @Varriount I did not get that error
08:19:41FromGitter<rayman22201> Oh. Use the local kock
08:19:43FromGitter<rayman22201> Koch
08:19:47skrylar> kock
08:19:52*skrylar chortles
08:20:01FromGitter<Varriount> You mean, the one that is used by the system Nim?
08:20:07FromGitter<rayman22201> Damnit. Worst possible typo
08:20:23FromGitter<rayman22201> No. The one inside the pr repo
08:22:00FromGitter<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:39FromGitter<rayman22201> In which case temporarily remove nimble from your path?
08:22:43skrylarI 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:40skrylarfossil 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:57skrylarso if two people do non-compatible commits, you get forks instead of merge errors
08:24:10FromGitter<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:01FromGitter<rayman22201> @skrylar you have to merge / choose eventually though
08:26:16FromGitter<rayman22201> Can't be forks forever
08:26:22skrylartrue but for art files that has to be done by hand regardless
08:27:01FromGitter<rayman22201> Which is why the centralized model of locking files is probably better for art assets
08:28:57skrylardidn't people hate the locked file workflows
08:29:07FromGitter<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:20FromGitter<rayman22201> That's what the pros do for art pipelines
08:30:09FromGitter<rayman22201> Programmers hate locked work flows. Artists loved it
08:33:26FromGitter<gogolxdong> I found this http://techgenix.com/vmware-rest-api/ and this http://techgenix.com/soap-vs-rest-vmware-environments/
08:34:02FromGitter<rayman22201> @skrylar http://www.alienbrain.com/
08:37:38skrylari just saw that page
08:37:53skrylarthere was a hackernews that mentioned them and also said there are few artists happy with their bin managers
08:38:24FromGitter<rayman22201> @gogolxdong it looks like you can use the rest api and it may be much easier.
08:42:06FromGitter<Varriount> @rayman22201 The generated index still doesn't have data-doc-attribute tags
08:42:36FromGitter<Varriount> Nor can I find "data-doc-attribute" using `grep -r` in the downloaded repo
08:43:22skrylarsoap is actually not so bad, it's rest+xml instead of rest+json
08:44:14skrylaralthough i put some notes in the soapstone repo; xml has some freedom of choice issues
08:45:01FromGitter<rayman22201> https://github.com/nim-lang/Nim/pull/8260/files
08:45:07skrylaram quite satisfied with CBOR, but meh
08:45:19FromGitter<rayman22201> @Varriount first file
08:45:44skrylar(cbor is basically msgpack, but as a standardized rfc and better handling of unknown data types)
08:46:12skrylarlike in msgpack and protobuf you only have blobs, whereas cbor allows you to slap a type id on values
08:46:54FromGitter<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:58FromGitter<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:00FromGitter<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:15FromGitter<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:34FromGitter<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:46FromGitter<rayman22201> @Varriount yed
09:07:48FromGitter<rayman22201> Yes
09:11:07*NamPNQ joined #nim
09:12:34FromGitter<rayman22201> @gogolxdong well, @skrylar attempted to make a soap library for you https://github.com/Skrylar/Soapstone
09:15:15FromGitter<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:03TheLemonManhmm, what's wrong with this signature `proc foo[T:SomeFloat](x: openArray[T], y: T or openArray[T])`?
09:16:19TheLemonManI can't call the procedure with eg. two seqs
09:16:36*yglukhov[i] joined #nim
09:17:11AraqtyOr doesn't like the "convertible" relation
09:17:25*yglukhov[i] quit (Read error: Connection reset by peer)
09:17:40FromGitter<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:41Araqand 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:16Araqrayman22201: there is little to say, it gets deployed with the next release.
09:19:22FromGitter<rayman22201> @Araq I like that answer 😁
09:19:30FromGitter<Varriount> TheLemonMan: Perhaps you want varargs?
09:19:38TheLemonManAraq, do you have any use-case in mind where such a transformation is unsound?
09:20:01TheLemonManVarriount, nah, I just wanted to avoid splitting this proc in two
09:20:25FromGitter<Varriount> I mean, wouldn't a varargs parameter do the trick
09:21:15skrylar"oh. deis worfklow sounds cool! oh. bought out by microsoft. :E"
09:25:47AraqTheLemonMan: (A|B) <: C iff A <: C *and* B <: C.
09:26:19Araqbut since | causes a specialization, it should be fine
09:26:48Araqand keep in mind that I'm bad at type theory.
09:31:31FromGitter<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:08Yardanicomatrix irc bridge crashed again! consistency!
09:45:50skrylar:(
09:46:04*BitPuffin quit (Ping timeout: 260 seconds)
09:47:32TheLemonManAraq, 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:10skrylari 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:51AraqNim evaluates from left-to-right.
09:54:58Araqit will be in the spec soon.
09:55:11Araqand the C++ backend will be fixed.
09:57:10Yardanicois it ok if compiler crashes if I try to print a variant object via echo?
09:57:27FromGitter<Varriount> TheLemonMan == LemonBoy?
09:57:28AraqTheLemonMan: it's not clear if the "is convertible" relation can be mapped to <:
09:58:52TheLemonManVarriount, yep
09:59:30Araqbut 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:31FromGitter<Varriount> TheLemonMan: Cool. I've been really impressed with the contributions you've made.
09:59:46TheLemonManAraq, if you see isConvertible as a "weaker" isEqual it may be fine
10:00:01skrylarAraq, dont we evaluate in math-esque order?
10:00:40Araqskrylar: well obviously function calls have to be evaluated from inside-out or whatever you want to call it
10:01:01TheLemonManaren't arrays covariant in T?
10:01:34TheLemonManVarriount, compiler work is a wonderful (and productive) way to relax
10:02:22Araqarrays are neither covariant nor contravariant.
10:02:25Yardanicois 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:52AraqYardanico: no, 'seq' works with recursive value types
10:02:58Yardanicook, thanks for the info
10:03:13Araqand yeah, $ cannot handle that, this bug has been reported at least ten times now
10:06:17TheLemonMangotcha, 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:40skrylarhttp://mesos.apache.org/ is this something we should care about?
10:10:43*endragor quit (Remote host closed the connection)
10:10:56skrylarpoking around to see what their apis are like; i guess its supposed to make random stuff more erlang-y
10:12:52Araqah! Section 15.6 "Coercion semantics for subtyping"
10:12:58Araqseems to cover it...
10:13:45FromGitter<mratsim> @skrylar Mesos should be a library I think. Just do well on a single CPU, then worry about 100k CPU.
10:15:41skrylarmratsim: skimming over their talk, it sounds neat, but i have no use for these :\
10:16:12skrylarapparently it just goes over protobuf
10:17:30FromGitter<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:36AraqTAPL 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:33FromGitter<tim-st> is there no difference between a variable `var a = 1` and `var a* = 1` in global scope, regarding implementation?
10:45:02Araqno.
10:47:36FromGitter<tim-st> ok, thought without `*` it can be translated to a var passed as addtional param to each function
10:50:14FromGitter<tim-st> and then it can be created in the scope where it's called first
10:51:34*Ven`` joined #nim
10:52:26FromGitter<tim-st> Araq: is it bad when I dont close a FileStream?
10:52:41FromGitter<kayabaNerve> World-ending bad
10:53:15skrylarit might get closed by a finalizer but you should still close them
10:53:28FromGitter<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:48skrylario handles are technically a finite resource :f
10:54:12FromGitter<tim-st> I cannot give JsonNode a finalizer, afaik a finalizer calls for each object of same type
10:54:27FromGitter<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:33FromGitter<codem4ster> Hi I wrote this (https://tio.run/##hVJNa9tAEL3rVwzkkoIwxlAKghJaesshJS30YHxYSWPvxqsdZTWqpf55d/bDdpySFCSkmXnz5s2HM93xaLqePMPoTEMtFgXPPRYAXyYzwGdAN3ZiAWjy5g85VraE3@jZNMpKQJ5vxmPDhtxLuMUtl@DNTstn7Eto6eAS/iu5cbg3rs14iAkH8m0paczoixNKEB63QPWTVADawiMRP9RPMWMvFNWFLfq60bLprUFfgXEciH48j8rju0ytYlXB4@gwmlPKDb/z5bcOhXK9c4tVpo@O2O2VZ@yvzDCDsyNo@26J31KWxnJzA0NqYMBdh46BtWJolIMagUfvgkASCmXjDIdTmj
10:57:33FromGitter... 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:33FromGitter... nim-lang/Nim?at=5b51c01db2411177a25cec2a]
10:58:49dom96You should really put that link through a URL shortener :)
10:59:21FromGitter<zetashift> it shwos it shortened in gitter
11:00:26FromGitter<codem4ster> I'm using markdown with gitter. I think its because IRC :( Sorry.
11:00:33FromGitter<krux02> in irc the link is split into multiple messages
11:01:10FromGitter<zetashift> https://bit.ly/2LzCIO9 for da irc peeps
11:03:22Yardanico@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:50Yardanicooh, and also
11:04:27Yardanicoyou can't assign like this "board.squares[x][y]" because Nim doesn't know the lenght of the seq.
11:04:59krux02(offtopic) I am proudly downloading all the data google has about me. It is 742 MB of data.
11:05:13Yardanicokrux02, yeah, I downloaded it once too
11:05:17Yardaniconothing interesting ;)
11:05:26krux02well it is all the data about me
11:05:38krux02I also downloaded the data from facebook it was just 7MB
11:05:49krux02I think facebook is hiding most of it's data.
11:06:00FromGitter<codem4ster> how can I implement a game board like this, then.
11:06:16krux02I 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:21krux02that data I could not find
11:06:47krux02also the data that they collect via the fb-thumb integration on other websites.
11:06:53krux02I could not find anything about that.
11:07:06krux02I think facebook wants a big EU fine.
11:07:31Yardanico@codem4ster something like https://gist.github.com/Yardanico/dcaccd73e02f0f8340816d4feebea36e
11:08:01FromGitter<narimiran> @codem4ster use `newSeq`
11:08:36FromGitter<narimiran> or if you know the width and height in advance, you could use array instead of seq
11:08:47krux02wow I found my bookmarks
11:08:48Yardanicoyeah, (if you know width and height at compile time)
11:09:07krux02whenever I did bookmarks on chrome, I saw this funny bookmark animation. And the it was gone
11:09:10krux02never saw it back
11:09:18krux02now I see all the bookmarks in a file
11:09:20krux02that is handy
11:09:52*nsf quit (Quit: WeeChat 2.1)
11:14:07FromGitter<Yardanico> @codem4ster also, are you sure you will need inheritance?
11:14:10FromGitter<Yardanico> for your objects
11:14:34FromGitter<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:37FromGitter<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:24Yardanico@codem4ster well, it's because seq is not initialized
11:22:06Yardanicoyour 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:27FromGitter<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:44FromGitter<codem4ster> ok thats great ;) what about which line the problem is?
11:29:43FromGitter<narimiran> @codem4ster see @Yardanico's code, lines 49 and 52
11:30:13FromGitter<narimiran> he initializes the seqs, and gives them the wanted length
11:30:38FromGitter<codem4ster> nope I tried to say; is devel version saying the line number, where is the problem.
11:30:43Yardanicoyes
11:30:52Yardanicowell, not quite :P
11:31:07FromGitter<codem4ster> bad news then :)
11:31:16Yardanicobut it will if you wrap your code in a proc
11:31:18Yardanicolike main
11:32:11Yardanicoafter 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:19Yardanicoignore folder name (nimnbt) :)
11:33:11FromGitter<codem4ster> oh ok. I will make this `main` a habit :)
11:35:53skrylarhum. i guess rkt is dead
11:37:55FromGitter<narimiran> isn't `main` implicit in nim, so we don't have to do it?
11:42:03skrylarusually it is
11:46:42FromGitter<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:58FromGitter<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:02Araqhttps://www.technologyreview.com/s/611568/evolutionary-algorithm-outperforms-deep-learning-machines-at-video-games/ offtopic, but at least it's programming related
13:11:52FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51df98f9ffc4664bef3fe0]
13:12:12FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51dfac4b880b3e6a399eb3]
13:15:45skrylarthere was something.. i forget the name now
13:16:15skrylarwell short version if you compare deep learning's AIC score to an evolutionary system's AIC score the evo systems win
13:16:28skrylarbecause they end up learning more general solutions with less data
13:16:40skrylarbut are super duper sensitive to your grading function
13:17:56skrylari think kurzweil also wrote in his books that nuance used genetic solvers to tune his speech recognizers
13:19:31FromGitter<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:38skrylarkrux02: 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:59skrylari guess kubernetes is trying to dump docker like a dock fire
13:21:45krux02I have never used docker, but it seems to spread like a wiled fire. People seem to really like it.
13:23:51skrylarcontainers are useful
13:24:28skrylari 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:47skrylarthen screw around trying to figure out how to get `runc` and OCI containers to bind sockets :|
13:25:56krux02not everything that is "dead" is bad. Some things are just good reliable software that doesn't need constant patching.
13:26:16krux02but I agree when it sayis "I am dead" then it is probably superseeded by some other project
13:30:38skrylarthe 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:12Yardanicohttps://github.com/exercism/nim/pull/99 :D
13:47:30FromGitter<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:42FromGitter<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:23FromGitter<mratsim> aka, a paper about something that has been used for several years already ...
13:54:50FromGitter<narimiran> @Yardanico i still don't see nim on the main page
13:55:01Yardanico@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:40FromGitter<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:29FromGitter<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:37FromGitter<tim-st> if you mean it's deault value, I think it's Rune(0)
14:09:36FromGitter<tim-st> also you are using $Rune(0) you have to compare if data == Rune(0) or data.int == 0
14:12:49FromGitter<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:54FromGitter<codem4ster> Great. Thanks @tim-st. I think I need some time to get used to type conventions in Nim.
14:13:27FromGitter<tim-st> You can just look at underlying type, it's int32 if I remember correct. int32 default is 0
14:13:29FromGitter<narimiran> @codem4ster here are some quick style-fixes: http://ix.io/1hQl/
14:13:47FromGitter<narimiran> oops, not @codem4ster but @tim-st
14:13:59FromGitter<narimiran> good dammit, i mean @amscotti
14:14:04FromGitter<tim-st> ^^
14:14:06FromGitter<codem4ster> :D
14:14:49FromGitter<narimiran> sorry for the confusion, it is friday afternoon and i'm about to go home from work
14:15:22FromGitter<amscotti> @narimiran Thanks!
14:15:58FromGitter<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:20FromGitter<amscotti> @tim-st So, I can use `countup` with a step of 2.
14:16:35FromGitter<tim-st> yes, and check mod 5
14:16:53FromGitter<tim-st> I also you could use Miller Rabin, but maybe that's overkill
14:16:56FromGitter<tim-st> *also
14:17:12FromGitter<codem4ster> @tim-st it worked like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b51eee8e06d7e74098fcd88]
14:18:45FromGitter<tim-st> that looks a bit cleaner I think: `if data.int != 0: dataStr = $data`
14:19:02FromGitter<codem4ster> its default is Rune(0) I think because I didn't fill that field of square initially.
14:19:41FromGitter<tim-st> yes
14:22:21*leorize quit (Ping timeout: 240 seconds)
14:22:59FromGitter<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:08FromGitter<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:10FromGitter<codem4ster> I got it. Thanks. :)
14:29:25FromGitter<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:36FromGitter<mratsim> you need to start at 3
14:30:42FromGitter<mratsim> special case the 2
14:30:45FromGitter<mratsim> start at 3
14:30:48FromGitter<mratsim> count 2
14:30:53FromGitter<mratsim> countup 2
14:31:17FromGitter<mratsim> I’ve added my review, your `count` variable should be renamed `candidate`
14:31:34FromGitter<mratsim> otherwise I think it’s good
14:31:56FromGitter<amscotti> @mratsim Thanks!
14:31:56FromGitter<mratsim> the tests can be more exhaustive though.
14:32:11FromGitter<amscotti> The test are from the main project
14:32:45FromGitter<amscotti> They are not from the individual language tracks
14:33:00FromGitter<mratsim> ah I see
14:38:22*miran joined #nim
14:41:25FromGitter<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:52FromGitter<Quelklef> Should it be ceiling(sqrt(n))?
14:45:13FromGitter<amscotti> @Quelklef I’ll give that a try
14:45:53*cspar joined #nim
14:46:12FromGitter<amscotti> No, still getting errors when using ceiling
14:46:28FromGitter<Quelklef> what case
14:49:32FromGitter<amscotti> prime(1) == 2, prime(1) was 3 ⏎ prime(2) == 3, prime(2) was 5 ⏎ prime(6) == 13, prime(6) was 17
14:50:38FromGitter<Quelklef> ?
14:50:46FromGitter<Quelklef> Which cases? I'm confused what that means
14:50:47FromGitter<amscotti> "Given a number n, determine what the nth prime is"
14:50:57FromGitter<Quelklef> got it
14:50:57FromGitter<amscotti> Seems to be off by 1.
14:51:09FromGitter<Quelklef> Oh and you're doing it with looping and isPrime?
14:51:46FromGitter<amscotti> Yup
14:51:47FromGitter<narimiran> @amscotti does the example have to be efficient, or should it be as basic/simple as possible?
14:52:01FromGitter<Quelklef> Any reason you're not using a sieve?
14:52:56FromGitter<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:03FromGitter<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:10Perkolhttps://bpaste.net/show/6b0521e33d5d This function still crashes the whole program on error. What to do?
15:01:34PerkolDespite being wrapped in except try block
15:03:28FromGitter<amscotti> @narimiran agree.
15:06:39FromGitter<mratsim> @amscotti because in programming we start counting at 0
15:09:15FromGitter<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:12miranif 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:58miranbtw, @mratsim, is `n.toFloat` preferred way to use for "sqrting", or is just `n.float` better?
15:13:50FromGitter<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:11miran:)
15:14:16FromGitter<mratsim> floats cannot represent all integers if you go other 2^32
15:16:06FromGitter<mratsim> but for this exercise it’s fine, it can be “left as an exercise to the reader"
15:16:31miranok, 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:31FromGitter<mratsim> I never used to toY proc, i wasn’t even aware of them :P
15:19:35*chopzwei joined #nim
15:20:16miranhehe, same here - that's why i'm asking :)
15:21:05FromGitter<Quelklef> How does `Y(x)` even work?
15:21:11FromGitter<Quelklef> In general
15:22:11FromGitter<mratsim> I think it checks if a converter exists
15:22:47FromGitter<mratsim> for inherited types and distinct types it also works automatically.
15:23:19*benjikun2 joined #nim
15:23:49FromGitter<Quelklef> what if there are multiple?
15:24:41FromGitter<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:09miran@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:38miranneither "configure --token=xyz" works, nor "exercism download --exercise=hello-world --track=nim"
15:31:57*xylef quit (Ping timeout: 240 seconds)
15:32:16FromGitter<kaushalmodi> miran: They refreshed the token on v2
15:32:17FromGitter<amscotti> What error are you getting from the `configure` command?
15:32:44FromGitter<amscotti> Yeah, there been a lot of changes with the update for V2.
15:32:45FromGitter<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:53miran@amscotti: "Incorrect Usage. (...) flag provided but not defined: -token"
15:33:19FromGitter<amscotti> Is your `exercism` up to date?
15:33:40miranso i used "--key" instead of "--token", don't know if that's what is correct
15:33:40FromGitter<kaushalmodi> miran: With the latest exercism cli, just run `exercism configure`
15:33:48mirani have used the version from AUR
15:33:50FromGitter<kaushalmodi> AFAIS it got rid of `--` from switches
15:34:06FromGitter<amscotti> I think you can run `exercism upgrade` to make sure you have the newest.
15:34:17miranand now i see that AUR version is flagged out of date
15:36:40FromGitter<kaushalmodi> miran: easiest way to install it if you have `go` installed is:
15:36:43FromGitter<kaushalmodi> ```go get -u -v github.com/exercism/cli/exercism```
15:37:02FromGitter<kaushalmodi> It will install it in `~/go.apps/bin` by default
15:37:10mirani upgraded it
15:37:14FromGitter<kaushalmodi> ok
15:37:32FromGitter<mratsim> @Quelklef probably ambiguous call
15:38:18miranyup, now it seems to work
15:38:32FromGitter<amscotti> Sweet! :)
15:46:26*leorize joined #nim
15:48:04*ieatnerds joined #nim
15:48:14ieatnerdsHi!
15:49:57*benji__ joined #nim
15:53:47*benjikun2 quit (Ping timeout: 244 seconds)
15:57:58FromGitter<mratsim> Hello cannibal ;)
15:58:23ieatnerdsI swear its only wonka nerds ;)
15:58:55*chopzwei quit (Ping timeout: 250 seconds)
16:00:49ieatnerdsI 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:18FromGitter<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:43miranieatnerds: 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:34miranhere's my code: `for coord in maze: dfs(coord); break # Nim doesn't have HashSet.pop()`
16:08:36miranand another one with the same theme `for d in allowed: result = (d, period); break`
16:09:01miranif somebody knows a better way, i'm all ears
16:09:29ieatnerdsEven if theres a way to just make the set into a sequence or other data type, I'd take it.
16:09:37ieatnerdsThanks 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:22FromGitter<mratsim> sets do not remember insertion order so you can’t pop
17:32:22FromGitter<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:33FromGitter<mratsim> And the corresponding proc: https://github.com/mratsim/golem-prime/blob/master/src/core/c_empty_points.nim
17:33:33ieatnerdsI'' take a look o0nce im out of work, Thank you so much!
17:33:37ieatnerdsI'll*
17:37:05FromGitter<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:19ieatnerdsI dont need anything super efficient, I'm just derping around with generational algo's.
17:39:00ieatnerdsMy 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:21FromGitter<mratsim> what’s a generational algo?
17:41:03ieatnerdssorry genetic/evolutionary. basically starts of ith some random algorithms that are supposed to get better at a task over time.
17:41:22ieatnerdshttps://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:35FromGitter<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:12miran@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:06miranthat 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:41FromGitter<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:10FromGitter<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:16FromGitter<tim-st> "object invariants can't have the same property in each case of match"
19:05:22FromGitter<tim-st> at least I think he means the object fields of different variants cant have the same
19:06:03FromGitter<tim-st> @deech "and returns them inside a new sequence."
19:06:49FromGitter<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:24FromGitter<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:31FromGitter<deech> I'm trying to evaluate how suitable Nim is for functional programming which relies on immutable data structures and node sharing.
19:15:27Araqit does not help you much but it's entirely possible
19:15:45Araqincluding Closure-like mega awesome finger tries
19:15:57AraqI think somebody had a nimble package for that
19:16:51FromGitter<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:30FromGitter<deech> A link to that package would be very helpful. I've already seen https://github.com/vegansk/nimfp.
19:19:13FromGitter<rayman22201> This one by @PMunch I think? https://github.com/PMunch/nim-persistent-vector
19:19:30FromGitter<deech> Nice!
19:20:22FromGitter<rayman22201> I've never used it so I can't vouch for it's quality. YMMV
19:20:59PMunchIt's based on the Clojure implementation, so the performance should be decent :)
19:21:40FromGitter<rayman22201> and you can always complain to @PMunch if you have problems :-P
19:21:59PMunchHaha, always :)
19:27:51FromGitter<Varriount> @rayman22201 I wonder what algorithm Chrome uses for matching previously visited URLs
19:27:51FromGitter<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:12FromGitter<mratsim> @Varriount Bloom filters are probably the most efficient
19:30:02miranok, so to access a random element, my ugly hack with breaking immediately from a for-loop is the best we can do?
19:30:07FromGitter<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:17FromGitter<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:19FromGitter<mratsim> HashSets uses seq as a backend, but the seq is private so you’re out of luck
19:33:24FromGitter<rayman22201> @Varriount good question. I think Chrome just feeds it into Google's search honestly. It probably just phones home
19:34:07FromGitter<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:11FromGitter<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:22FromGitter<Varriount> miran: Does the set contain an enum without holes?
19:34:36FromGitter<mratsim> @Varriount it’s a HashSet
19:34:41FromGitter<rayman22201> It probably does some caching
19:34:45FromGitter<Varriount> Ah. Hm.
19:35:39FromGitter<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:17FromGitter<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:18FromGitter<mratsim> copy the HashSet source code, add a random function @miran ;)
19:37:25miran@mratsim my oneliner seems easier `for element in mySet: doSth(element); break`
19:37:56FromGitter<Varriount> In Python you would probably do `del myDict[choice(myDict.keys)]`
19:38:27FromGitter<mratsim> @miran, but it’s not random?
19:38:28FromGitter<Varriount> Sorry, `del myDict[choice(myDict.keys())]`
19:39:10miran@mratsim: it isn't, but i needed *any* element, so this is good enough for me
19:39:26FromGitter<mratsim> ah I see
19:39:46miran@Varriount, you would use `dict.pop(key)` in python, of course ;)
19:40:21miranand there is also `dict.popitem()` which: "Remove and return an arbitrary (key, value) pair from the dictionary."
19:42:37FromGitter<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:28FromGitter<Varriount> miran: Oh, I thought you wanted a non-destructive operation.
20:00:14FromGitter<Varriount> miran: Also, keep in mind that arbitrary != random, it just means "up to the implementation".
20:00:32mirantrue, sorry for the confusion
20:00:56FromGitter<Varriount> For example, popitem() in Python 3's dictionary implementation seems to return the most recently added key/value pair.
20:01:17FromGitter<Varriount> Since dictionaries in 3.6 became ordered by default.
20:08:27*dorelix quit (Ping timeout: 240 seconds)
20:10:25Calinouis it just me or enableTrueColors() is not working?
20:10:31Calinou(export COLORTERM="truecolor" works anyway)
20:13:37Calinoualso, what would be a nice way to format colored messages in my code?
20:13:47Calinoucalling setForegroundColor/setBackgroundColor in-between echo prints sounds pretty bad :(
20:18:44FromGitter<Varriount> Calinou: Isn't there a echoStyle proc or something?
20:19:07FromGitter<Varriount> https://nim-lang.org/docs/terminal.html#styledEcho.m,varargs[untyped]
20:19:07Calinouoh yeah, styledEcho
20:29:29*dom96 added a little banner to nim-lang.org to hopefully advertise the survey more
20:29:41dom96Consider this another reminder for you guys to answer the survey :)
20:33:28CalinouI answered yet
20:33:40Calinouironically, I started writing something in Nim just after answering it :P
20:33:43FromGitter<kayabaNerve> dom96: How long has it been out for?
20:33:50FromGitter<kayabaNerve> I forget if I've done it lol
20:33:53dom96Almost a month now
20:33:58FromGitter<kayabaNerve> If your answer is months, I did it when it released
20:34:02FromGitter<kayabaNerve> Yeah I think I did it
20:34:50Calinouhttps://i.imgur.com/WzKkqAX.png
20:34:51Calinou:D
20:35:16CalinouI'm rewriting a Node.js CLI app I made to Nim
20:35:34dom96nice
20:35:50dom96bet it runs much much much much faster :D
20:36:09Calinouyeah
20:37:11Calinouaccording 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:57dom96great, you should publish it on Nimble :)
20:39:36Calinouin 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:54CalinouI do use a CLI framework that's known to be slow though
20:40:11CalinouI 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:30TheLemonManmratsim, is it possible to do a parallel fold with stride along a given tensor axis?
20:48:23dom96Calinou: The only problem with docopt sadly is that it depends on `re` which in turn depends on pcre :/
20:48:50FromGitter<kaushalmodi> Calinou: Look at cligen
20:49:09FromGitter<kaushalmodi> https://github.com/c-blake/cligen
20:49:47Calinoudom96: I already use re to parse hsl()/hsv() color declarations
20:50:25dom96ahh, then it's perfect
20:50:35dom96Hopefully soon we'll be able to integrate nim-regex into the stdlib
20:50:40Calinoudoes the dependency on PCRE make it harder to build on Windows?
20:51:07dom96no, it just means you need a pcre.dll
20:51:42FromGitter<kaushalmodi> cligen allows easily creating sub command helps
20:52:41FromGitter<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:52CalinouI don't need subcommand help here, it's a fairly simple utility
20:53:03Calinouit's not Git :P
20:53:23FromGitter<kaushalmodi> Right, just saying that subcommand help is there if you need. It of course has regular help command support too.
20:54:52FromGitter<kaushalmodi> the thing is that it interprets the switch names from the linked proc params
20:55:13FromGitter<kaushalmodi> example.. the only cligen code is ⏎ ⏎ ``` dispatchGen(nistow, ⏎ version = ("version", "0.1.0"))``` [https://gitter.im/nim-lang/Nim?at=5b524c30c579673e6b8428d8]
20:55:15FromGitter<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:34FromGitter<kaushalmodi> but the help it generates is: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b524c4605e1cc3553fdb143]
20:55:54FromGitter<kaushalmodi> it derives those short/long switch names from that `nistow` proc parameters linked to cligen
20:56:22FromGitter<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:34Calinouhow can I pass truecolors to styledEcho?
20:58:57Calinouthe example works, but I don't know how to pass true colors (which seem to be created using setForegroundColor/setBackgroundColor only)
20:59:37dom96I don't think styledEcho supports that
20:59:42Calinouaw
21:01:12*icebattle quit (Ping timeout: 244 seconds)
21:03:41*ng0 quit (Quit: Alexa, when is the end of world?)
21:04:31Calinouhow can I echo without having a newline at the end?
21:04:49Calinou(I Ctrl+F'd in the manual and didn't find an answer) :P
21:04:57miranstdout?
21:05:15Calinouin stdout, yes
21:05:24miranstdout.write
21:05:38FromGitter<kaushalmodi> Calinou: Are you on devel?
21:05:47Calinouyeah
21:05:58Calinouthanks, stdout.write works
21:05:59FromGitter<kaushalmodi> use `styledWrite` for no-newline colored echoes
21:06:25FromGitter<kaushalmodi> `stdout.styledWrite`
21:07:22Calinoudoes it support truecolor?
21:07:40FromGitter<kaushalmodi> Calinou: i am trying to figure that out
21:07:45FromGitter<kaushalmodi> .. looks like it should
21:08:07FromGitter<kaushalmodi> dom96: Wondering why styledEcho shouldn't support truecolor..
21:08:16FromGitter<kaushalmodi> with this code in devel: https://github.com/nim-lang/Nim/blob/060871e64ac9d665430d4d9ae912bf7a379ee976/lib/pure/terminal.nim#L699-L730
21:08:38dom96because truecolor support is very recent and the person that implemented likely didn't think to implement it for styledEcho
21:08:54FromGitter<kaushalmodi> I don't understand macros yet
21:09:07Calinouoh, that reminds me
21:09:09FromGitter<kaushalmodi> In that macro, when is `styledEchoProcessArg` reached?
21:09:16Calinouwhat should I use for looping over a range, countup() or {start..end}?
21:09:18FromGitter<kaushalmodi> because we have: ⏎ ⏎ ```template styledEchoProcessArg(f: File, color: Color) = ⏎ setTrueColor f, color``` [https://gitter.im/nim-lang/Nim?at=5b524f7e4b880b3e6a3af342]
21:09:20Calinouthe latter seems to work for me
21:09:47*xet7 joined #nim
21:09:49FromGitter<kaushalmodi> Calinou: either `countUp` or `1 .. 4` would work
21:10:47FromGitter<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:05Calinouyeah, 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:58Yardanicogoodbye, 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:22Calinouthanks for the help :)
21:24:04FromGitter<kaushalmodi> Calinou: I don't have a terminal set up with truecolors.
21:24:41FromGitter<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:54FromGitter<kaushalmodi> For Windows system terminals, it calls some different API
21:25:44FromGitter<kaushalmodi> With a compliant terminal, this should have worked: ⏎ ⏎ ```enableTrueColors() ⏎ styledEcho(colAliceBlue, "aliceblue text")``` [https://gitter.im/nim-lang/Nim?at=5b52535805e1cc3553fdc507]
21:29:56Calinouyeah, I saw that
21:30:12Calinouif you call enableTrueColors(), the variable needs to be set, which makes sense but I'd like it to be always enabled
21:30:29Calinou(at least unless the user explicitly disables it)
21:30:41Calinouyou 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:55FromGitter<kaushalmodi> ok
21:31:57FromGitter<kaushalmodi> works!
21:32:10FromGitter<kaushalmodi> I just set env var `COLORTERM` to `truecolor`
21:32:34FromGitter<kaushalmodi> then ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b5254f2c579673e6b844050]
21:33:17FromGitter<kaushalmodi> (https://files.gitter.im/nim-lang/Nim/VKcg/image.png)
21:33:53FromGitter<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:42FromGitter<Vindaar> took long enough, but seems to work fine for me
21:57:51FromGitter<Vindaar> (https://files.gitter.im/nim-lang/Nim/Y4ja/true_color_terminal_.png)
21:58:07FromGitter<Vindaar> was trying to get a prettier range of colors, but failed :D
21:59:11FromGitter<Vindaar> there's some color banding due to printing of only 64 hex values in steps of 4
21:59:18FromGitter<Vindaar> And I just print spaces
22:06:28*pqflx3[m] joined #nim
22:08:31FromGitter<Vindaar> (https://files.gitter.im/nim-lang/Nim/Y5Wf/viridis.png)
22:09:37FromGitter<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:11FromGitter<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:44FromGitter<rayman22201> not good enough. must write a new terminal emulator in Nim :-P j/k
22:36:36FromGitter<Varriount> What I sorta wish the whole color-code-escape mechanism supported is a count of bytes/characters that should be colored.
22:37:44FromGitter<Varriount> Otherwise you end up in situations where ctrl+c-ing a program causes the colors to go wonky.
22:39:32Araqlength prefixes are un-Unixy though. it's better to have stupid escaping rules. after all, who has ever seen a wrong &amp; on a website.
22:40:12FromGitter<rayman22201> lol. Yeah. It's a "won't fix" situation
22:40:24Araqah!
22:40:49Araqnow it all makes sense: "won't fix" == "unfix" == "unix"
22:41:32FromGitter<rayman22201> lol
22:42:13FromGitter<kaushalmodi> @Varriount You can reset the colors in Ctrl+c handler, finally: and other places? right?
22:42:50FromGitter<Varriount> The Ctrl+c handler doesn't get called if a program is forcibly terminated, unfortunately.
22:42:56FromGitter<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:34FromGitter<kaushalmodi> `reset`
22:43:42FromGitter<kaushalmodi> :)
22:43:53FromGitter<Varriount> Hm, can a parent process detect if a subprocess gets killed?
22:43:59FromGitter<rayman22201> lol. yup. turn it off and on again :-P
22:44:05FromGitter<kaushalmodi> No
22:44:12FromGitter<Varriount> :/
22:44:30FromGitter<kaushalmodi> That's a command to reset the terminal
22:44:40FromGitter<kaushalmodi> Doesn't restart the computer
22:44:52FromGitter<kaushalmodi> Try it /not kidding
22:45:11FromGitter<kaushalmodi> See "man reset". There should be an entry
22:45:16FromGitter<Varriount> Yes, but the fact is that you still have to reset the terminal maunally.
22:45:16FromGitter<rayman22201> I know about reset. I was making a joke
22:45:24FromGitter<kaushalmodi> Ok
22:45:42Araqbe a man and press reset after you killed your cat 9 times.
22:46:12FromGitter<kaushalmodi> @Varriount I agree. `reset` was a workaround, not a solution.
22:46:55FromGitter<kaushalmodi> Araq: Didn't get the reference to that. Also not at computer right now.
22:47:21Araqit will grow on you.
22:49:51FromGitter<kaushalmodi> https://stackoverflow.com/a/18607773/1219634
22:56:26dyce[m]could a library like this be useful with nim? https://github.com/Puchaczov/Musoq
22:56:27dyce[m]or is it mostly novelty
22:58:25Demos[m]https://gitlab.gnome.org/GNOME/libgda
22:58:36Demos[m]https://github.com/StefanSalewski/gintro
22:58:56Demos[m]it can work. it's rare to actually want to use sql on something that isn't a database though
23:22:25FromGitter<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:00FromGitter<rayman22201> Didn't BeOS try something like that?
23:34:34FromGitter<rayman22201> https://arstechnica.com/information-technology/2018/07/the-beos-filesystem/
23:39:01FromGitter<rayman22201> It's actually kind of a cool idea. Might be better than everything is a file