<< 07-09-2019 >>

00:00:05*laaron- quit (Remote host closed the connection)
00:01:26*Hideki_ quit (Remote host closed the connection)
00:03:53*laaron joined #nim
00:05:15*Hideki_ joined #nim
00:09:38*Hideki_ quit (Ping timeout: 245 seconds)
00:35:09*laaron quit (Remote host closed the connection)
00:36:08*snooptek quit (Remote host closed the connection)
00:37:16*laaron joined #nim
00:40:18*laaron quit (Remote host closed the connection)
00:41:53*laaron joined #nim
00:42:19*owl_000 quit (Ping timeout: 250 seconds)
00:43:15*Hideki_ joined #nim
00:55:43*Hideki_ quit (Ping timeout: 258 seconds)
01:03:23*laaron quit (Remote host closed the connection)
01:07:25*laaron joined #nim
01:19:01*endragor joined #nim
01:26:18*endragor quit (Remote host closed the connection)
01:28:03*gangstacat quit (Quit: Ĝis!)
01:31:53*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
01:32:03*laaron- joined #nim
01:48:03*laaron- quit (Remote host closed the connection)
01:50:42*laaron joined #nim
02:00:08*laaron quit (Remote host closed the connection)
02:03:52*laaron joined #nim
02:22:29*gangstacat joined #nim
02:26:13*owl_000 joined #nim
02:30:14*Hideki_ joined #nim
02:41:29*vesper11 quit (Ping timeout: 250 seconds)
02:41:48*Hideki_ quit (Remote host closed the connection)
02:42:00*Hideki_ joined #nim
02:43:25*Hideki_ quit (Remote host closed the connection)
02:43:40*Hideki_ joined #nim
02:44:11*Hideki_ quit (Remote host closed the connection)
02:44:55*Hideki_ joined #nim
02:45:52*Hideki_ quit (Remote host closed the connection)
02:46:07*Hideki_ joined #nim
02:47:59*vesper11 joined #nim
02:48:39*snooptek joined #nim
02:49:29*Hideki_ quit (Remote host closed the connection)
02:50:15*Hideki_ joined #nim
02:54:56*Hideki_ quit (Ping timeout: 258 seconds)
03:07:00*Hideki_ joined #nim
03:08:18*Hideki_ quit (Remote host closed the connection)
03:30:38*dddddd quit (Remote host closed the connection)
03:34:25*chemist69 quit (Ping timeout: 252 seconds)
03:36:34*chemist69 joined #nim
03:39:08FromGitter<AmberSaber> nim中文网站上线了,一和令人兴奋的里程碑事件
03:40:25FromGitter<AmberSaber> Nim Chinese website is online,the thing is exciting and a milestones
03:41:24*Hideki_ joined #nim
03:51:23*Hideki_ quit (Ping timeout: 268 seconds)
04:37:52*matlock joined #nim
04:41:02*matlock quit (Read error: Connection reset by peer)
05:11:02Araqfederico3: unfortunately it requires a stdlib extension... :-)
05:12:57*matlock joined #nim
05:14:33owl_000https://play.nim-lang.org/#ix=1Utz how to write object to a file, and load it again. `writeFile` just write string to a file, to convert that string to object do i need to make parser? please look at the code.
05:17:11FromGitter<alehander42> yes, that's called serialization iirc
05:17:51FromGitter<alehander42> many languages have something like a builtin format for their objects, called marshalling but i think it's not used much, because you can't really read it well with other tools/langs
05:18:06FromGitter<alehander42> so usually people use something like json/yaml/binary formats/their own format
05:18:45FromGitter<alehander42> in your case i guess json or yaml would work
05:19:01*laaron quit (Remote host closed the connection)
05:21:25*laaron joined #nim
05:23:44owl_000for example, in python i just used `pickle`, `pickle.dump(object, outputfile)`, i found something simillar, https://nim-lang.org/0.19.0/marshal.html though hard to understand
05:24:15FromGitter<alehander42> yes, that's marshalling
05:24:33FromGitter<alehander42> but i just don't see the point
05:25:36FromGitter<alehander42> hm, nim's marshalling just reuses json, so it might be fine
05:26:45FromGitter<alehander42> so, pickle.dump is just writeFile(outputfile, dumpOperation(object))
05:28:54owl_000but that is the easiest thing. and you were talking about this https://nim-lang.org/docs/json.html ?
05:28:57FromGitter<alehander42> what is dumpOperation? if you use marshal.nim, it's `$$object`, if you use directly json it's e.g. `$(%object)`
05:28:59FromGitter<alehander42> etc
05:29:04FromGitter<alehander42> yes
05:31:10owl_000thanks a lot. i need some time to grasp those module.
05:33:29FromGitter<alehander42> have you used json
05:33:31FromGitter<alehander42> in other langs
05:35:19owl_000nope, i used python and pickle only. pickle work fine. fast and any kind of data structure work perfectly. by the way once i tried HDf5 something like that. but it works limited type of object.
05:35:21FromGitter<alehander42> Araq, what do you mean about the `do` notation
05:36:13FromGitter<alehander42> owl_000, ah ok, well json/yaml other formats work in a similar, bit more lang-independent way
05:36:34Araqowl_000: marshal.nim is Nim's "pickle"
05:40:25FromGitter<alehander42> wow the https://github.com/nim-lang/Nim/issues/12152 curl command is taking so long for my
05:43:24FromGitter<alehander42> hm, for me its' taking 3.3
05:43:29FromGitter<alehander42> 1) 4 sec*
05:44:35FromGitter<alehander42> however federico3 this is not a pretty good bench imo
05:44:46FromGitter<alehander42> because in nim, i'd just deserialize directly to the type
05:44:54FromGitter<alehander42> without going through a JsonNode if possible
05:47:07FromGitter<alehander42> this should be faster maybe (i'd also benchmark https://github.com/status-im/nim-json-serialization )
05:48:35FromGitter<alehander42> but i agree it's not nice that you need to write down a type for this kind of data: but .. ⏎ it might to gen it based on some kind of schema ⏎ or to just have a tool that generates nim types based on example lines, you run it once on the file, it generates a nim type that seems to fit), on the next time you run it with CT known type
05:50:14Araqit's not a benchmark, it's what he is dealing with in the real world
05:50:32AraqI made it 3x faster, but it requires a stdlib patch... :-(
05:50:44AraqI mean, not a patch, an extension
05:51:35FromGitter<alehander42> yeah, but what i meant is that probably it would be better to have this kind of tooling, so one can directly deserialize real world random json documents
05:51:40FromGitter<alehander42> to typed values
05:52:16FromGitter<alehander42> not to json nodes (but maybe the cost of json nodes/packedjson is more in accessing, not in constructing?)
05:53:23FromGitter<alehander42> something like json "schema" inferrence (but yeah, this doesnt work for many other json files where the data isn't well "typed")
05:53:57*owl joined #nim
05:55:24*solitudesf joined #nim
05:57:47*owl_000 quit (Ping timeout: 250 seconds)
06:25:31*owl quit (Ping timeout: 250 seconds)
06:31:08Araqdriveling? the lack of a schema is not the performance problem
06:32:48FromGitter<alehander42> ok, then why is it slow
06:33:33FromGitter<alehander42> (and even if it is not perf-related, i'd use such a tool: i prefer my json handling typed)
06:40:00Araqthe lines iterator is slow, it can be completely avoided with json's design
06:40:09Araqbut it requires a new proc in json.nim
06:45:43FromGitter<alehander42> 3x impro
06:45:50FromGitter<alehander42> sounds good enough as a reason
06:46:21FromGitter<alehander42> is that because lines constantly reads small chunks from the file?
06:53:18Araqit's ... just bad for 1MB long lines
06:58:10*laaron quit (Remote host closed the connection)
06:58:25FromGitter<alehander42> ok
07:00:00*gmpreussner quit (Quit: kthxbye)
07:01:21*laaron joined #nim
07:04:32*gmpreussner joined #nim
07:09:06*laaron quit (Remote host closed the connection)
07:11:13*laaron joined #nim
07:47:51*Hideki_ joined #nim
07:52:24*Hideki_ quit (Ping timeout: 258 seconds)
07:59:46*laaron quit (Remote host closed the connection)
08:02:56*laaron joined #nim
08:16:28*doesntgolf quit (Quit: WeeChat 1.9.1)
08:17:51*dddddd joined #nim
08:21:10*Trustable joined #nim
08:28:37*Vladar joined #nim
08:48:33*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
08:48:51*laaron joined #nim
09:09:13*nsf joined #nim
09:18:13federico3alehander42: regardless of other formats or any optimization, a simple parseJson() should be much faster than Python (now it's much slower)
09:33:57*ng0 joined #nim
09:38:11livcdthat's a bummer
09:38:34federico3Araq: I just timed the cycles. Large strings are faster
09:40:22*laaron quit (Remote host closed the connection)
09:40:25*solitudesf quit (Ping timeout: 268 seconds)
09:43:12dom96is it just me or is this syntax a no-brainer for concepts? https://github.com/nim-lang/Nim/pull/12048#issuecomment-529091854
09:43:15*alexander92 joined #nim
09:44:07alexander92dom96 , the thing i dont get about your argument is
09:44:30alexander92that this syntax just sees concepts as .. interfaces?
09:44:35alexander92concepts are not interfaces
09:45:28dom96concepts are compile-time interfaces
09:46:25alexander92i feel they are not really comparable
09:46:36dom96they literally are lol
09:46:47alexander92well, they are not
09:46:49dom96as I've demonstrated, you can specify the same things with less code
09:47:05dom96the extra complexity is simply not worth it
09:47:38alexander92in this particular case you can do that indeed
09:48:14alexander92but i viewed as a more general mechanism, which just happens sometimes to be similar to interfaces
09:48:19alexander92viewed them*
09:48:23*laaron joined #nim
09:48:27dom96a more general mechanism for what?
09:48:36dom96They are used to specify whether a type is accepted or not
09:49:46alexander92evaluating if a semantic match will be true in certain situations
09:50:46alexander92but "this type has such an overload" is just one possible thing to evaluate
09:51:01dom96what else would you evaluate?
09:51:25dom96like I said, I bet there are niche cases but I doubt they are important enough to warrant this extra complexity
09:51:43*laaron quit (Client Quit)
09:51:44dom96and I strongly believe that it is very difficult to understand what a concept actually specifies
09:53:49alexander92it's a good question: i'd love to see more examples too (but there has been so many discussions and rationale-s, that i think those things surely have been explained before)
09:54:09dom96Anyway, I think I'll create an RFC for this
09:54:10alexander92do you mean, that the current syntax is harder to read?
09:54:18alexander92sounds good
09:54:25dom96the current syntax requires evaluation in your head
09:54:32alexander92but ..
09:54:36alexander92your syntax does too
09:54:39dom96if you're wondering what proc you're missing you'll have to go through the full concept
09:54:39alexander92in some cases
09:54:41dom96no it doesn't
09:54:42alexander92your syntax is easier
09:54:47alexander92but in some the concept is easier
09:54:49dom96you always have a list of procs/iterators
09:54:49alexander92because e.g.
09:54:53FromGitter<arnetheduck> concepts say "this code should be possible to run" and it seems like there's a finite set of rules which would make a concept match - it seems that @dom96's interface is effectively what the compiler generates "under the hood" from the concept. I'd have two questions then: a) is there any open-ended rule which the compiler cannot expand, and b) are the so many rules and alternate syntaxes in nim that's its no longer
09:54:53FromGitter... feasible to write them by hand in an interface (for example because some of the magic around iterators and for loops etc)
09:54:55alexander92i have to evaluate
09:55:26alexander92"oh .. so items is called .. when i use for .. oh so this is what it should happen here ..
09:55:40dom96you should already know this
09:55:49alexander92but the point is that you should also already know
09:55:51dom96that's a fundamental thing to know about Nim :P
09:55:52alexander92how to read concpts
09:55:55alexander92:P
09:55:55*Ven`` joined #nim
09:56:02dom96yes, but the point is that you need to evaluate a concept
09:56:05dom96because it is Nim code
09:56:10dom96that even the compiler has to evaluate at compile-time
09:56:20alexander92well, it's more of a "those things should type match"
09:56:24alexander92not really like a macro
09:56:35alexander92you shouldn't evaluate, but typecheck
09:56:37alexander92in your head
09:56:43alexander92which is an important difference imo
09:56:46dom96var x = type(c.low) # okay, so this takes a type of the `low` proc, and this low proc is called on `c` which is the concept so actually this is the return type of proc low()
09:56:53*laaron joined #nim
09:57:08alexander92well, you should know this, it's basic Nim :P
09:57:39dom96come on
09:57:43dom96you know what I mean
09:57:48alexander92i just think in both cases, you need to do some type checking in your head and some juggling
09:57:54alexander92just with different tradeoffs
09:58:06dom96I disagree
09:58:12FromGitter<arnetheduck> I get the feeling it quickly gets hairy when you have many potentially matching rules of overloads and alternate syntaxes, that in the end you don't really understand what the concept picks, and just "hope" it works
09:58:14alexander92as i said, i find some cases easier to read/understand in concepts, and some in method listst
09:58:32alexander92@dom96 well, that's language design, it's a bit subjective
09:58:55alexander92i think araq also had some rfc ideas
09:59:51alexander92and i'll still try to keep in mind c++ discussions about concepts @dom96
10:00:05alexander92in a similar way we followed e.g. rust async discussions
10:00:57dom96but just to be clear: `type(c.low)` # this is being evaluated to get a type
10:01:11dom96proc low(c: Indexable): T # there is nothing to evaluate here
10:01:22alexander92i wouldn't call it evaluate: it's just typechecking
10:01:35alexander92it depends what you mean by
10:01:38alexander92"evaluating"
10:01:59dom96no, it is evaluation
10:02:09dom96type() is a call
10:02:21dom96it in itself is a procedure
10:02:42alexander92ok, but you need that in your concepts as well
10:03:07alexander92i need to be able to say e.g. a(b: int, c: type(arg.low))
10:03:22dom96no, you don't
10:03:28dom96and you shouldn't
10:03:34dom96you specify this as I've specified it
10:03:45dom96by writing `proc low(arg: T): Y`
10:04:02dom96and then you write proc a(b: int, c: Y)
10:04:17alexander92so do i need to
10:04:21alexander92i see
10:04:29alexander92so i need to make Y a generic arg of the concept as well
10:04:50dom96yes
10:05:09alexander92dom, just clarifying: i think that the type call in concepts internally does the same thing : it "expands" to a similar typecheck
10:05:21alexander92so the evaluation is mostly something in my head
10:05:26alexander92otherwise iagree
10:05:27dom96I don't think so
10:05:31alexander92but i'd say .. your syntax is harder
10:05:40alexander92instead of doing directly c: type(arg.low)
10:05:46dom96concepts are evaluated at compile-time, just like macros
10:05:49alexander92i have to find out there is a low declaration
10:06:05alexander92yes, and like .. normal type checking
10:06:14dom96it might be a little more to type, but there is in fact less lines of code
10:06:31dom96normal type checking doesn't evaluate Nim code
10:06:38dom96it just verifies that types match
10:06:47alexander92evaluating type checks
10:06:55alexander92yes, but type doesn't really ..
10:06:58alexander92call a type ct proc
10:07:00alexander92i think
10:07:06alexander92but i have to read more of the impl
10:07:10alexander92to be sure, you might be right
10:07:30dom96oh cool, we've got a RFC template now
10:08:18alexander92but you have to also notice concepts had "return" planned
10:08:23alexander92with would work iirc for vtables
10:08:34alexander92and also permits patterns i can't really imagine with normal interfaces
10:08:52alexander92and which i wanted to use e.g. for my `jsobject` thing etc
10:08:53dom96what do you mean by "return"?
10:08:56alexander92(just saying a possible usecase)
10:09:23alexander92i think it generated a new / or a concrete type which could be used based on the args
10:09:48alexander92probably similar to c++ concepts' return
10:10:24dom96well, if you mean runtime concepts then I know what you mean
10:10:32alexander92overally, i've heard they're more similar to type classes, and c++ concepts
10:10:32dom96that's likely way easier with my syntax too
10:10:36alexander92not really interfaces
10:10:53alexander92but i am just trying to find out the relevant discussion
10:11:18dom96or actually it might be easier
10:11:27dom96maybe zah intended to simply evaluate the code in a concept at runtime
10:11:47dom96with `type(x) is Blah` replaced with `x of Blah`
10:14:20alexander92no , i dont think so but i am not an expert
10:14:22alexander92https://github.com/nim-lang/RFCs/issues/13#issuecomment-298886380
10:14:41alexander92just adding one more previous discussion about it
10:16:02alexander92i see the point in your rfc, but i just feel it's really about a different feature: but i'd love to see the comments
10:17:14*ng0 quit (Quit: Alexa, when is the end of world?)
10:18:43*hoijui joined #nim
10:18:57*krux02 joined #nim
10:19:13dom96alexander92, cool, thanks for finding this
10:26:10alexander92and it's interesting to compare with https://en.cppreference.com/w/cpp/language/constraints as well
10:28:12alexander92but as i said, i am interested in seeing how far would a declaration-list syntax take this: *maybe* those things are somehow expressible
10:28:39alexander92but even if not, one can currently write a macro that does what your syntax does and use e.g. concepts in the background afaik
10:31:14*KMan_CA joined #nim
10:31:26dom96yes, but another argument is that concepts are currently buggy
10:31:31*clyybber joined #nim
10:31:36dom96my syntax would likely be significantly simpler to implement
10:31:46dom96but I'll let Araq be the judge of that
10:31:58dom96honestly wouldn't be surprised if he has a similar syntax in mind
10:32:06dom96we've talked about simplifying concepts for a long time
10:32:33dom96yeah, that C++ has it isn't a good argument :P
10:33:53dom96but nah, I shouldn't make that argument
10:34:08dom96we should evaluate C++'s constraints indeed
10:34:31alexander92yes, it's good to have an objective view of it
10:34:36clyybberOne "problem" with your syntax is that the name of the proc arguments seems to matter
10:34:52dom96same problem with proc types
10:34:58alexander92the bluenote10 comment raises
10:35:00alexander92good points
10:36:01*hoijui quit (Quit: Leaving)
10:36:09*KMan_CA left #nim (#nim)
10:36:30clyybberI like the current concept syntax, but I believe we can support both syntaxes at the same time. Its not like they are going to conflict
10:37:06alexander92@dom96 about the buggy point: if you use just the subset that does "a.<methodname>(stuff) is X"
10:37:19alexander92i think you shouldn't have bugs
10:37:30alexander92so i feel one can still make such a syntax on top of it
10:37:50dom96hrm, I don't think in `x.len` that the `len` can refer to the template or a macro
10:38:04dom96but if it's `len(x)` then sure
10:38:53dom96so yeah, good point
10:39:18alexander92i'd argue this is not the biggest thing: one can imagine a "callable len(x: A): int"
10:39:22dom96indeed
10:39:29alexander92but the inferring thing is interestin
10:39:39dom96and I was just trying to come up with a good name
10:39:41dom96thanks :)
10:39:55alexander92np
10:40:21dom96the inferring is what makes it so difficult to understand
10:40:26dom96and I think it's a good thing that it's disallowed
10:48:41dom96Trying to understand what zah means here:
10:48:42dom96As a minimum, any alternative proposal should also cover how associated types (e.g. Graph.Edge) and constants are defined (e.g. T.zero).
10:48:55dom96from https://github.com/nim-lang/RFCs/issues/13#issuecomment-298886380
10:55:40*hoijui joined #nim
10:59:49*owl_000 joined #nim
11:04:00dom96https://github.com/nim-lang/RFCs/pull/167
11:11:38FromDiscord_<me2beats> Are proc arg brackets not unnecessary?
11:11:38FromDiscord_<me2beats> proc too = echo "Hello"
11:11:52FromDiscord_<me2beats> Are proc arg brackets not necessary?
11:11:52FromDiscord_<me2beats> proc too = echo "Hello"
11:12:02FromDiscord_<me2beats> Are proc arg brackets not necessary?
11:12:02FromDiscord_<me2beats> proc foo = echo "Hello"
11:13:14FromDiscord_<me2beats> proc foo = proc foo() ?
11:13:38alexander92me2beats hey
11:14:02alexander92just a tip: please dont edit your discord messages, because they get resent each time, which people might feel spammy
11:14:19alexander92so, arg brackets are not necessary
11:14:23FromDiscord_<me2beats> oh ok
11:14:31FromDiscord_<me2beats> cool
11:14:43alexander92except when you call `noargcall()` i think
11:16:18FromDiscord_<me2beats> really newbie. How can I make a module and import it in main?
11:16:49FromDiscord_<me2beats> for example this proc foo
11:16:56alexander92it's fine!
11:17:18alexander92well, you need to save it in a file, and "export" it with `*` : `proc foo*` (same as making public)
11:17:30alexander92then you import this file/module
11:17:35alexander92have you used python
11:17:42FromDiscord_<me2beats> +
11:18:11FromDiscord_<me2beats> This is my main lang for now
11:19:00alexander92python? ok so it works similarly, but import module
11:19:16alexander92means you can directly call foo, no need for `module.foo` (but you can do it as well)
11:19:26alexander92@dom96 hm .. the problem is that len can be a field
11:19:35alexander92so callable isn't perfect
11:19:59alexander92maybe `property`
11:20:12alexander92not really sure , property is not so good for multi-args tho
11:21:40alexander92and you should at least mention the inferrence thing, as it's pretty important
11:23:58dom96it's just a case of coming up with a name
11:24:39Araqdom96: I've evaluated what C++ concepts can do fwiw
11:25:36dom96Araq, afaik my proposal is very similar to yours, so hopefully you'll like it
11:27:05dom96bbl, time to go to the store
11:31:44*Kaivo quit (Quit: WeeChat 2.5)
11:32:53FromDiscord_<me2beats> Can I implicitly import modules from a specific folder?
11:33:21Araqyeah but I'm not gonna show you how because it's a bad idea, instead use the 'prelude' pattern
11:37:07FromDiscord_<me2beats> I would like to clarify a bit.
11:37:07FromDiscord_<me2beats> that is, in certain cases I do not want to write 'import' lines ...
11:37:07FromDiscord_<me2beats>
11:37:08FromDiscord_<me2beats> Instead I would like the program to find undeclared variables and, for example, try to first find the module with the appropriate name in a specific folder, and only if the module is not found, throw the 'not declared' error
11:38:13owl_000read tut 1
11:40:56FromDiscord_<Kiloneie> https://nim-lang.org/learn.html
11:41:27FromDiscord_<Kiloneie> If you are a total beginner use Bim Basics otherwise Tutorial Part 1 trough 2.
11:41:34owl_000side note: it is nim lang, things should be done in nim way. if not than every lang will be same. and if you force a lang to behave like other than it will taste bitter.
11:43:12alexander92me2beats yes, it's important to learn the difference between compile and runtime
11:43:22FromDiscord_<Kiloneie> me2beats: Quick question, what attracted you to Nim ?
11:43:33alexander92the not declared error is thrown not by your program, but bu the compiler
11:44:15alexander92overally, you can do something similar with making a file which imports and exports all files in a folder and importing only this file
11:44:23alexander92but take a look at the tut indeed
11:45:18Araq# myprelude.nim
11:45:33Araqimport strutils, os, tables, sets
11:45:39Araq# other code.nim
11:45:46Araqinclude myprelude
11:46:01Araq# yay, no messing around with imports
11:46:18Araq^ this is the pattern I meant, it works, it's clear
11:47:02livcdi'd like goimports
11:47:23Araqyeah and I'd like Golang to work like Nim
11:47:35owl_000lol
11:47:52alexander92i do this sometimes
11:49:35*Hideki_ joined #nim
11:53:21livcd:)
11:53:46*Hideki_ quit (Ping timeout: 246 seconds)
11:55:53*hoijui quit (Ping timeout: 245 seconds)
11:57:39FromGitter<mratsim> So what can C++ concepts do?
11:57:55FromDiscord_<me2beats> @Kiloneie Well, I read the reviews and they are pretty positive. there is an opinion that nim can provide more flexibility than python, including syntactic ones (tho it hasn't such variety of modules for now)
11:58:55FromDiscord_<Kiloneie> What are you going to use it for ?
11:59:03FromDiscord_<me2beats> And it's just an interesting language to learn no doubt
11:59:20FromDiscord_<Kiloneie> Hmm okay, good luck.
12:02:20FromDiscord_<me2beats> I think apps with a GUI interface.
12:02:20FromDiscord_<me2beats> Maybe simple 2d games.
12:02:30FromDiscord_<me2beats> @Kiloneie
12:03:06FromDiscord_<Kiloneie> Okay
12:04:48owl_000for gui, you can use `nigui`. though many features are missing but easiest one. for full feature windows gui development use `wnim`
12:10:28*hoijui joined #nim
12:12:33*hoijui quit (Remote host closed the connection)
12:12:46*hoijui joined #nim
12:17:08*krux02 quit (Remote host closed the connection)
12:20:38FromDiscord_<me2beats> thanks
12:21:05FromDiscord_<me2beats> if I import all modules from a folder,
12:21:05FromDiscord_<me2beats> but I use only a few of them, does this not affect the exe size?
12:22:00FromDiscord_<Kiloneie> file size should be the least of your worries, one does such optimizations later when finishing a program
12:23:10FromDiscord_<Kiloneie> Best way is to just experiment. Import one and then all, and compare to see the difference if it matters at all.
12:28:40FromDiscord_<Kiloneie> Araq: Is this more what you had in mind for an intro to Nim ? https://justpaste.it/703w7
12:33:01clyybberme2beats: Nim has dead code elimination, so all code that is not used won't end up in the binary
12:41:31FromDiscord_<me2beats> Ok cool, so I probably can not worry about it and maybe just import all from such folders
12:44:11*ofelas joined #nim
12:44:56alexander92yes, that's not a problem
12:46:01FromDiscord_<me2beats> if I can advise something to improve the article, then I would advise a little more formatting, highlighting items and key blocks, as well as a few screenshots maybe.
12:48:06clyybberme2beats: Its the script for a video
12:48:30*Hideki_ joined #nim
12:48:49FromDiscord_<me2beats> Oh ok:)
12:57:56*Hideki_ quit (Remote host closed the connection)
12:58:40*Hideki_ joined #nim
13:02:58*Hideki_ quit (Ping timeout: 245 seconds)
13:10:42*hoijui quit (Ping timeout: 268 seconds)
13:34:00*Hideki_ joined #nim
13:41:52*krux02 joined #nim
13:46:28*Hideki_ quit (Ping timeout: 246 seconds)
14:00:31*nsf quit (Quit: WeeChat 2.5)
14:05:23*snooptek quit (Ping timeout: 258 seconds)
14:14:24*snooptek joined #nim
14:14:31*Perkol joined #nim
14:21:32FromGitter<zetashift> P
14:38:13clyybberI agree :)
14:41:22FromDiscord_<Kiloneie> Is there any better way than making a additional account on windows 10, so i can have the other one with icons and everything hidden ? Making a new desktop cannot do that.
14:46:10*hoijui joined #nim
14:51:59disruptekwhy don't you just delete the icons?
14:54:07FromDiscord_<Kiloneie> from my main desktop ?
14:54:54disrupteksure.
14:55:07disruptekwhat good is an icon you cannot see?
14:55:10FromDiscord_<Kiloneie> No, i need for recording of Nim, a clean desktop, but when not recording, i want that back, so for now i found making another account and moving every icon to my secondary screen is the only way. Maybe theres a better one but i don't know it
14:55:42*abm joined #nim
15:00:14*Ven`` quit (Quit: Textual IRC Client: www.textualapp.com)
15:02:35*solitudesf joined #nim
15:02:56*alexander92 quit (Ping timeout: 268 seconds)
15:11:15*hoijui quit (Ping timeout: 244 seconds)
15:11:45*Perkol quit (Quit: Leaving)
15:18:46*alexander92 joined #nim
15:25:36*alexander92 quit (Quit: WeeChat 2.4)
15:27:14*nsf joined #nim
15:42:04*Romanson joined #nim
15:43:01*owl_000 quit (Ping timeout: 246 seconds)
15:43:32*Trustable quit (Remote host closed the connection)
15:48:55clyybberKiloneie: Been a long time since I last used windows, but I think it was right-click on desktop -> View -> Show/Hide desktop icons
15:54:05lqdev[m]I don't have any icons on my Linux lol
15:54:24lqdev[m]I find them redundant and cluttering my desktop
15:54:35disrupteki don't even have a desktop. 🙄
15:55:02clyybberlqdev[m]: Same
15:55:11clyybberdisruptek: Living in tmux?
15:55:21disruptektiling wm
15:55:29clyybberbspwm?
15:55:33disrupteksway
15:55:38clyybberAh, wayland
15:55:55clyybberDoes sway use wlroots?
15:56:05disruptekyeah.
15:56:11disruptekit's pretty great.
15:58:56clyybberI wonder if something like sxhkd is possible now with wayland or some wlroots protocol
15:59:19disrupteki think line noise is possible with pretty much any line.
15:59:50clyybberLast I checked the compositor itself had to handle keyboard input
16:00:23clyybberWhen wayland gets the modularity I'm used to from the X11 environment, Im gonna do the swtich
16:00:26disrupteklooking at this, i don't see anything special here. i do this stuff now.
16:01:19disruptekwhat specifically do you want to be able to do?
16:02:11clyybberI want to have the compositor seperate from the window manager seperate from the input-handler
16:02:36clyybberOr at least I think its a good idea to have those seperate
16:03:13clyybberSo far wayland compositors have to do all three of those things
16:03:16clyybberAFAIK
16:03:56disrupteki dunno. i've never been a floating wm person. been using tilers since ion, though i took a break from linux on the desktop for about a decade.
16:04:15disrupteki just can't stand the weight and interop of conventional desktops.
16:04:34clyybberSame, I only use tiling wms
16:04:51disruptekpoint is, i'm not bothered by the cozy relationship between input and my compositor. 😉
16:05:07*nsf quit (Quit: WeeChat 2.5)
16:05:24clyybberUnderstandable, as long as it works, it works :)
16:05:36disrupteki like being able to summon my irc window and float it / focus it, with a single keypress. and then send it away with another.
16:05:55*Hideki_ joined #nim
16:05:58disrupteki'm not desperate to keep those keys a secret from the compositor.
16:06:56clyybberMe neither, but with my current setup, I can control bspwm(the window manager) via shell commands
16:07:02clyybberWhich are run by sxhkd
16:07:27clyybberAnd sxhkd can run any script, which makes it convinient for customization
16:07:29disruptekimport json
16:07:29disruptekfh = open("j")
16:07:29disruptekfor line in fh.readlines():
16:07:29disruptek x = json.loads(line)
16:07:29disruptek if x["test_version"] == "nah":
16:07:35disruptekoops.
16:07:53disrupteki can't reproduce this slow json problem. did you look at it?
16:08:09clyybberNope
16:08:18disruptekhere's something that may appeal to you: https://github.com/disruptek/i3ipc
16:08:58clyybberOh, thats really cool, thanks!
16:09:18disruptekpretty crude. just what i needed to do my stuff.
16:10:03*Hideki_ quit (Ping timeout: 245 seconds)
16:13:33*Romanson quit ()
16:13:33clyybberdisruptek: Takes ~5 seconds for me
16:14:45clyybber~4 with -d:danger
16:14:49FromDiscord_<Kiloneie> I got my main programs in start menu custom folder/group, whilst everything i installed on the desktop(just so i know i actually have it xD)
16:15:13FromDiscord_<Kiloneie> Also maps, Nim folders etc, stuff i can't just hide.
16:15:42disrupteknot sure what's going on (if there's even a problem), but if the result of this thread is that we find a tweak that doubles or triples speed, even for a rare breed of env, that seems pretty worthwhile.
16:17:41disruptekkiloneie: i don't think anyone really cares too much what icons you have on your desktop.
16:18:36FromDiscord_<Kiloneie> Was just explaining what solution i was looking for, but yeah, sorry about that.
16:18:48disruptekno, i mean, i wouldn't sweat it too much. :-)
16:19:22disruptekyou could throw up some art in a window behind what you're working on, right?
16:19:28disruptekjust to hide your porn folders?
16:20:15clyybbermaybe you can use rainmeter to hide it
16:20:29clyybberdisruptek: You mispelled "homework"
16:20:47*disruptek 🤣
16:21:27disruptekah the days of running screensavers on the root window.
16:22:16clyybberah the days of modularity
16:23:12clyybberI have a script somewhere that streams NASA footage to my root window
16:23:56disrupteki had 40 local traffic cameras, back when i used to drive a towtruck.
16:24:07clyybberneed to patch it to use xwinwrap, and then it will work with compton too
16:24:43clyybberdisruptek: Huh, for what?
16:24:54clyybberTo watch out for wrongly parked vehicles?
16:25:06disruptektraffic accidents.
16:25:22disruptekbut, i didn't really drive a towtruck. i just liked watching people who had to commute in snow.
16:25:29clyybberLol
16:26:36disruptekin case you hadn't gathered, i'm a bit of a prick.
16:27:46disruptekwhat i'm missing in wayland: client surface scaling and cropping.
16:28:27disruptekit's just not implemented yet, afaict.
16:29:01disruptekas araq says, features start off in the unfortunate state of `unimplemented`. such a great line. 😝
16:30:15clyybberheh
16:33:06lqdev[m]so true
16:34:35FromDiscord_<Kiloneie> oO you guys are weird.
16:36:08clyybberOo
16:37:53*wildtrees joined #nim
16:40:32clyybberI really need to write a branch debug macro
16:40:51clyybbers/branch/control flow
16:40:51dom96I don't suppose there is any particular reason why the default order for sorting an OrderedTable is Ascending whereas for CountTable it's Descending? https://nim-lang.org/docs/tables.html#sort%2COrderedTable%5BA%2CB%5D%2Cproc%28%2C%29 https://nim-lang.org/docs/tables.html#sort%2CCountTable%5BA%5D
16:41:06FromDiscord_<Kiloneie> I am just trying to make in more profesional, a clean desktop where i will be installing VS Code and Nim, so users can follow, that's why i asked if you guys know a better solution to hide it, not to hide porn xD...
16:41:36disruptekdom96: the reason is that the argument is optional and it was added recently, so i had to leave the default as it existed previously.
16:41:55disruptekkiloneie: there's nothing wrong with porn.
16:43:09dom96also, I don't suppose there is a way to find out what position a key is in after sorting a count table, is there?
16:43:17disruptekright.
16:46:22*NimBot joined #nim
16:59:35FromGitter<mratsim> we need a SortedTable
16:59:47clyybber!eval echo "Hello there, have I changed?"
16:59:50NimBotHello there, have I changed?
17:14:28*hoijui joined #nim
17:19:24*gec joined #nim
17:19:51*gec quit (Remote host closed the connection)
17:28:08FromGitter<alehander42> clybber what do you mean
17:28:21FromGitter<alehander42> by control flow debug
17:28:29FromGitter<alehander42> ah, the internal cf code ok
17:29:43disruptekthe uri module defines Url as a distinct string but doesn't seem to accept it for any public interface which otherwise accepts a URI/URL.
17:31:48dom96yeah, that type should be removed
17:32:43clyybberalehander42: Nope, I actually meant a macro that inserts echo "took this branch: condition" after if branches
17:32:56clyybberOr something like that, to make debugging easier
17:33:03FromGitter<alehander42> ok, this is hmm
17:33:08FromGitter<alehander42> where would you put the call
17:33:23clyybberInto the if branch
17:33:25FromGitter<alehander42> as a pragma for the function?
17:33:36FromGitter<alehander42> i see
17:34:01clyybberalehander42: The macro invocation I would put before the body I want to analyse
17:34:07FromGitter<alehander42> but then you need many ⏎ if condition: ⏎ debugCond() ⏎ elif condition: ⏎ debugCond() [https://gitter.im/nim-lang/Nim?at=5d73ea0f9dd2a1391f540e03]
17:34:08FromGitter<alehander42> ?
17:34:13FromGitter<alehander42> ah so
17:34:19FromGitter<alehander42> debugFlow: ⏎ if ..
17:34:21FromGitter<alehander42> ?
17:34:23clyybberYeah
17:34:33FromGitter<alehander42> yeah, sounds reasonable
17:34:38clyybberAnd since we indent with two spaces it can be easily injected adhoc
17:34:47clyybberwith one space
17:34:48FromGitter<alehander42> i've done something similar but based on gdb
17:34:55FromGitter<alehander42> so running in a different way
17:35:00clyybberalehander42: Oh cool, where is it?
17:35:08FromGitter<alehander42> well, it's closed source, sorry :(
17:35:20FromGitter<alehander42> a part of not released something
17:35:25clyybberAh, fine
17:35:26FromGitter<alehander42> but such a macro shoudl be simple
17:35:32clyybberYeah
17:35:38FromGitter<alehander42> more interesting is dealing with loops
17:36:27FromGitter<alehander42> e.g. rendering something like ⏎ ⏎ for i in collection: ⏎ ⏎ #looped: 0 , i = "a" in collection ... [https://gitter.im/nim-lang/Nim?at=5d73ea9b9df68757fa39b2f7]
17:36:28clyybberIndeed, one feature I could imagine is counting and printing the amount of iterations
17:36:33FromGitter<alehander42> etc
17:37:29FromGitter<alehander42> love it
17:37:37FromGitter<alehander42> well, i'd love to see such a macro
17:57:12*Trustable joined #nim
17:57:27*hoijui quit (Ping timeout: 268 seconds)
18:03:49clyybberzah: Am I right in the assumption that `Refinement concepts` aren't implemented yet?
18:04:56FromGitter<Clyybber> @zah
18:05:27disruptekleorize[m]: ping
18:06:30disruptekleorize[m]: seem to be running out of open file descriptors; have you seen this lately?
18:13:43FromGitter<zah> @Clyybber, yes, not implemented yet
18:19:59clyybber@zah Ah ok, I was trying to fix https://github.com/nim-lang/Nim/issues/6390 but didn't find the implementation :D
18:20:20clyybberWhat do refinement concepts provide over simple `x is SomeConcept` ?
18:22:56*nsf joined #nim
18:23:36clyybberAh, sorry rephrasing: WDYT about making the `of Concept` syntax simply inject `x is Concept` into the body?
18:24:07clyybberAnd removing the scope inclusion, as I think it's a bit confusing
18:31:09*ng0 joined #nim
18:31:18leorizedisruptek: that's possible?
18:31:52disruptekis your master branch still old?
18:32:09leorizeyea, master is untouched until I deem refactoring stable enough
18:32:21disruptekokie, i'll see if i can reproduce there.
18:33:49clyybberdisruptek: What does your limits.conf say?
18:34:06clyybberIn some distros the default is ridiculously low
18:34:07disruptekit was at 1024.
18:35:11disruptekwow, federico's problem is weird, but in a good way. looks like there might be a bug worth fixing.
18:36:34leorizewell the plugin does spawn a decent amount of fd when communicating with nimsuggest
18:36:39leorizebut those are shortlived
18:36:48leorizedefinitely can't reach 1024
18:37:57disruptekhmm, i don't think i've changed anything else in my editor lately. could be a newer nimsuggest issue.
18:41:01leorizethe only significant change is that I no longer call 'chanclose' on the end of a request
18:41:07leorizedon't know if this could be the culprit
18:42:00disrupteki have another issue with periodic freezes where my inputs just queue for a few seconds. i guess these could be related.
18:43:25leorizehmm, that's interesting
18:44:07disrupteki think that happens on master, too, though.
18:46:02leorizeis your `/tmp` mounted with tmpfs?
18:46:18disruptekyeah.
18:47:39leorizethen I have no idea what could be the bottleneck :/
18:48:26disruptekno biggie, i'll see if master helps and report back. 😉
18:48:36leorizesure :)
18:56:46*abm quit (Quit: Leaving)
18:57:38*kungtotte joined #nim
19:00:45*kungtotte quit (*.net *.split)
19:00:45*so quit (*.net *.split)
19:00:56*ng0 quit (Quit: Alexa, when is the end of world?)
19:03:37*so joined #nim
19:03:38*so quit (Max SendQ exceeded)
19:04:07*so joined #nim
19:04:07*so quit (Max SendQ exceeded)
19:04:38*so joined #nim
19:04:39*so quit (Max SendQ exceeded)
19:05:09*so joined #nim
19:05:10*so quit (Max SendQ exceeded)
19:05:42*so joined #nim
19:05:42*so quit (Max SendQ exceeded)
19:05:51*kungtotte joined #nim
19:05:54*mwbrown quit (Ping timeout: 268 seconds)
19:06:13*so joined #nim
19:06:13*so quit (Max SendQ exceeded)
19:06:46*so joined #nim
19:06:46*so quit (Max SendQ exceeded)
19:07:19*so joined #nim
19:12:43*clyybber quit (Quit: WeeChat 2.5)
19:14:56*mwbrown joined #nim
19:27:58*ng0 joined #nim
20:07:19*Hideki_ joined #nim
20:11:40*Hideki_ quit (Ping timeout: 252 seconds)
20:20:26disruptekaws sigv4 request signing: https://github.com/disruptek/sigv4
20:23:25FromGitter<awr1> https://github.com/disruptek/sigv4/blob/master/sigv4.nim#L141
20:23:47FromGitter<awr1> you know i don't think i've ever seen emojis supported in code except as like, a proof of concept, like "our terminal supports emojis now!"
20:24:50CalinouYarn's command line uses emoji :P
20:24:53disrupteki guess when you have a terminal emulator that lets you easily search/insert them, they become more common. 😉
20:25:02Calinou(only on supported platforms, IIRC they aren't displayed on Windows by default)
20:26:21FromGitter<awr1> i think the new terminal for windows has emojis
20:26:58*gangstacat quit (Quit: Ĝis!)
20:27:06FromGitter<awr1> `sortedByIt()`needs an order argument
20:28:31*matlock1 joined #nim
20:31:23disruptekyeah, when it works i will robustify it.
20:32:07*matlock quit (Ping timeout: 245 seconds)
20:45:36*Vladar quit (Remote host closed the connection)
20:48:14*gangstacat joined #nim
20:52:55*KMan_CA joined #nim
20:55:50*KMan_CA left #nim (#nim)
21:15:32*Trustable quit (Remote host closed the connection)
21:54:45*ng0 quit (Quit: Alexa, when is the end of world?)
22:16:14*nsf quit (Quit: WeeChat 2.5)
22:20:03*solitudesf quit (Ping timeout: 245 seconds)
22:42:12*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
22:45:33*laaron joined #nim
22:46:34*nif quit (Quit: ...)
22:46:46*nif joined #nim
23:14:04FromGitter<awr1> god i wish i had a SLI or crossfire system so i could know whether or not i'm managing device groups in vulkan correctly
23:41:54*krux02_ joined #nim
23:44:33skrylar[m]heh. i see some of the errors are still silly. working on some gui code again for nim and this line `proc copy*(from, too: var Tableau) =
23:44:39*krux02 quit (Ping timeout: 250 seconds)
23:48:29*laaron quit (Remote host closed the connection)
23:51:28*laaron joined #nim