00:00:17 | * | disrupteq joined #nim |
00:10:07 | * | disrupteq quit (Ping timeout: 272 seconds) |
00:10:45 | * | disrupteq joined #nim |
00:13:46 | FromGitter | <timotheecour> @jyapayne thanks !! lemme look into it, maybe will ping u in PM |
00:14:17 | FromGitter | <jyapayne> π |
00:14:36 | * | NimBot joined #nim |
00:16:45 | * | icebattle quit (Remote host closed the connection) |
00:20:24 | * | disrupteq quit (Ping timeout: 252 seconds) |
00:26:13 | * | disrupteq joined #nim |
00:30:43 | * | disrupteq quit (Ping timeout: 260 seconds) |
00:31:03 | FromDiscord_ | <Rika> Also dumlTree |
00:31:05 | FromDiscord_ | <Rika> Dump* |
00:31:37 | * | disrupteq joined #nim |
00:36:13 | * | disrupteq quit (Ping timeout: 265 seconds) |
00:36:36 | * | ng0 quit (Quit: leaving) |
00:36:52 | * | disrupteq joined #nim |
00:37:53 | * | krux02 quit (Remote host closed the connection) |
00:41:32 | * | disrupteq quit (Ping timeout: 265 seconds) |
00:42:08 | * | disrupteq joined #nim |
00:47:11 | * | disrupteq quit (Ping timeout: 268 seconds) |
00:47:28 | * | disrupteq joined #nim |
00:52:07 | * | disrupteq quit (Ping timeout: 268 seconds) |
00:52:13 | * | icebattle joined #nim |
00:52:43 | * | disrupteq joined #nim |
00:52:47 | * | rockcavera quit (Remote host closed the connection) |
00:53:15 | * | rockcavera joined #nim |
00:53:16 | * | rockcavera quit (Changing host) |
00:53:16 | * | rockcavera joined #nim |
00:54:50 | * | [rg] joined #nim |
00:55:58 | * | ofelas joined #nim |
00:56:50 | * | disrupteq quit (Ping timeout: 240 seconds) |
00:58:08 | * | disrupteq joined #nim |
01:02:26 | * | disrupteq quit (Ping timeout: 240 seconds) |
01:03:50 | * | icebattle quit (Ping timeout: 268 seconds) |
01:08:28 | * | disrupteq joined #nim |
01:13:16 | * | disrupteq quit (Ping timeout: 268 seconds) |
01:14:53 | * | disrupteq joined #nim |
01:23:14 | * | disrupteq quit (Ping timeout: 240 seconds) |
01:25:19 | * | disrupteq joined #nim |
01:32:06 | * | leorize joined #nim |
01:34:19 | * | disrupteq quit (Ping timeout: 272 seconds) |
01:35:48 | * | disrupteq joined #nim |
01:38:38 | * | vesper joined #nim |
01:39:13 | * | vesper11 quit (Ping timeout: 265 seconds) |
01:44:32 | * | disrupteq quit (Ping timeout: 268 seconds) |
01:46:13 | * | disrupteq joined #nim |
01:54:26 | * | disrupteq quit (Ping timeout: 240 seconds) |
01:56:44 | * | disrupteq joined #nim |
02:06:37 | * | disrupteq quit (Ping timeout: 272 seconds) |
02:12:11 | * | disrupteq joined #nim |
02:16:59 | * | disrupteq quit (Ping timeout: 260 seconds) |
02:18:32 | * | disrupteq joined #nim |
02:23:48 | * | lritter quit (Quit: Leaving) |
02:27:16 | * | disrupteq quit (Ping timeout: 268 seconds) |
02:28:55 | * | disrupteq joined #nim |
02:29:50 | * | chemist69 quit (Ping timeout: 252 seconds) |
02:31:48 | * | chemist69 joined #nim |
02:35:45 | * | disrupteq quit (Ping timeout: 272 seconds) |
02:50:16 | FromDiscord_ | <Rika> I need some advice; more info incoming, I need time to word this |
02:50:52 | FromDiscord_ | <Rika> How should I tackle the issue of representing a missing field, null, and the normal data in key for JSON? |
02:51:18 | FromDiscord_ | <Rika> I just realized that the api endpoint I'm using has different meanings for null and missing field |
02:51:39 | disruptek | the JNull variant represents null. |
02:51:57 | FromDiscord_ | <Rika> But it's the default for an Option type too, noP |
02:52:04 | FromDiscord_ | <Rika> No? * |
02:52:08 | disruptek | nah. |
02:52:18 | FromDiscord_ | <Rika> ? What do you mean |
02:52:35 | FromDiscord_ | <Rika> JNull maps to a none(T) does it not |
02:52:40 | disruptek | nah. |
02:52:48 | FromDiscord_ | <Rika> ? Hmm what does it map to |
02:52:57 | disruptek | newJNull() is a JsonNode of variant JNull. |
02:53:08 | FromDiscord_ | <Rika> I know |
02:53:29 | FromDiscord_ | <Rika> I mean |
02:53:39 | FromDiscord_ | <Rika> If you convert some json node with the to macro |
02:53:49 | disruptek | an option like Option[JsonNode] defaults to none(JsonNode). |
02:54:04 | FromDiscord_ | <Rika> Okay I should word this better |
02:54:12 | disruptek | i guess. |
02:54:19 | FromDiscord_ | <Rika> Recently, I've been unable to word my issues for some reason |
02:54:34 | disruptek | look in the mirror and smile. |
02:54:38 | disruptek | maybe you've had a stroke? |
02:56:14 | FromDiscord_ | <Rika> When converting a JsonNode to a certain type T with the "to" macro, how would it convert a missing field, given the field is an Option[T], and the field would have been a T have it not been missing |
02:56:25 | FromDiscord_ | <Rika> No doesn't seem like I've gotten a stroke |
02:56:27 | disruptek | i haven't used the new json to() macro and i didn't use the old one because it was broken. |
02:56:55 | disruptek | maybe supply some code to a paste service. |
02:57:07 | FromDiscord_ | <Rika> I should just test this no |
02:57:20 | FromDiscord_ | <Rika> I'll just do that, thanks anyway |
03:00:59 | FromDiscord_ | <Rika> Is embedding an image in discord okay for the bot? |
03:02:14 | disruptek | sure. |
03:02:48 | FromDiscord_ | <Rika> Would this not be a concern for JSON APIs that discern null from missing field? Hmm |
03:02:48 | FromDiscord_ | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/674449814695444480/Screenshot_20200205-120032.jpg |
03:02:52 | FromDiscord_ | <Rika> I think I worded this better now |
03:03:26 | disruptek | what does the playground say? |
03:04:20 | FromDiscord_ | <Rika> What do you mean? I embedded an image to playground |
03:04:33 | disruptek | well, that's not super useful, is it? |
03:04:41 | disruptek | what happens when you run it? |
03:04:45 | FromDiscord_ | <Rika> Both fields are none when one is a null field and the other is a missing field, what do you mean |
03:04:58 | FromDiscord_ | <Rika> That's the result when run, it's also on the image |
03:05:16 | disruptek | i can't read the image because discord is dumber than a sack of hammers. |
03:05:31 | FromDiscord_ | <Rika> Ah, the access violation |
03:05:54 | FromDiscord_ | <Rika> I'll do imgur then |
03:06:15 | disruptek | i don't think the to macro has any idea how to handle an Option type, though. |
03:07:10 | FromDiscord_ | <Rika> https://aeverr.s-ul.eu/0y3UySoK |
03:07:25 | FromDiscord_ | <Rika> It does, I'll add another field with a value |
03:07:32 | disruptek | great. |
03:07:56 | disruptek | why don't you just hit the "Share to ix" button and then paste the URL into discord? that's kinda the idea of the playground. |
03:09:35 | FromDiscord_ | <Rika> Maybe I did get a stroke. |
03:09:41 | disruptek | is your phone really your development machine? |
03:09:47 | FromDiscord_ | <Rika> https://play.nim-lang.org/#ix=2aNh |
03:09:59 | FromDiscord_ | <Rika> No, It's the one I have on me right no |
03:10:03 | FromDiscord_ | <Rika> Right now |
03:10:15 | disruptek | seems like it's working fine. |
03:10:15 | * | [rg] left #nim (#nim) |
03:10:30 | disruptek | JNull != JString. |
03:10:46 | FromDiscord_ | <Rika> I know, that's not the concern |
03:10:58 | FromDiscord_ | <Rika> JNull is treated the same as nonexistent value |
03:12:03 | FromDiscord_ | <Rika> I'll prolly just make another option-style type |
03:13:02 | disruptek | what do you think should happen? the types don't match. |
03:13:35 | FromDiscord_ | <Rika> Hmm |
03:13:43 | FromDiscord_ | <Rika> Yeah I'm still failing to express myself |
03:14:07 | FromDiscord_ | <Rika> I'll just do what I said above, make another type |
03:15:39 | disruptek | !pulls author:disruptek jnull |
03:15:41 | disbot | https://github.com/nim-lang/Nim/pull/12435 -- 3remove most nil<->JNull equivalence and raise nicer exceptions |
03:15:41 | disbot | https://github.com/nim-lang/Nim/pull/11907 -- 5nils are JNulls in json parsing and serializing |
03:15:52 | disruptek | it's an open problem. |
03:16:21 | disruptek | i think the behavior you see is correct, though. |
03:17:53 | disruptek | arguably, json should throw an exception because the field exists but the types are incompatible. |
03:19:12 | * | endragor joined #nim |
03:20:50 | disruptek | aha, yes i see what you're hitting now. JNull is a valid type even when the field is defined as, say, /string/ and the json value is a *JInt* -- seems broken to me. |
03:21:41 | disruptek | maybe JNull makes sense for an Option type (i'd suggest that it doesn't) but this compatibility "feature" seems pretty far from correct. |
03:29:58 | disruptek | ima submit an issue. |
03:36:11 | * | muffindrake quit (Ping timeout: 265 seconds) |
03:38:10 | * | muffindrake joined #nim |
03:38:21 | disruptek | #13334 |
03:38:23 | disbot | https://github.com/nim-lang/Nim/issues/13334 -- 3strange json to() macro behavior with respect to type conversion ; snippet at 12https://play.nim-lang.org/#ix=2aNp |
03:39:43 | yumaikas | o/ |
03:40:56 | * | cgfuh quit (Quit: WeeChat 2.6) |
04:20:22 | * | voltist joined #nim |
04:24:27 | * | voltist quit (Client Quit) |
04:27:33 | * | leorize quit (Remote host closed the connection) |
04:27:53 | * | leorize joined #nim |
04:44:54 | leorize | Araq: should assertions be disabled in -d:release |
04:44:55 | leorize | ? |
04:45:30 | * | rockcavera quit (Remote host closed the connection) |
04:47:31 | FromDiscord_ | <Rika> disruptek, I don't think that's my issue |
04:47:39 | FromDiscord_ | <Rika> But if it's another issue then that's interesting |
04:47:54 | disruptek | what's your issue? |
04:48:46 | FromDiscord_ | <Rika> It's really just "missing json fields doesn't have an equivalent in nim" |
04:48:59 | FromDiscord_ | <Rika> Which I said, I'd prolly be able to fix with another type |
04:49:06 | disruptek | i don't really know what that means. |
04:49:18 | * | nsf joined #nim |
04:49:42 | FromDiscord_ | <Rika> Yeah it's not a problem if you're given the original JsonNode |
04:50:03 | * | marmotini_ quit (Ping timeout: 260 seconds) |
04:50:24 | * | dddddd quit (Ping timeout: 246 seconds) |
04:50:28 | disruptek | the original jsonnode? |
04:55:02 | FromDiscord_ | <Rika> So if you want to convert your json into a type, and that json is missing a field which is in the type, then the type gets a none(T) instead of making an error (given that json type would be T and nim type would be Option[T] |
04:55:35 | disruptek | i think you're confused about how types work. |
04:55:37 | FromDiscord_ | <Rika> Error or whatever functionality would happen on missing field |
04:56:08 | FromDiscord_ | <Rika> I'm fairly confident that I know what I mean and that I said what my solution would be |
04:56:37 | FromDiscord_ | <Rika> I know that this is out of the scope of the json and options module and said that I would just make my own options-esque type |
04:56:59 | disruptek | your json /is a type/. |
04:57:34 | disruptek | a json string is a variant object with a discriminator of `kind`, which is itself of type JsonNodeKind. |
04:58:49 | disruptek | it's not at all out of scope for those modules. |
05:23:45 | leorize | shashlick: do you have any tests for running nimble script outside of nimble dir? |
05:23:57 | leorize | ie relative includes |
05:25:52 | * | greenfor` left #nim ("ERC (IRC client for Emacs 26.2)") |
05:35:58 | leorize | Araq: would you accept a switch to the compiler that fake the name of the current script that's being run? |
05:36:48 | leorize | this can be useful for tools that generate a script based on an another script (ie. nimble) |
05:36:56 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
05:43:53 | leorize | disruptek: I think I managed to tackle that one nimble bug |
05:43:58 | disruptek | sweet. |
05:44:38 | leorize | passed all tests, but nimble might not have tests to catch smt like this out |
05:45:18 | * | narimiran joined #nim |
05:57:56 | leorize | disruptek: see nim-lang/nimble#768 |
06:08:06 | * | s3govesus joined #nim |
06:08:57 | disruptek | wow, i wonder what that'll do to nimph. |
06:10:20 | disruptek | it's a good change even if it breaks nimph, of course. π |
06:24:58 | * | tefter quit (Quit: WeeChat 2.7) |
06:25:11 | * | Jjp137_ quit (Ping timeout: 265 seconds) |
06:26:52 | * | Jjp137 joined #nim |
06:42:08 | Araq | leorize: I thought about currentModule, currentLine, currentProc |
06:42:25 | Araq | is that what you have in mind? |
06:47:27 | disruptek | i have sleep in mind. gn araq |
06:48:00 | * | shota joined #nim |
06:48:10 | FromGitter | <timotheecour> @araq u here? |
06:48:19 | Araq | yeah |
06:48:43 | FromGitter | <timotheecour> so i think thereβs a major efficiency improvement left to be done for the outplace pr |
06:49:17 | FromGitter | <timotheecour> `"abc".>foo1.>foo2.bar3.bar4.>bar5.>bar6` should generate this code: β β ```code paste, see link``` β β but instead does a copy at each step [https://gitter.im/nim-lang/Nim?at=5e3a656c58f02e349763b745] |
06:50:09 | FromGitter | <timotheecour> I need to fix the code so that it generates this ^ instead of what PR generates; a bit heary, but shd be doable |
06:57:44 | Araq | how? it only works if the involved types for 'tmp' are the same |
06:58:38 | FromGitter | <timotheecour> anytime u have `.>` (as opposed to `.`) the input and output are the same type (in fact same address) |
06:58:48 | FromGitter | <timotheecour> so i need to group consecutive `.>` |
06:59:01 | FromGitter | <timotheecour> otherwise u end up with spurious copies |
07:01:39 | FromGitter | <timotheecour> simplest example being `let a = βfooβ.>bar.>baz` => should rewrite as: β β ```let a = block: β var x = "foo" β bar(x) β baz(x) β x``` β β and (correct me if iβm wrong) the compiler should optimize away the last copy as a move since its the last access [https://gitter.im/nim-lang/Nim?at=5e3a6852594a0517c269d915] |
07:04:25 | Araq | ok, well. go for it |
07:05:34 | FromGitter | <sheerluck> well `.>` used in PonyLang and `"abc".>foo1.>foo2` makes me uncomfortable. Sorry. |
07:06:12 | Araq | what does Pony use it for? |
07:06:31 | disruptek | nimph is failing arc tests: cannot bind another '=destroy' to: Regex:ObjectType; previous declaration was constructed here implicitly: /home/travis/.choosenim/toolchains/nim-#devel/lib/impure/nre.nim(271, 79) |
07:07:36 | disruptek | tomorrow, tomorrow, i love ya, tomorrow, you're only a day away. |
07:12:37 | Araq | disruptek: sure, good night |
07:14:37 | FromGitter | <sheerluck> Araq https://github.com/ponylang/pony-tutorial/blob/master/content/expressions/methods.md#chaining |
07:15:20 | Araq | oh cool |
07:15:29 | Araq | so that's my "operateOn" |
07:17:09 | Araq | maybe we can combine the ideas somehow |
07:46:13 | FromGitter | <Varriount> Gah, I dislike the new outplace operator even more than the last one. What's wrong with having a function? |
07:46:28 | FromGitter | <Varriount> (or rather, function call syntax) |
07:46:43 | * | shota quit (Remote host closed the connection) |
07:50:01 | * | shota joined #nim |
07:54:12 | * | solitudesf joined #nim |
07:58:05 | FromDiscord_ | <Rika> disruptek: you know, i'll just not continue trying to explain after this, but i DO NOT WANT TO HANDLE A JSONNODE AS IS, i want to convert it to a type with fields that i DO know and error or execute whatever functionality i want when a missing field is not there. i bet none of yall would understand what i mean again, hence me giving up this explanation |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:41 | FromGitter | <xflywind> Hi, can I ref proc ? I can't finish compiling these codes as below , and Nim compiler doesn't give any infos. β β ```type β MiddlewareHandler* = proc(ctx: int, next: ref MiddlewareHandler)``` [https://gitter.im/nim-lang/Nim?at=5e3a7629f6945f41ef5cf9a3] |
08:01:21 | FromGitter | <Varriount> I much prefer @Araq 's `./` |
08:03:00 | Araq | 'ref MiddlewareHandler' has likely never been tried before |
08:03:31 | Araq | use a seq[proc (ctx: int)] |
08:04:59 | * | gmpreussner joined #nim |
08:09:19 | Araq | Varriount: how would you deal with the problem? |
08:10:33 | FromGitter | <xflywind> Thanks @Araq .I need nest function.Type of `Next` is itself. β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e3a7879f6945f41ef5cfffe] |
08:11:11 | Araq | type Handler = proc (ctx: int; next: Handler) |
08:11:43 | Araq | but you will survive with seq, trust me |
08:14:08 | FromGitter | <xflywind> Thanks, I will try seq.I can't comile it. β β ```type Handler = proc (ctx: int; next: Handler)``` [https://gitter.im/nim-lang/Nim?at=5e3a794fbfe65274eaded368] |
08:15:11 | FromGitter | <xflywind> Error: illegal recursion in type 'Handler' |
08:17:14 | Araq | :-) |
08:17:40 | * | hax-scramper quit (Read error: Connection reset by peer) |
08:17:54 | * | hax-scramper joined #nim |
08:18:42 | * | vegai joined #nim |
08:25:00 | shota | nick valit |
08:25:08 | * | shota is now known as valit |
08:44:14 | * | valit quit (Remote host closed the connection) |
08:46:06 | FromGitter | <Varriount> Araq: Honestly? Create a "copy" procedure that does nothing for objects, and creates a new reference for references. Then make procedures that act on data structures in-place procedures |
08:46:15 | * | valit joined #nim |
08:48:28 | FromGitter | <Varriount> I prefer an explicit approach. Operators are nice if you are performing the same kind of pattern all throughout your code, but they are very confusing if they are uncommon |
08:48:50 | FromGitter | <Varriount> That is, the operator's use is uncommon |
08:49:07 | Araq | a proc can't work. |
08:49:27 | Araq | we don't write macros when templates suffice and we don't write templates when a proc would do |
08:49:42 | FromGitter | <Varriount> Why won't a procedure work? |
08:50:14 | Araq | just try it out for yourself |
08:50:24 | Araq | let x = copy(sort()) ? |
08:51:03 | Araq | let x = sort(copy a) # cannot bind 'copy a' to 'var T' |
08:51:43 | Araq | (var x = a; sort(x); x) |
08:51:51 | Araq | ^ what we're after |
08:52:33 | Araq | it's a simple rewrite, yet it's so tedious that sorted() was invented |
08:54:10 | Araq | and after I wrote the conservative 'outplace' variant, clyybber had to improve its usability with a different variant of 'outplace'. and then Timothee tried to use it and found too messy still |
08:55:47 | FromGitter | <Varriount> Araq: https://gist.github.com/Varriount/8f4a9046e6fade3fff343bf8540d5aa2 |
08:56:30 | Araq | 'ref' has nothing to do with this |
08:56:49 | Araq | you can just write 'result = data' in your gist anyway |
08:57:13 | FromGitter | <Varriount> Not if data is a reference type. The the reference will be copied, not the data the reference points to. |
08:57:29 | FromGitter | <Varriount> *Then the |
08:58:15 | Araq | it doesn't matter if its "reference type", in fact, we know it's not, sort works on var openArray[T] |
08:59:18 | * | Vladar joined #nim |
08:59:45 | FromGitter | <Varriount> Not if another sort has been defined for another data type, such as a tree . |
09:03:25 | FromGitter | <Varriount> Anyway, what I'm trying to say is, why go through all the trouble of finding the data structure referenced in an expression, creating a temporary of it, and rewriting the expression to use the temporary (all the while obfuscating this to readers of the code) when you could just make the operation of copying the data structure easier? |
09:04:38 | Araq | the copy is easy, in fact the basic assignment will do |
09:04:45 | Araq | https://video.fosdem.org/2020/AW1.125/nimmovesemantics.webm my talk is ready |
09:06:02 | FromGitter | <Varriount> If the copying is easy, why do we need an outplace operator at all? Just transition to using in-place functions everywhere it makes sense. |
09:06:52 | * | hax-scramper quit (Ping timeout: 268 seconds) |
09:07:01 | * | hax-scramper joined #nim |
09:08:38 | FromGitter | <Varriount> I understand that an operator might make more sense in codebases that are heavy in generic data structure manipulation (such as the compiler) but it doesn't make sense for general programs. |
09:10:45 | * | floppydh joined #nim |
09:13:33 | FromGitter | <Varriount> What benefit does such an operator give over manual code, that outweighs the mental complexity parsing a new operator introduces? |
09:14:21 | Araq | benefit: the sorted() family of procs in the stdlib can be removed |
09:14:42 | Araq | benefit: after you learned it, it's shorter code and it's easier to follow |
09:14:57 | Araq | you can always overdo it though and end up as Perl |
09:15:11 | Araq | and that's why every operator we introduce must carry its weight |
09:16:57 | FromGitter | <Varriount> sorted() and friends can already be removed. |
09:18:38 | FromGitter | <Varriount> How much shorter? A line or two? If I'm running a series of in-place operations on a copy, chances are I'm going to want those operations on separate lines anyway, rather than all on one line. |
09:20:18 | FromGitter | <Varriount> And is it really easier to follow than "regular" code? What about to those new to the language? Or new to programming? |
09:21:04 | Araq | they either quit programming, don't use what they don't understand or they grow and learn a little bit more |
09:22:06 | FromGitter | <Varriount> Or they go "hey, these other languages make more sense, and are much more readable" |
09:22:14 | Araq | eventually newbies become advanced users |
09:22:38 | Araq | *shrug* it's a race to the bottom |
09:22:59 | Araq | you can always remove more features at the expense of more typing and more bug prone constructs |
09:23:28 | Araq | for example, (var x = a; sort(x); x) is actually quite typo-prone already |
09:23:41 | Araq | if you write (var x = a; sort(a); x) |
09:23:49 | Araq | the compiler hardly has a chance of telling you about it |
09:26:31 | FromGitter | <Varriount> I'm still not convinced that it will save all that much typing. And the lack of this operator is not what's preventing sorted() from being removed. |
09:28:32 | FromGitter | <Varriount> It's one more thing to discover (and learn) in a language that's already quite complex. |
09:29:02 | * | Araq sighs |
09:29:14 | Araq | so you decided to ignore my actual argument |
09:29:36 | Araq | the "typing" can be much or less, in the end it's error prone, just like |
09:29:45 | Araq | a + b * c is easier than |
09:29:57 | FromGitter | <Varriount> Your argument seems to be that it will make bugs less common, and teach users |
09:30:05 | Araq | a += b; a = a * c |
09:30:16 | Araq | and yeah I know got the rewrite wrong, that's the point. |
09:30:48 | Araq | introducing temporaries manually is the opposite of "let's use a compiler" |
09:31:46 | Araq | to a large extend silly temporaries is what makes "high level programming" different from "low level programming" |
09:36:35 | * | hax-scramper quit (Ping timeout: 260 seconds) |
09:38:01 | * | hax-scramper joined #nim |
09:39:16 | FromGitter | <Varriount> Looking at the examples in the PR, how is https://github.com/nim-lang/Nim/pull/13309/files#diff-8578e1886d472519cd3cc49c52a61b64R42 different from `value.copy.addQuoted("foo").toUpper[0..1].toLower`? |
09:39:18 | disbot | β₯ new outplace operator: `doAssert @[2,1,3].>sort() == @[1,2,3]` ; snippet at 12https://play.nim-lang.org/#ix=2aO9 |
09:39:47 | FromGitter | <Varriount> (let's pretend a copy procedure exists) |
09:41:08 | FromGitter | <Varriount> Oh, I see, it does copy optimization |
09:41:30 | FromGitter | <alehander92> i think if the operator is general enough it might be useful |
09:41:58 | FromGitter | <alehander92> but it should be spent a bit more time on experimenting with it |
09:41:58 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:42:17 | FromGitter | <alehander92> also |
09:42:21 | FromGitter | <alehander92> i expect to have `.<` |
09:42:25 | FromGitter | <alehander92> if we have `.>` |
09:42:35 | FromGitter | <alehander92> (if i come from any other language) |
09:42:49 | FromDiscord_ | <Rika> Can we at least try this out first before totally shooting this down |
09:42:52 | * | hax-scramper joined #nim |
09:42:55 | FromGitter | <alehander92> ok, maybe not if we imagine `.>` as something like `.=>` |
09:43:11 | FromDiscord_ | <Rika> Though we cannot test whether noobs would be more confused or better with it |
09:43:17 | FromGitter | <alehander92> Rika, i am saying the opposite, it sounds good, just to not put it into a release yet or something |
09:43:22 | narimiran | @alehander42 `.<` would be some kind of "pipe left", which i don't see the reason for nim to have |
09:43:35 | FromDiscord_ | <Rika> Ah, I mean that too |
09:43:39 | FromGitter | <alehander92> inplace |
09:43:48 | FromDiscord_ | <Rika> Which is why noobs cannot test it; noobs don't generally use devel |
09:43:48 | FromGitter | <alehander92> turning a filter into an inplace filter |
09:43:54 | * | valit quit (Remote host closed the connection) |
09:44:31 | narimiran | from what i could understand by skimming through the discussion, there's no need for "convert to inplace", as inplace would be the default |
09:44:33 | FromGitter | <alehander92> well, i wouldnt say noobs, its perfectly reasonable to expect that it might have suboptimal ux for various people |
09:44:45 | FromGitter | <alehander92> yes, but many existing algo-s |
09:44:49 | FromGitter | <alehander92> are outplace :) |
09:45:18 | FromGitter | <alehander92> but yeah, converting them to inplace automatically might be very hard |
09:45:33 | Araq | exactly |
09:45:33 | * | valit joined #nim |
09:45:36 | FromGitter | <alehander92> interesting problem |
09:45:44 | Araq | extract outplace version from inplace: easy. |
09:46:04 | Araq | extract inplace version from outplace: open research problem, see Haskell. |
09:46:12 | FromGitter | <alehander92> nice |
09:46:34 | FromGitter | <alehander92> yeah its probably a nice thing to do for functional langs |
09:46:39 | Araq | though iirc Haskell came quite far |
09:46:47 | FromGitter | <Varriount> Araq: I'm still hesitant, although you've convinced me a bit |
09:47:07 | FromGitter | <alehander92> actually zero-functional is trying to do something like that but more like turn n outplace-s to 1 outplace |
09:47:11 | FromGitter | <alehander92> so yeah not the same |
09:47:58 | FromGitter | <alehander92> i guess it should be possible to detect whether you can just preserve only the last index for each step and replace |
09:47:59 | FromGitter | <alehander92> etc |
09:48:08 | FromGitter | <alehander92> but yeah |
09:48:52 | Araq | Varriount: glad to hear it and I'm reconsidering value.copied.addQuoted(), maybe I overlooked something |
09:49:10 | Araq | and there is also overlap with 'operateOn' once you chain these things |
09:49:40 | Araq | probably the really good design still eludes us |
09:50:16 | FromGitter | <timotheecour> wait what is definition of `copied` in `value.copied.addQuoted()` ? |
09:50:39 | lqdev[m] | is the way Nim implements generics scalable as you add more language features? I've been reading through the impl yesterday, I need some inspiration on how to implement generics in rod |
09:51:11 | * | ng0 joined #nim |
09:51:11 | * | ng0 quit (Changing host) |
09:51:11 | * | ng0 joined #nim |
09:51:35 | FromGitter | <Varriount> The problem with having a copy procedure is that the in-place procedure call at the end still doesn't return the new copy |
09:52:11 | Araq | lqdev[m], read https://github.com/nim-lang/RFCs/issues/168 on my thoughts about it |
09:52:12 | disbot | β₯ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8 |
09:52:39 | Araq | so yeah, they don't "scale" all that well IME. |
09:52:40 | FromGitter | <Varriount> Of course, the convention could be to create in-place procedures that return discardable output, but that opens up another can of worms |
09:52:54 | FromGitter | <timotheecour> No, that horrible |
09:53:41 | Araq | however, generic programming itself doesn't scale. after all these years I still think generics are fundamental for containers but anything beyond that gets you into trouble |
09:54:19 | FromGitter | <Varriount> Araq: Have you looked at Go's generics proposal? |
09:55:01 | Araq | I think so, but I'm usually underwhelmed by everything coming from Go. |
09:56:06 | FromGitter | <Varriount> I work with it. I miss Nims templates |
09:56:59 | FromGitter | <Varriount> I don't mind the error paradigm (much) although I wish it was easier to attach stack traces to them. |
09:57:43 | Araq | *shrug* so a Nim without the silly features like ./ or 'sink T' did lose against Go in your environment, probably thanks to network effects. Can we now develop Nim without caring for Go developers? they ain't coming back. |
09:58:25 | Araq | can we now do what's right for Nim? ;-) |
10:00:02 | * | hax-scramper quit (Ping timeout: 240 seconds) |
10:00:17 | * | hax-scramper joined #nim |
10:00:25 | Araq | instead of caring about what-if-hypothetical users that always be confused about everything, never seen the inside of a school and program by copying code snippets from stack overflow |
10:01:21 | FromDiscord_ | <Rika> Throwing shade oooo |
10:01:44 | FromDiscord_ | <Rika> Though honestly I've seen some go code and wtf |
10:03:53 | Araq | timotheecour: I don't know the definition of 'copied' either |
10:04:47 | FromGitter | <alehander92> its not about school etc, its about not doing what c++ did |
10:05:30 | Araq | C++ did not solve this particular problem, never tried to and yet it's a mess anyway :P |
10:05:36 | FromGitter | <alehander92> if we take several months to assess how such an operator/feature works |
10:06:08 | FromGitter | <alehander92> because you see we had different versions of outplace, also of chain/operateOn, slightly different ideas / details / semantics |
10:06:27 | FromGitter | <alehander92> some time to stabilize what a final feature would look like |
10:07:18 | Araq | well that's what we're doing |
10:07:24 | * | floppydh quit (Quit: WeeChat 2.7) |
10:10:55 | FromGitter | <alehander92> ok |
10:11:33 | FromGitter | <alehander92> i personally mostly wait for the z3 stuff :P |
10:16:19 | * | couven92 joined #nim |
10:16:31 | FromDiscord_ | <Clyybber> outplace is the same as chainOn once the intermediate temporaries are gone |
10:18:35 | * | hax-scramper quit (Ping timeout: 260 seconds) |
10:19:16 | lqdev[m] | Araq: so basically, concepts are going to be similar to Rust's traits? |
10:19:18 | * | hax-scramper joined #nim |
10:19:39 | FromDiscord_ | <Rika> are they not already? |
10:19:50 | FromDiscord_ | <Rika> what's the difference, since i dont see them |
10:20:36 | lqdev[m] | they aren't, because generics are not checked on instantiation time |
10:21:11 | lqdev[m] | s/instantiation/declaration |
10:21:34 | lqdev[m] | rust's impl allows for generic procs/types to be checked when they're declared |
10:23:59 | Araq | yes |
10:27:12 | * | valit quit (Remote host closed the connection) |
10:28:29 | * | valit joined #nim |
10:50:13 | * | couven92 quit (Ping timeout: 260 seconds) |
11:14:50 | * | valit quit (Remote host closed the connection) |
11:17:04 | * | leorize quit (Remote host closed the connection) |
11:17:04 | * | opal quit (Write error: Connection reset by peer) |
11:17:21 | * | valit joined #nim |
11:17:35 | * | leorize joined #nim |
11:18:23 | * | opal joined #nim |
11:18:42 | FromGitter | <timotheecour> @araq ya, it works: https://github.com/nim-lang/Nim/pull/13337 |
11:18:44 | disbot | β₯ [WIP] new outplace operator without intermediate copies/temporaries ; snippet at 12https://play.nim-lang.org/#ix=2aOw |
11:19:27 | FromGitter | <timotheecour> now we donβt have to sacrifice neither convenience nor performance |
11:29:54 | * | dddddd joined #nim |
11:31:01 | Araq | now it also needs to enable 'chainOn' |
11:31:03 | Araq | ;-) |
11:36:23 | Araq | and maybe the same story as for `?` will unfold |
11:36:52 | Araq | where in then end a new *unary* operator worked best |
11:38:10 | Araq | x.dup.insert(30).sort() x.chain.setPosition(10, 12).setColor(green) |
11:38:32 | Araq | 'dup' vs 'chain' |
11:40:07 | FromGitter | <timotheecour> i thought about this but u need to distinguish intermediate procs that take a `var result` vs those that don't |
11:40:54 | FromGitter | <timotheecour> there is the trick of placeholder `_` (which would then have to be explicit in each inserted call site) as an option for that, but need to check |
11:41:31 | Araq | see what I wrote, if we need both, at least we can strive for a very similar DSL |
11:43:46 | Araq | the placeholder seems to apply for both: first arg was left out, or else the '_' indicates where |
11:44:46 | FromGitter | <timotheecour> what i had in mind was this example mising inplace and outplace procs: β β ```let b3 = >.@[1].fun(_, 2).fun(_).process.process[2].fun(_, 4)[3]``` [https://gitter.im/nim-lang/Nim?at=5e3aaaaef301780b836910d2] |
11:46:39 | FromGitter | <timotheecour> with `>.` unary operator, `_` seems needed (even for 1st position) to distinguish whether a proc is inplace or outplace |
11:51:26 | * | abm joined #nim |
11:55:06 | Araq | let x = a.dup(sort().insert(10)) |
11:55:46 | Araq | window.chain(setColor(blue).setStyle(modern).setPosition(top)) |
11:56:32 | Araq | is winning my heart |
11:56:39 | Araq | any reason this can't work? |
11:57:31 | Araq | we can use `.>` for chain and `+>` for dup if you prefer operators |
11:59:16 | FromGitter | <timotheecour> what is your *exact* translation of `@[1, 2].>sort.>process.baz.>baz(2,_)` ? |
11:59:52 | FromGitter | <timotheecour> (note the intermediate single dot `.` in the middle) |
12:01:59 | Araq | @[1, 2]+>sort.>(process.baz).baz(2,_) |
12:02:28 | Araq | I think. the idea is that to escape the dot you need to use additional () |
12:02:40 | Araq | and maybe it means you're overdoing it ;-) |
12:03:21 | Araq | .> and +> work on rhs flat dot chains |
12:04:54 | * | ftsf quit (Ping timeout: 268 seconds) |
12:07:22 | FromGitter | <timotheecour> I need to sit on it for tonight, late here; but Iβm not convinced this is better for various reasons (eg `sort.>(process.baz).` kind of gives impression the sort feeds into `(process.baz)` even though it feeds into `process`; itβs not intuitive) |
12:07:40 | Araq | alternatively, instead of overriding what '.' means |
12:08:07 | Araq | we can simply use more +> and .> for chaining these things |
12:08:26 | Araq | .> is then exactly as it's in Pony |
12:08:48 | Araq | and +> a nice variation of .> |
12:08:57 | FromGitter | <timotheecour> but then thatβs https://github.com/nim-lang/Nim/pull/13337 ? |
12:08:59 | disbot | β₯ [WIP] new outplace operator without intermediate copies/temporaries ; snippet at 12https://play.nim-lang.org/#ix=2aOw |
12:09:41 | * | cgfuh joined #nim |
12:09:43 | Araq | no, your .> is my +> |
12:09:59 | Araq | and my .> is a different "operateOn" |
12:10:18 | Araq | and we need to watch out these take 'lhs: typed' |
12:10:30 | Araq | so that these macros don't butcher the overload resolution |
12:11:32 | Araq | but it's close to your version, yes |
12:12:20 | FromGitter | <timotheecour> i think the best is an RFC (if not POC implementation) to compare apples to apples; really need to crash now |
12:12:22 | FromGitter | <alehander92> Araq sorry but maybe i was confusing |
12:12:35 | Araq | sure thing, see you later |
12:12:43 | FromGitter | <alehander92> i actually like the nimble packages as testground thing, thats why i got gara |
12:12:49 | FromGitter | <alehander92> as a nimble library (for pattern matching) |
12:13:07 | FromGitter | <alehander92> i'd love to push for it in the standard lib but it seems to me it needs to prove itself somehpw |
12:13:17 | Araq | alehander92: it worked for strformat |
12:13:49 | Araq | it works well if what the library does is rather complicated |
12:13:55 | FromGitter | <alehander92> yes i agree |
12:14:01 | Araq | but for tiny syntax sugar |
12:14:03 | FromGitter | <alehander92> for simple features it might be different |
12:14:08 | Araq | I don't see it working out. |
12:17:34 | FromGitter | <alehander92> but this |
12:17:41 | FromGitter | <alehander92> is not such a simple feature |
12:17:48 | FromGitter | <alehander92> because you have some overlapping things |
12:17:54 | FromGitter | <alehander92> and you have also pervasiveness |
12:18:10 | FromGitter | <alehander92> e.g. lambda sugar happens only when .. you write an anon proc |
12:18:32 | FromGitter | <alehander92> but this can happen syntactically much more often where you have `.` / call |
12:19:03 | Araq | hmm? |
12:19:14 | FromGitter | <alehander92> well i dont follow closely the discussion |
12:19:27 | FromGitter | <alehander92> but i remember there was the idea to also add operateOn into this? |
12:20:09 | Araq | it's similar and so we're exploring if the similarity can be useful |
12:20:25 | Araq | pay for one, get two |
12:21:59 | FromGitter | <alehander92> yeah reasonable |
12:22:20 | FromGitter | <alehander92> but i also agree an RFC to clarify all the options would be ok |
12:33:03 | * | valit quit (Remote host closed the connection) |
12:37:39 | * | endragor quit (Remote host closed the connection) |
12:40:24 | * | couven92 joined #nim |
12:41:51 | * | couven92 left #nim (#nim) |
12:42:18 | * | couven92 joined #nim |
13:10:04 | * | Hideki_ joined #nim |
13:16:09 | * | filcuc joined #nim |
13:30:40 | * | nsf quit (Quit: WeeChat 2.7) |
13:40:24 | * | Kaivo_ quit (Quit: WeeChat 2.7) |
13:41:08 | * | Kaivo joined #nim |
13:58:47 | * | a_b_m joined #nim |
13:59:03 | * | a_b_m quit (Remote host closed the connection) |
14:00:00 | * | abm quit (Ping timeout: 265 seconds) |
14:15:55 | * | couven92 quit (Quit: couven92) |
14:16:42 | FromDiscord_ | <Clyybber> Outplace an operateOn should be one an the same thing |
14:17:04 | FromDiscord_ | <Clyybber> When the temporaries get optimized out there should be no difference |
14:17:30 | * | qwertfisch joined #nim |
14:17:46 | FromDiscord_ | <Clyybber> s / an /and |
14:18:54 | FromDiscord_ | <Clyybber> And _ shouldn't be needed, unless the inplace in-out argument is not the first arg |
14:24:36 | * | dddddd_ joined #nim |
14:25:30 | * | rockcavera joined #nim |
14:27:48 | * | dddddd quit (Ping timeout: 260 seconds) |
14:28:28 | * | dddddd_ is now known as dddddd |
14:29:07 | * | Vladar quit (Quit: Leaving) |
14:45:08 | xace | can't post on the nim forum because my email isn't confirmed. I never received a email confirmation message... What should I do? |
14:45:36 | shashlick | ping dom96 ^^ |
14:45:36 | * | paxis joined #nim |
14:48:03 | * | shadowbane quit (Quit: Konversation terminated!) |
14:49:03 | * | tane joined #nim |
14:49:19 | * | shadowbane joined #nim |
14:50:08 | * | dddddd quit (Quit: ) |
14:53:12 | * | dddddd joined #nim |
14:55:26 | * | l1x quit () |
14:55:50 | * | l1x joined #nim |
14:56:51 | leorize | shashlick: I'm looking at your remark in the nimble PR |
14:57:32 | leorize | the only problem I found was... I can do all that stuff already |
14:57:42 | leorize | cloned nimterop, tried to run some tasks, everything worked |
14:58:22 | leorize | I'll modify the spawn to spawn the compiler using the project dir as the current directory, that'd make things even more deterministic |
15:04:39 | leorize | shashlick: pushed a new patch |
15:07:21 | * | krux02 joined #nim |
15:10:34 | * | paxis quit (Remote host closed the connection) |
15:12:01 | disruptek | i just cannot read these operators. i need names that match the semantics. |
15:12:14 | * | Hideki_ quit (Remote host closed the connection) |
15:12:39 | disruptek | it's starting to look like gremlin to me. |
15:13:05 | * | Hideki_ joined #nim |
15:13:16 | Zevv | too late to the party disruptek, you slept through the final verdict |
15:13:39 | disruptek | did i? |
15:13:40 | Araq | disruptek, usually it's fine after you got used to it, but it can add up |
15:13:55 | * | Kaivo quit (Quit: WeeChat 2.7) |
15:14:09 | Araq | and so we should be very careful with what we add |
15:14:11 | disruptek | i guess i want a macro: so it can do a multi-op optimization, and then the operators can chain naively. |
15:14:33 | Araq | but it's now in RFC-land, relax |
15:14:41 | * | Kaivo joined #nim |
15:14:42 | Araq | more tinkering is required |
15:15:18 | Zevv | disruptek: and when they are done you and I will implement iterator chaining using the same operator |
15:15:35 | Zevv | imagine the unlimited power of lazy evaluation and FP |
15:15:46 | disruptek | i don't have to imagine. |
15:15:59 | disruptek | i mean, this is good work, don't get me wrong. |
15:16:10 | disruptek | it's good to have everyone speaking the same language. |
15:16:22 | shashlick | @leorize: looks like things might just work since nimble is being run in the current directory anyway |
15:16:23 | disruptek | it's good to identify the /right/ semantics and then put the tools in everyone's bag. |
15:16:34 | shashlick | you might want to run some tests with recursive nimble calls |
15:16:48 | shashlick | and with some withDir calls as well |
15:17:22 | Zevv | I'm looking to see what it would take to implement SSO with strs_v2. pretty picky on the details |
15:17:49 | * | Hideki_ quit (Ping timeout: 265 seconds) |
15:17:58 | leorize | shashlick: I'm counting on you for that :P |
15:18:10 | * | Hideki_ joined #nim |
15:18:10 | leorize | currently I'm doing real life testing with my dev env |
15:18:25 | disruptek | SSO is short-strings-something, right? |
15:18:34 | shashlick | best test is running against all important packages |
15:18:48 | disruptek | a c++ thing? |
15:19:01 | disruptek | leorize: test it with nimph, please. π |
15:19:10 | leorize | it works |
15:19:17 | Zevv | not c++ only. The string implementation always puts 16 bytes on the stack, and the data goes in the heap. But for strings up to 15 bytes that could all go on the stack instead |
15:19:18 | * | disruptek π |
15:19:21 | FromDiscord_ | <demotomohiro> short string optimization? |
15:19:23 | leorize | after I fix nimph to not hardcode compiler path ofc |
15:19:30 | shashlick | @leorize: can you please clear this - https://github.com/nim-lang/nimble/pull/768/files#diff-207d4044eeccdbc778987497fffd081eL104 |
15:19:31 | disbot | β₯ nimscript{wrapper,api}: don't copy generated script to package directory |
15:19:38 | shashlick | nit |
15:20:09 | disruptek | Zevv: that sounds like it will be pretty fun to make work with arc. |
15:20:27 | leorize | shashlick: it's just trailing whitespace change, you can hide it on github if you'd like :P |
15:20:35 | leorize | if I don't clean those whitespace up no one will |
15:20:36 | shashlick | heh π |
15:20:45 | Zevv | disruptek: that should "just work" |
15:20:53 | shashlick | aah you removed them, good good |
15:21:10 | shashlick | i see you are passing in the nimble file path |
15:21:10 | disruptek | how do you figure? you will have to copy 1/2 and move the other. |
15:21:14 | shashlick | what's the purpose of that |
15:21:19 | FromDiscord_ | <demotomohiro> !echo sizeof("") |
15:21:30 | disruptek | it's !eval, boss |
15:21:48 | FromDiscord_ | <demotomohiro> !eval echo sizeof("") |
15:21:50 | NimBot | 8 |
15:22:00 | FromDiscord_ | <demotomohiro> @disruptek, thx |
15:22:00 | Zevv | disruptek: no, the stack thing is always there anyway. It might or might not have something on the heap already, because strings of length 0 have a null pointer in there |
15:23:13 | leorize | shashlick: make getPkgDir() work by faking the true path :P |
15:23:18 | FromDiscord_ | <kodkuce> araq and mrtis fosdem video still no? |
15:23:24 | leorize | it's probably better being in the compiler though |
15:23:32 | * | ng0_ joined #nim |
15:23:32 | * | ng0_ quit (Changing host) |
15:23:32 | * | ng0_ joined #nim |
15:23:53 | disruptek | right, i mean you will have to have a separate flow for strings than you do for other types, will you not? |
15:24:41 | leorize | disruptek: I figured out how to fix the hardcoded compiler path |
15:24:49 | disruptek | what's your solution? |
15:25:25 | * | zielmicha__ quit () |
15:25:38 | * | zielmicha__ joined #nim |
15:25:43 | leorize | getCurrentCompilerExe() is a compile-time function, I just swap it out for `findExe("nim")` instead |
15:26:35 | * | ng0 quit (Ping timeout: 260 seconds) |
15:26:35 | disruptek | i mean, sure. |
15:27:03 | disruptek | did you PR? |
15:27:17 | leorize | nope |
15:27:26 | * | adeohluwa joined #nim |
15:27:40 | leorize | maybe I will |
15:28:05 | * | adeohluwa quit (Remote host closed the connection) |
15:28:44 | disruptek | you should. you are the target user for nimph. |
15:31:13 | shashlick | @leorize: your workingDir change might help expand nimble to run anywhere in a project tree |
15:31:57 | leorize | \o/ |
15:32:25 | shashlick | i think this looks great - let's see what d0m96 has to say |
15:34:21 | leorize | disruptek: nimph#118 |
15:34:25 | disruptek | i'm really tired of running libgit2 #head with its differing semantics. π |
15:34:34 | leorize | oops nimph#119 |
15:34:37 | shashlick | best to test this with all important packages |
15:34:53 | leorize | shashlick: yea my machine is not strong enough for that :P |
15:34:59 | shashlick | maybe create a Nim PR that pulls latest Nimble and see how it does |
15:35:05 | shashlick | or not latest, your nimble |
15:35:21 | leorize | I could actually upgrade nimble ci by letting it test important packages |
15:35:30 | shashlick | that will be great |
15:35:31 | disruptek | thanks, leorize. |
15:38:41 | shashlick | @narimiran - why do nightlies releases no longer show the full description body? |
15:38:49 | shashlick | since 1/22 |
15:39:46 | shashlick | @leorize: can you also bump the devel tag in .travis.yml to ab525cc48abdbbbed1f772e58e9fe21474f70f07 (last successful nightlies) |
15:40:01 | leorize | shashlick: does choosenim keep a copy of the compiler source that I could make use of? |
15:41:07 | narimiran | shashlick: i haven't touched them, no idea |
15:41:23 | shashlick | @leorize: you mean csources? |
15:41:38 | leorize | nope, the compiler source |
15:41:50 | leorize | I need access to testament |
15:42:01 | shashlick | ya it should be there in ~/.choosenim/toolchains/nim-#version/compiler |
15:42:36 | * | NimBot joined #nim |
15:43:11 | * | icebattle joined #nim |
15:44:39 | * | gour joined #nim |
15:47:05 | Araq | kodkuce my talk is here: |
15:47:14 | Araq | https://youtu.be/yA32Wxl59wo |
15:48:31 | Araq | Zevv, I think SSO is not worth its costs but I'm happy to be proven wrong |
15:48:54 | Araq | SSO predates C++ move semantics and make moves slower |
15:49:31 | Araq | I'd rather see COW or O(1) slices |
15:49:55 | Araq | or maybe non-crappy benchmarks that can settle these questions |
15:49:58 | leorize | iirc freepascal regards cow as a mistake of sorts |
15:50:30 | FromGitter | <mratsim> tried COW in Arraymancer, didnβt work, but maybe I did it wrong and with destructors itβs much faster |
15:50:49 | Araq | the mistake is the *atomic* refcounting that freepascal does |
15:51:14 | FromGitter | <mratsim> see writeup: https://github.com/mratsim/Arraymancer/issues/157#issuecomment-346763773 |
15:51:14 | disbot | β₯ Implement copy-on-write for all backends |
15:51:18 | Araq | refcounting itself is fine in every benchmark I happened to look at |
15:54:42 | Araq | yay, https://arstechnica.com/information-technology/2020/02/serious-flaw-that-lurked-in-sudo-for-9-years-finally-gets-a-patch/ |
15:54:48 | Zevv | Araq: sure, that was about my plan: build a poc implementation to measure |
15:56:00 | Araq | "The second contributor is that the code that erases the line of asterisks doesnβt properly reset the buffer position if there is an error writing data." but why? C lacks exceptions, why does error handling remain so hard... :P |
15:57:42 | leorize | how to I specify the commit that I want nimble to fetch in requires()? |
15:58:06 | * | Hideki_ quit (Remote host closed the connection) |
15:58:12 | disruptek | someurl#someoid |
15:58:48 | * | dddddd quit (Ping timeout: 260 seconds) |
15:58:51 | * | Hideki_ joined #nim |
16:02:26 | * | krux02 quit (Remote host closed the connection) |
16:02:57 | FromDiscord_ | <Clyybber> Slices are the "next big thing" |
16:03:22 | disruptek | i think there's a lot of logic to slices, yes. |
16:03:31 | FromDiscord_ | <Clyybber> lent logic |
16:03:40 | disruptek | yes. |
16:03:53 | * | Hideki_ quit (Ping timeout: 272 seconds) |
16:04:20 | FromDiscord_ | <Clyybber> and making sink implicit |
16:04:37 | disruptek | shhh, some people think this is already the case. |
16:06:26 | * | filcuc quit (Ping timeout: 240 seconds) |
16:06:42 | FromDiscord_ | <Clyybber> let them sleep |
16:07:14 | leorize | disruptek: why does nimph try to hard to parse stdlib.nimble? |
16:07:33 | disruptek | it doesn't discriminate. |
16:09:35 | * | nsf joined #nim |
16:09:46 | leorize | ah I was building nimph with -d:debug |
16:09:52 | leorize | no wonder while it's so noisy |
16:10:03 | disruptek | yes, that will be more noisy because nimble will complain a lot. |
16:11:37 | leorize | btw if you wanna play with system nimble packages then you can try using the ebuilds in my gentoo overlay |
16:11:59 | disruptek | what's the url? |
16:12:15 | leorize | https://github.com/alaviss/lrz-overlay |
16:12:23 | leorize | the overlay name is 'lrz' |
16:12:44 | leorize | it's a personal overlay so I'd recommend to mask all packages but the ones you gonna use |
16:13:16 | disruptek | i probably won't mess with it, but i'll take a peek; thanks. |
16:15:17 | * | filcuc joined #nim |
16:16:02 | * | acidx quit (Ping timeout: 240 seconds) |
16:18:18 | FromDiscord_ | <kodkuce> araq: will check |
16:19:23 | disruptek | leorize: is your palemoon build any good? |
16:20:01 | leorize | nah, I haven't update it for awhile |
16:20:26 | leorize | it need to reflect the new UXP -> Pale-Moon split |
16:21:06 | leorize | palemoon just become too slow for my usage so I dropped it |
16:21:13 | disruptek | yeah. |
16:21:33 | FromDiscord_ | <kodkuce> firefox only real alterative to gey chrome |
16:21:41 | * | ng0_ is now known as ng0 |
16:21:48 | leorize | it was a life saver back when I couldn't get rust to run on musl though |
16:22:08 | * | ptdel joined #nim |
16:22:14 | disruptek | when the web was new, we used to always have a lightweight browser handy. for me, it was arena. |
16:22:27 | disruptek | i'm still looking for something like that for this modern era. |
16:22:50 | leorize | make your own :) |
16:22:58 | disruptek | i'm not interested. |
16:23:28 | FromDiscord_ | <kodkuce> browsers became bloatware π |
16:24:48 | * | acidx joined #nim |
16:26:53 | leorize | I need choosenim toolchains directory tree, can someone that's using it help me with that? |
16:27:09 | disruptek | probably not. |
16:27:25 | disruptek | well, maybe shashlick uses it. |
16:29:12 | shashlick | What's up |
16:29:53 | leorize | shashlick: what's the directory tree of choosenim toolchains dir? |
16:30:01 | leorize | I need to know where testament is :p |
16:30:41 | * | filcuc quit (Ping timeout: 268 seconds) |
16:30:54 | disruptek | all this time i thought the /-d:danger does not imply -d:release/ was intentional. |
16:31:47 | leorize | it was, until people forgot about it :p |
16:32:04 | disruptek | wut |
16:33:07 | shashlick | ~/.choosenim/toolchains/nim-version/bin/testament |
16:33:07 | disbot | no footnotes for `/.choosenim/toolchains/nim-version/bin/testament`. π |
16:33:09 | leorize | ah no, I re read 0.20 release note |
16:33:33 | leorize | shashlick: damn it builds testament too? |
16:33:48 | shashlick | It now ships with Nim |
16:34:03 | shashlick | There's also a shim |
16:34:05 | disruptek | ~motto |
16:34:05 | disbot | motto: 11not for googlers |
16:34:51 | * | Hideki_ joined #nim |
16:34:58 | * | leorize quit (Quit: WeeChat 2.6) |
16:35:57 | disruptek | i don't want to work on the compiler because it's already so good and so many people are working on it. |
16:37:37 | shashlick | Help me with nimterop newalgo |
16:37:44 | disruptek | no. |
16:37:59 | disruptek | hey, are you sure you're right about this order-of-eval for nim.cfgs? |
16:38:07 | shashlick | Try it |
16:38:17 | disruptek | well, nimph is fundamentally built upon it. |
16:38:24 | disruptek | i don't really need to try it. π |
16:38:57 | shashlick | Try setting -d:mingw or change the OS |
16:39:11 | shashlick | It won't change things already processed |
16:39:29 | shashlick | Likewise for things like arch |
16:42:14 | disruptek | are you expecting it to reread the nim.cfg? |
16:42:27 | * | paxis joined #nim |
16:42:36 | disruptek | that's why we run the parsing twice; once, then again with the cli args, and then again to act on them. |
16:42:50 | disruptek | it's working correctly. |
16:43:18 | disruptek | and, as i said in the comment, it is sufficient to close the issue. |
16:46:02 | disruptek | you think i'm off-base in https://github.com/nim-lang/nimble/issues/525 |
16:46:03 | disbot | β₯ Implement `tag` command |
16:46:49 | disruptek | i do think araq is wrong because the deficiency we have with nimble subcommands is not that they are longer to type. |
16:47:08 | disruptek | the deficiency is in ecosystem development speed. |
16:47:18 | disruptek | that is enhanced by decoupling subcommands. |
16:50:21 | Araq | huh, what? do I even need to reply |
16:50:28 | disruptek | nah. |
16:50:46 | disruptek | actually, yes. |
16:50:52 | disruptek | but you can do so here. |
16:51:03 | Araq | good. as long as you stay around and produce nimph juice you can disagree with me all you want |
16:51:06 | disruptek | tell me why we're bikeshedding this fucking thing. |
16:51:20 | disruptek | the code is actually written in this case. |
16:51:21 | disruptek | twice. |
16:53:38 | Araq | we eval the command line |
16:53:41 | Araq | then the config files |
16:53:45 | Araq | then the command line again |
16:53:55 | disruptek | oh, i had that backwards. |
16:54:58 | disruptek | but the point remains. and i was talking about the nimble issue with respect to requiring your contribution. π |
16:55:15 | * | Hideki_ quit (Ping timeout: 260 seconds) |
16:55:39 | Araq | I don't understand, just create a PR and push it through |
16:56:08 | disruptek | yes, we are literally arguing about which of two successful implementations we use in the pr for the second. it's moronic. |
16:56:59 | disruptek | i'm flattered that kristian even created the pr, but it was already a waste of programmer time. |
16:57:20 | disruptek | let's work together on this thing. |
16:57:20 | Araq | gimme a link please and don't say #525 |
16:57:31 | disruptek | https://github.com/nim-lang/nimble/issues/525 |
16:57:32 | disbot | β₯ Implement `tag` command |
17:00:01 | disruptek | #13322 is scary. |
17:00:12 | Araq | so ... I'm supposed to do what exactly? |
17:02:50 | Araq | I'm working on #13322 |
17:02:52 | disbot | https://github.com/nim-lang/Nim/issues/13322 -- 3gc:arc mode corrupts strings passed by iterators ; snippet at 12https://play.nim-lang.org/#ix=2aPO |
17:02:59 | disruptek | what is the problem? |
17:03:15 | disruptek | it's interesting enough that i may not be able to help myself. |
17:03:57 | Araq | dunno, I haven't looked at it. I'm fixing #13269 |
17:03:59 | disbot | https://github.com/nim-lang/Nim/issues/13269 -- 3--gc:arc codegen bug copying objects bound to C structs with missing C struct fields ; snippet at 12https://play.nim-lang.org/#ix=2aPP |
17:04:03 | Araq | and then #13322 is next |
17:04:04 | disbot | https://github.com/nim-lang/Nim/issues/13322 -- 3gc:arc mode corrupts strings passed by iterators ; snippet at 12https://play.nim-lang.org/#ix=2aPO |
17:07:21 | Araq | what does valgrind say is the problem? |
17:07:36 | Araq | compile with --gc:arc -d:useMalloc and see for yourself |
17:08:26 | disruptek | yeah, i had to finish that nimble rant. |
17:08:48 | * | muffindrake quit (Quit: muffindrake) |
17:09:03 | FromDiscord_ | <treeform> Does valgrind works on Windows? |
17:11:31 | * | marmotini_ joined #nim |
17:11:39 | Araq | no but there is Dr.Memory which does something similar |
17:14:02 | * | marmotin_ joined #nim |
17:14:06 | * | muffindrake joined #nim |
17:14:51 | Araq | uh oh, this is harder than I thought |
17:15:04 | Araq | bloody liftdestructors.nim, maybe I should rewrite it |
17:15:17 | disruptek | what's the problem? |
17:15:21 | * | Trustable joined #nim |
17:15:41 | Araq | some phase ordering problem |
17:16:01 | Araq | we produce '=' for seq[T], then for the 'T', get confused and inline the '=' for the 'T' |
17:16:43 | * | marmotini_ quit (Ping timeout: 265 seconds) |
17:17:27 | * | marmotin_ quit (Remote host closed the connection) |
17:17:49 | * | rockcavera quit (Remote host closed the connection) |
17:19:18 | disruptek | that's a really good bug report but i don't see how it's related. |
17:19:25 | disruptek | unless you are talking about 13322... |
17:20:13 | Araq | I'm talking about #13269 |
17:20:15 | disbot | https://github.com/nim-lang/Nim/issues/13269 -- 3--gc:arc codegen bug copying objects bound to C structs with missing C struct fields ; snippet at 12https://play.nim-lang.org/#ix=2aPP |
17:20:22 | Araq | btw here is a quote for you: |
17:20:24 | Araq | <araq> you don't read fowl's code. you make a picture of it, put a frame around it and put it on the wall. |
17:20:34 | disruptek | oh i'm reading the wrong ticket. |
17:20:59 | disruptek | ah, yeah. |
17:22:18 | disruptek | who is fowl? |
17:22:37 | Araq | he used to use Nim extensively in its early days |
17:22:51 | Araq | I never really understood his code |
17:22:53 | disruptek | i will have to look for some artifacts. π |
17:22:59 | tane | Araq, btw: nice talk on sunday, enjoyed it :) I first had fear that move semantics would overcomplicate things ala C++, but I'm relieved now :) |
17:23:36 | * | sekao joined #nim |
17:23:51 | disruptek | fear not; us mortals are safe thanks to the great deity. |
17:23:56 | Araq | tane, thanks. |
17:24:39 | tane | the devroom should be assigned to a larger room next time, as should so many others hehe |
17:24:53 | disruptek | i can't believe this didn't pop in a package previously. |
17:25:03 | Araq | it was all live-streamed too, quite nice |
17:25:19 | disruptek | that conference was ridiculous. |
17:25:49 | Araq | ridiculously bad? |
17:26:07 | tane | rather overcrowded, and I have a habit of choosing bad talks - dunno why |
17:27:55 | tane | and the kotlin devroom's room had a lot of creaking stairs/chairs and a rather silent PA, so I think watching the stream would provide more :) |
17:30:14 | * | Hideki_ joined #nim |
17:30:20 | disruptek | are you mentioning fowl because c-blake's stuff is relatively fp? |
17:30:55 | sekao | hey all. am i right that taking a slice of a sequence makes a copy of the content? if so, is there any way to just get a "view" into a sequence? |
17:31:45 | disruptek | you can use a range. |
17:32:19 | FromDiscord_ | <Rika> ? range indexes make slices do they not |
17:33:06 | disruptek | not as an index, as a collection of adjacent indicies. |
17:33:21 | shashlick | disruptek: sorry, was away |
17:33:29 | disruptek | it happens. |
17:33:41 | shashlick | I actually tried the `-d:mingw` in a project.nim.cfg and it does not work |
17:33:48 | shashlick | it works on the command line |
17:33:54 | shashlick | so i don't get what you are saying |
17:34:06 | disruptek | well, i had them backwards, for one thing. |
17:34:13 | disruptek | it's cli -> cfg -> cli. |
17:34:18 | sekao | i tried `mySeq[0..2]` but that seems to do a copy |
17:34:41 | disruptek | no, you make a range and then you iterate over it yielding seq[index]. |
17:35:00 | * | Hideki_ quit (Ping timeout: 268 seconds) |
17:35:06 | * | lritter joined #nim |
17:35:08 | sekao | ah i see, thanks i'll try that |
17:35:15 | shashlick | ok, so do you agree it is a valid issue |
17:35:30 | disruptek | nah. |
17:35:39 | disruptek | it changes nothing. |
17:35:44 | shashlick | ugh |
17:35:59 | disruptek | i mean, am i wrong? |
17:36:11 | shashlick | did you see the impact of -d:mingw |
17:36:18 | shashlick | it is used in the global nim.cfg |
17:36:24 | disruptek | yeah, i saw the code. |
17:36:37 | shashlick | so if you set it in a project local nim.cfg, Nim is not going to reprocess the global nim.cfg again |
17:36:45 | shashlick | so your C compiler does not change to mingw |
17:37:08 | disruptek | right. if you want variables set, you will need to set them. |
17:37:14 | disruptek | that's the way this works. |
17:37:27 | disruptek | nim.cfg is a good example of how to do that. |
17:37:45 | disruptek | don't you think that the user of this software wants to edit a project.nim.cfg to adjust their compilers? i do, too. |
17:38:00 | * | sekao quit (Remote host closed the connection) |
17:38:06 | disruptek | pretty sure the compilers will vary here and there for x-comp stuff. |
17:38:13 | shashlick | I do too, but it does not work! |
17:38:37 | disruptek | don't put -d:mingw in there. put the effects of same, from default config/nim.cfg. |
17:39:17 | shashlick | so you are saying to copy over the entire @if block into the project? |
17:39:25 | disruptek | yep. |
17:39:40 | disruptek | dude. this isn't rocket science. |
17:39:54 | disruptek | don't overthink it. |
17:40:20 | shashlick | great, so duplicate code instead of considering a way to fix it |
17:40:26 | disruptek | it's not broken. |
17:40:42 | disruptek | i don't know how to explain that any better; it's kinda like the concept of zero. correct. |
17:41:39 | shashlick | basically calling a workaround a feature |
17:41:54 | disruptek | it's not a workaround. it's the direct path. |
17:42:03 | disruptek | this is how it's designed to work. |
17:42:14 | disruptek | and, for good reason. |
17:42:39 | shashlick | so basically there's no need for any software to consider change since the way it works should be good enough for everyone |
17:42:50 | disruptek | dude. think about how it works. |
17:43:02 | disruptek | we evaluate your config last. so this is where you can override stuff. |
17:43:17 | disruptek | if we eval your config first, then we will override it with stuff from the compiler. |
17:43:20 | disruptek | defaults. |
17:43:25 | disruptek | which are no longer defaults. |
17:43:32 | disruptek | they suddenly become assertions. |
17:43:58 | disruptek | repeat in various shades for all the other configs we eval. |
17:44:34 | shashlick | I understand how it works, my point is that the only way to override right at the top is with the cli |
17:44:44 | shashlick | there is a use case to override at the top since effects cascade |
17:44:55 | shashlick | and all the ask is is for a way to do that from a file |
17:45:19 | shashlick | we can just tell the guy to add a nimble task with appropriate cli flags and to go away |
17:45:24 | * | Vladar joined #nim |
17:47:03 | * | narimiran quit (Ping timeout: 260 seconds) |
17:47:19 | disruptek | basically, we need a way to manipulate the config file parse order from the cli, and you want to be able to do this from inside the config files themselves. |
17:47:28 | disruptek | does that really make sense to you? |
17:48:49 | shashlick | no, i'm not asking to change anything with the parse order |
17:49:06 | disruptek | that's what we actually need, though. |
17:49:36 | shashlick | rather have a global.nim.cfg equivalent that gets loaded before the real global |
17:50:35 | shashlick | but the use case isn't quite so prevalent to justify any real work |
17:50:37 | disruptek | same thing, right? |
17:50:54 | shashlick | and there's a valid workaround to create a nimble task or call nim with the right cli params |
17:51:52 | disruptek | maybe the best solution is `include`. |
17:53:03 | shashlick | I don't think 4raq will agree to any of this |
17:53:36 | * | rockcavera joined #nim |
17:54:02 | disruptek | well, i see those two options. array manipulations for config parse order, or @include. |
17:55:33 | * | letto_ quit (Ping timeout: 265 seconds) |
17:56:13 | shashlick | global.nim.cfg is probably easier but unlikely |
17:57:11 | leorize[m] | shashlick: I don't think the choosenim used in nimble ci uses testament |
17:57:35 | disruptek | Araq: i think those two bugs are one bug. |
17:57:43 | leorize[m] | installs* |
17:57:54 | leorize[m] | getting command not found here |
17:58:03 | leorize[m] | I'm I better off just clone the compiler and build testament from there? |
17:58:25 | leorize[m] | or does choosenim keep testament sources too? |
18:00:16 | shashlick | a sec |
18:00:26 | * | narimiran joined #nim |
18:01:28 | shashlick | ya I need to update my travis gist to use the latest choosenim since it should now work |
18:01:56 | shashlick | well, actually that's just on windows |
18:02:33 | shashlick | i think it is because choosenim is cached and the newer version isn't being downloaded |
18:04:35 | shashlick | @leorize: i've deleted the cache for your PR |
18:04:58 | shashlick | but this will not work on older versions of Nim since testament wasn't shipped on those |
18:05:12 | shashlick | let me update the gist as well |
18:05:21 | leorize[m] | can you restart ci for me then? |
18:05:42 | leorize[m] | haizzz |
18:05:50 | leorize[m] | do you save the source somewhere |
18:05:54 | leorize[m] | i feel like it's faster if I just cd then nim c -r |
18:06:23 | shashlick | you might want to push a commit to only run testament if >= 1.x |
18:14:29 | * | letto_ joined #nim |
18:15:14 | shashlick | @leorize: also need to fix the link to the travis.sh gist - `curl https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522/raw/travis.sh -LsSf -o travis.sh` |
18:15:27 | shashlick | i had a specific commit |
18:17:07 | shashlick | ah, nimble still has the old travis.yml |
18:17:11 | shashlick | let me just fix this all |
18:19:49 | leorize[m] | ok :p |
18:20:27 | FromDiscord_ | <exelotl> sekao: if you need a view into an array/seq for optimisation purposes you can use something like View from https://github.com/zielmicha/collections.nim |
18:21:52 | * | leorize joined #nim |
18:22:44 | FromGitter | <Varriount> Exelotl, sekao: or use toOpenArray |
18:23:51 | FromDiscord_ | <exelotl> Are openArrays first-class now? |
18:23:55 | leorize | nope |
18:26:58 | * | hax-scramper quit (Ping timeout: 260 seconds) |
18:32:10 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
18:33:44 | shashlick | @leorize - https://github.com/nim-lang/nimble/pull/770 |
18:33:44 | disbot | β₯ Use travis gist, test important packages |
18:35:04 | leorize | lgtm |
18:35:25 | shashlick | somehow it isn't kicking off a job |
18:35:44 | leorize | probably one of them is being consumed somewhere |
18:37:20 | shashlick | it doesn't even show up in the github PR as a running taask |
18:38:08 | leorize | wanna get rid of travis and use something else? :P |
18:38:33 | leorize | github actions is an interesting piece too |
18:39:30 | leorize | disruptek: maybe nimph can be added here? https://github.com/nim-lang/Nim/wiki/Community-Projects#package-managers |
18:39:56 | disruptek | sure. |
18:42:06 | shashlick | okay travis didn't like my bash if statement in the yml |
18:42:15 | * | Trustable quit (Remote host closed the connection) |
18:42:45 | shashlick | let's see how it does now - https://travis-ci.org/nim-lang/nimble?utm_medium=notification&utm_source=github_status |
18:45:06 | * | dddddd joined #nim |
18:50:07 | * | Hideki_ joined #nim |
18:50:32 | shashlick | @leorize: looks like testament isn't printing anything out in important packages testing |
18:51:17 | shashlick | https://travis-ci.org/nim-lang/nimble/jobs/646545333 |
18:51:49 | leorize | it's just slow |
18:52:10 | leorize | usually takes 10mins to get a line |
18:53:07 | shashlick | might time out |
18:54:02 | leorize | it wasn't by accident that we don't package testing on travis I guess :P |
18:54:26 | * | Hideki_ quit (Ping timeout: 240 seconds) |
18:54:55 | shashlick | ya, we have a lot of time available on travis - how long does this take? |
18:57:24 | shashlick | yep - build has been terminated |
18:57:58 | shashlick | on my local machine, i'm getting output right away |
18:58:20 | shashlick | does testament need to flush stdout? |
19:01:36 | leorize | shashlick: https://dev.azure.com/nim-lang/255dfe86-e590-40bb-a8a2-3c0295ebdeb1/_apis/build/builds/2379/logs/60 |
19:01:42 | leorize | about 20mins before the first line appear |
19:02:38 | * | letto_ quit (Read error: Connection reset by peer) |
19:03:04 | shashlick | this is an stdout buffering issue |
19:03:12 | shashlick | i'm getting output immediately |
19:03:14 | shashlick | locally |
19:03:22 | shashlick | of course, nim-chronos is taking forever |
19:13:41 | * | icebattle quit (Ping timeout: 265 seconds) |
19:14:04 | * | theelous3 joined #nim |
19:16:22 | * | hax-scramper joined #nim |
19:20:51 | * | theelous3 quit (Ping timeout: 272 seconds) |
19:38:44 | * | l1x quit (Ping timeout: 248 seconds) |
19:39:51 | * | zielmicha__ quit (Ping timeout: 272 seconds) |
19:50:09 | * | letto joined #nim |
19:53:50 | * | icebattle joined #nim |
19:54:00 | FromGitter | <Albus70007> How can i launch an exe from the JavaScript backend? |
19:54:33 | Yardanico | uhh, if you use nodejs to run it afterwards you'll have to dig into nodejs api docs :P |
19:54:51 | Yardanico | https://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback |
19:54:52 | FromGitter | <Albus70007> I run it on the web |
19:55:00 | Yardanico | well, then you can't run an exe |
19:55:12 | Yardanico | you can only run JS or webassembly in the browser, not PE binaries |
19:55:32 | Yardanico | and browsers have all kinds of sandboxing so launching native exe's from browsers is forbidden |
19:56:08 | FromGitter | <Albus70007> And can i run a bat? |
19:56:11 | Yardanico | no? |
19:56:21 | Yardanico | it's running in the browser after all |
19:56:22 | shashlick | @leorize - how come nimble-packages passes on azure but not on travis - https://travis-ci.org/nim-lang/nimble/jobs/646545342?utm_medium=notification&utm_source=github_status |
19:56:26 | shashlick | all the nim-regex failures |
19:56:27 | Yardanico | can you run a .bat from JS in the browser? |
19:57:15 | FromGitter | <Albus70007> Ive seen examples done from within JavaScript |
19:57:19 | Yardanico | can you link one? |
19:57:38 | FromGitter | <Albus70007> Im on the phone rn, but give me a secons |
19:58:39 | FromGitter | <Albus70007> https://stackoverflow.com/questions/18980957/is-it-possible-to-run-an-exe-or-bat-file-on-onclick-in-html |
19:59:00 | Yardanico | that wouldn't be possible in any modern browser |
19:59:20 | Yardanico | (and I don't consider IE11 to be a modern browser) |
19:59:58 | Yardanico | you wouldn't be able to do that in edge (which is now based on chromium), any chromium-based browser or firefox |
20:00:09 | FromGitter | <Albus70007> So... how can i overcome this? |
20:00:14 | * | natrys joined #nim |
20:00:20 | Yardanico | you can't, because otherwise that'll be a huge security breach |
20:00:24 | Yardanico | why do you want to do that in the first place? |
20:01:48 | FromGitter | <Albus70007> A simple gui for running an exe and editing its settings that are inside a json/cfg file |
20:01:59 | Yardanico | well, you can't use a normal browser for that |
20:02:29 | Yardanico | you need to use something like https://github.com/jangko/nimCEF (which seems a bit abandoned), or why not create a native GUI? |
20:02:39 | FromGitter | <Varriount> I regret not getting a ticket to FOSDEM, even if it would have been expensive (I'm all the way in the US) |
20:02:40 | Yardanico | gintro is quite easy to get started with, and GTK on windows doesn't look that bad |
20:03:01 | Yardanico | and your simple gui app won't depend on JS and huge browsers |
20:03:51 | * | krux02 joined #nim |
20:04:35 | FromGitter | <Albus70007> hmm, i will ask the people at rlbot how they managed to run it, their gui gets displayed in the browser, but runned from a bat file (just in case that chabges things) |
20:04:53 | * | letto quit (Read error: Connection reset by peer) |
20:05:06 | FromGitter | <Albus70007> But i guess this is a good time to do a Nim gui :) |
20:05:19 | Yardanico | maybe they just communicate between browser and some local http server? |
20:05:31 | Yardanico | so the browser is just sending http requests to the "server-side" running natively from an .exe |
20:05:39 | Yardanico | and this .exe launches stuff like .bat |
20:08:02 | * | letto joined #nim |
20:08:32 | FromGitter | <Albus70007> That makes sense |
20:17:15 | FromDiscord_ | <demotomohiro> I thought `importc` pragma should be assumed sideEffect in default, but that is break change and need to update millions of lines of wrapper code. |
20:17:16 | FromDiscord_ | <demotomohiro> https://github.com/nim-lang/Nim/issues/13306 |
20:17:17 | disbot | β₯ I can use times.epochTime() in func. ; snippet at 12https://play.nim-lang.org/#ix=28O8 |
20:17:36 | Yardanico | @demotomohiro I won't agree that it should be side effect |
20:17:53 | Yardanico | quite a lot of functions in C libs don't have any side effects :) |
20:19:00 | FromDiscord_ | <demotomohiro> I saw many C libs that have side effects. libpng, libusb, opengl, GUI library, etc |
20:20:06 | FromDiscord_ | <demotomohiro> Anyway, I have to accept importc is noSideEffect in default. |
20:20:11 | Yardanico | it's not |
20:20:14 | Yardanico | sorry, it was my mistake |
20:20:41 | Yardanico | all nim procs/functions infer the side effect status by default, unless you explicitly apply the pragma |
20:21:00 | Yardanico | ah nvm again :D |
20:21:12 | * | ptdel joined #nim |
20:23:01 | Yardanico | I wouldn't think that it will break millions of line of code though, since "func" is not really used in most of the Nim code |
20:23:20 | Yardanico | and even noSideEffect is not used that often, especially if it calls C |
20:23:23 | * | nsf quit (Quit: WeeChat 2.7) |
20:27:53 | * | Jesin quit (Quit: Leaving) |
20:27:56 | FromDiscord_ | <demotomohiro> But we cannot make breaking change after version 1.0 unless there is serious problem. |
20:30:14 | * | Jesin joined #nim |
20:33:43 | gour | cd |
20:33:53 | narimiran | ~ |
20:33:54 | disbot | no footnotes for ``. π |
20:37:46 | * | Hideki_ joined #nim |
20:41:10 | * | narimiran quit (Ping timeout: 265 seconds) |
20:47:11 | * | NimBot joined #nim |
20:47:14 | Yardanico | it immediately left after you posted that link :D |
20:47:17 | Yardanico | ok nvm |
20:47:30 | disruptek | don't talk about nimbot behind her back. |
20:56:01 | * | marmotini_ joined #nim |
20:56:43 | * | Hideki_ quit (Remote host closed the connection) |
20:57:28 | * | Hideki_ joined #nim |
21:02:12 | * | Hideki_ quit (Ping timeout: 268 seconds) |
21:03:39 | leorize | shashlick: we should pass --styleCheck:off to execNimscript too I guess |
21:06:12 | * | marmotini_ quit (Remote host closed the connection) |
21:28:23 | * | theelous3 joined #nim |
21:31:06 | * | marmotini_ joined #nim |
21:32:03 | * | Hideki_ joined #nim |
21:41:51 | * | marmotini_ quit (Remote host closed the connection) |
21:47:10 | * | gour left #nim ("Leaving") |
21:50:46 | * | Hideki_ quit (Ping timeout: 265 seconds) |
21:50:54 | * | ltriant joined #nim |
21:52:14 | * | s3govesus quit (Remote host closed the connection) |
21:53:37 | * | letto quit (Read error: Connection reset by peer) |
22:05:15 | * | s3govesus joined #nim |
22:16:13 | FromDiscord_ | <Recruit_main_70007> seens like 1.0.6 still doesnt have arc: |
22:16:14 | FromDiscord_ | <Recruit_main_70007> `command line(1, 2) Error: 'none', 'boehm' or 'refc' expected, but 'arc' found` |
22:16:28 | leorize | 1.0.6 is a patch version |
22:16:34 | leorize | it won't have any new features |
22:16:44 | * | Vladar quit (Quit: Leaving) |
22:16:45 | leorize | newer features will come in the next major release (1.2) |
22:16:46 | FromDiscord_ | <Recruit_main_70007> nvm, i remember this conversation |
22:17:07 | FromDiscord_ | <Recruit_main_70007> thanks XD |
22:17:53 | FromDiscord_ | <exelotl> if you want to use arc you'll have to clone the nim repo and build from source |
22:18:13 | * | cgfuh quit (Quit: WeeChat 2.6) |
22:19:20 | FromDiscord_ | <Recruit_main_70007> i think i can wait, (i hope) |
22:19:43 | * | nullwarp quit (Ping timeout: 268 seconds) |
22:20:29 | FromGitter | <alehander92> Varriount we still think about nimconf :P |
22:20:35 | xace | Albus70007: The way I have executed PEs from the browser is by registering a executable to a protocol. for example I have registered vlc:// to open links in vlc for me |
22:20:41 | FromGitter | <alehander92> (another guy that didnt go to fosdem :) ) |
22:21:13 | * | natrys quit (Ping timeout: 265 seconds) |
22:21:55 | FromDiscord_ | <Recruit_main_70007> xace, i am also albus, but when i am out, i cant log into discord, so use gitter, but thank you |
22:22:28 | xace | yeah i figured by 70007 suffix in the name, but i hadn't read that far in the chat yet |
22:22:48 | FromGitter | <matrixbot> `free pump` is it possible to instantiate an object via varargs to a macro or something? |
22:23:08 | leorize | can you be more clear? |
22:23:16 | leorize | also join #freenode_#nim:matrix.org |
22:23:40 | leorize | that's the IRC bridge so you don't have to double bridging |
22:24:01 | * | freepump[m] joined #nim |
22:24:13 | leorize | welcome to irc |
22:24:20 | freepump[m] | oh, nice :) |
22:24:57 | leorize | can you explain what you're trying to do? I can't seem to get a good picture out of it |
22:26:10 | * | tane quit (Quit: Leaving) |
22:26:47 | freepump[m] | yeah one sec |
22:29:16 | freepump[m] | maybe something like: https://play.nim-lang.org/#ix=2aRE |
22:29:47 | freepump[m] | its still not a great example actually |
22:29:59 | * | sagax quit (Remote host closed the connection) |
22:30:06 | leorize | add what you're expecting to make it better :P |
22:30:42 | freepump[m] | https://play.nim-lang.org/#ix=2aRF |
22:31:04 | freepump[m] | the created type should be generic |
22:31:35 | * | nullwarp joined #nim |
22:32:01 | leorize | so for that example, what are you expecting as the result? a `MyType(fielda: "first_value", fieldb: "second_value")`? |
22:32:10 | freepump[m] | yeah |
22:33:43 | FromGitter | <Varriount> xace: I think that's the best way to "execute" programs via the browser |
22:34:09 | FromGitter | <Varriount> Browsers will usually ask the user whether it should open the application (which makes sense) |
22:34:09 | * | valit joined #nim |
22:34:19 | * | natrys joined #nim |
22:34:28 | * | natrys quit (Client Quit) |
22:34:53 | leorize | unless you're on ios iirc |
22:35:16 | leorize | a custom protocol will just forward directly to whatever app that registers for it |
22:36:04 | * | filcuc joined #nim |
22:38:13 | * | sagax joined #nim |
22:38:26 | * | valit quit (Ping timeout: 240 seconds) |
22:57:54 | * | l1x joined #nim |
22:58:24 | * | zielmicha__ joined #nim |
22:58:53 | * | solitudesf quit (Ping timeout: 252 seconds) |
22:59:56 | * | s3govesus quit (Quit: s3govesus) |
23:03:36 | * | Kaivo quit (Quit: WeeChat 2.7) |
23:07:18 | * | xet7 quit (Quit: Leaving) |
23:07:37 | * | xet7 joined #nim |
23:10:05 | * | filcuc quit (Quit: Konversation terminated!) |
23:19:12 | * | ltriant_ joined #nim |
23:19:47 | * | ltriant quit (Ping timeout: 260 seconds) |
23:21:24 | krux02 | how do I find out what test failed here: https://dev.azure.com/nim-lang/Nim/_build/results?buildId=2387&view=logs&j=30931762-47c4-53b3-6a83-316eb5a6b9d7&t=b1c7d701-c448-5ecb-905d-689d8a5921e0&l=11252 |
23:21:38 | * | Sembei quit (Ping timeout: 265 seconds) |