00:00:02 | * | neceve quit (Quit: ZNC - https://znc.in) |
00:00:12 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
00:00:38 | * | wallabra joined #nim |
00:00:52 | * | ltriant quit (Ping timeout: 268 seconds) |
00:04:43 | * | neceve joined #nim |
00:05:02 | * | neceve quit (Remote host closed the connection) |
00:07:38 | * | neceve joined #nim |
00:08:01 | * | neceve quit (Remote host closed the connection) |
00:12:31 | FromDiscord | <Rika> In reply to @Event Horizon "Or does `some("")` default": No, the point of options is to distinguish empty from none |
00:22:39 | * | neceve joined #nim |
00:23:02 | * | neceve quit (Remote host closed the connection) |
00:27:00 | * | ltriant joined #nim |
00:33:11 | * | ltriant quit (Ping timeout: 264 seconds) |
00:37:40 | * | neceve joined #nim |
00:38:01 | * | neceve quit (Remote host closed the connection) |
00:41:42 | * | neceve joined #nim |
00:42:01 | * | neceve quit (Remote host closed the connection) |
00:50:43 | * | neceve joined #nim |
00:51:01 | * | neceve quit (Remote host closed the connection) |
00:59:46 | NimEventer | New Nimble package! snorlogue - A Prologue extension. Provides an admin environment for your prologue server making use of norm., see https://github.com/PhilippMDoerner/Snorlogue |
01:00:16 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4ibm |
01:01:11 | * | neceve joined #nim |
01:03:58 | * | ltriant joined #nim |
01:04:32 | FromDiscord | <Elegantbeef> You need an object variant for that |
01:09:52 | * | ltriant quit (Ping timeout: 260 seconds) |
01:15:47 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1050943876640297032/Peek_2022-12-09_20-13.mp4 |
01:17:01 | FromDiscord | <albassort> 13% of all lines of code have spelling errors |
01:17:47 | FromDiscord | <Elegantbeef> Oh noes |
01:23:49 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4ibr |
01:24:36 | FromDiscord | <! Nilts> I am turning the number into the nest level |
01:25:31 | FromDiscord | <Elegantbeef> make a constructor for your variant that takes in varargs and one that takes in an int |
01:26:51 | FromDiscord | <! Nilts> In reply to @Elegantbeef "make a constructor for": i don't understand, say i had a function, the first one would be the input and the last one would be the output |
01:27:22 | FromDiscord | <Elegantbeef> Well no clue what you want |
01:28:34 | FromDiscord | <! Nilts> In reply to @Elegantbeef "Well no clue what": turn a flat list into a nodetree based on the number. |
01:29:00 | FromDiscord | <Elegantbeef> Well you know what you need to do so attempt to do it |
01:37:39 | FromDiscord | <! Nilts> how do i walk through a nodetree? |
01:38:47 | FromDiscord | <Rika> Damn beef you really cranky today are ya |
01:40:37 | FromDiscord | <Rika> In reply to @not logged in "how do i walk": From a branch, you check each of the children if they’re a leaf or a branch, and you get the value and do whatever with it if it’s a leaf or enter that branch if it’s a branch, after that you exit that branch |
01:40:54 | FromDiscord | <Rika> Usually a recursive function is used for these |
01:41:08 | FromDiscord | <Elegantbeef> Not really cranky, just dont have the desire to pull a question from the ground |
01:42:14 | * | ltriant joined #nim |
01:42:41 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4ibs |
01:43:23 | FromDiscord | <Rika> You make a function that takes a node in and acts on it like a branch; since your root node is a branch, to use the function you pass the root node |
01:43:43 | FromDiscord | <Rika> I can’t code for you |
01:43:52 | FromDiscord | <Rika> I literally can’t I’m on a phone lol |
01:45:18 | NimEventer | New thread by RodSteward: How should system library support be structured?, see https://forum.nim-lang.org/t/9711 |
01:50:19 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4ibt |
01:51:05 | FromDiscord | <Rika> Almost, just wait I’ll say what to change |
01:51:52 | FromDiscord | <Rika> Actually yeah |
01:51:55 | FromDiscord | <Rika> That looks correct |
01:52:06 | FromDiscord | <! Nilts> (edit) "https://play.nim-lang.org/#ix=4ibt" => "https://play.nim-lang.org/#ix=4ibu" |
01:52:28 | FromDiscord | <Rika> maybe "iss: IndentStackSeq[T]" |
01:52:45 | FromDiscord | <Rika> And the f needs to have something to consume the value |
01:52:48 | FromDiscord | <Rika> Since you’re returning |
01:54:00 | FromDiscord | <! Nilts> In reply to @Rika "maybe "iss: IndentStackSeq[T]"": i removed the output of f |
01:54:40 | FromDiscord | <Rika> Should be fine then |
01:54:53 | FromDiscord | <Rika> In reply to @Rika "maybe "iss: IndentStackSeq[T]"": This still needed though |
01:55:07 | FromDiscord | <Horizon [She/Her]> In reply to @not logged in "Is there any structure": That looks horrid lmao |
01:55:43 | FromDiscord | <Horizon [She/Her]> In reply to @albassort "": Sounds like a skill issue :gigachad: |
01:56:00 | * | ltriant quit (Ping timeout: 246 seconds) |
01:58:22 | FromDiscord | <albassort> In reply to @Event Horizon "Sounds like a skill": dont make me go over there |
01:58:43 | FromDiscord | <Rika> In reply to @albassort "dont make me go": Can you even |
01:58:47 | FromDiscord | <Horizon [She/Her]> You don't know where I live ha |
01:58:53 | FromDiscord | <Horizon [She/Her]> In reply to @Rika "Can you even": Nope |
02:02:54 | FromDiscord | <! Nilts> UGGGh, i can't figure out this reverse flatten |
02:05:32 | FromDiscord | <albassort> In reply to @Event Horizon "You don't know where": i know a 200 km area |
02:06:33 | FromDiscord | <albassort> In reply to @Rika "Can you even": Financially? Yes but I wouldn't eat next month. Technically? No I lack a passport |
02:06:50 | FromDiscord | <Horizon [She/Her]> Lmao |
02:33:04 | * | ltriant joined #nim |
02:45:17 | FromDiscord | <Raynei486> is there a way to combine 4 `uint8` into one `uint32`? |
02:48:25 | arkanoid | do you know if doing "if foo in 0..10" is slower than "if foo >= 0 and foo <= 10" ? |
02:51:03 | FromDiscord | <Horizon [She/Her]> In reply to @Raynei486 "is there a way": Probably messing with pointers? |
02:51:52 | FromDiscord | <jtv> sent a code paste, see https://play.nim-lang.org/#ix=4ibB |
02:52:27 | FromDiscord | <Horizon [She/Her]> In reply to @jtv "<@733059160924749855> Of course, there": Is that because of how endianness works? |
02:52:39 | FromDiscord | <jtv> If they're already laid out in memory together, a cast and potentially a byte swap will do the trick |
02:52:46 | FromDiscord | <jtv> Yeah, that's one of the gotchas |
02:52:58 | FromDiscord | <jtv> The other is alignment issues, depending on archetecture |
02:53:04 | FromDiscord | <Horizon [She/Her]> Ah fair |
02:53:07 | FromDiscord | <jtv> Tho these days that's not as big a deal |
02:53:12 | FromDiscord | <Raynei486> In reply to @jtv "If they're already laid": I guess they are?↵It's a `seq` of `uint8` |
02:54:00 | FromDiscord | <jtv> You're probably better off just doing the shifts, it's faster than the multiply 😉 |
02:55:21 | FromDiscord | <Horizon [She/Her]> There's likely a solution out there for doing this that takes endianness into account |
02:55:49 | FromDiscord | <Horizon [She/Her]> I guess one solution is to convert all of them into one endian, and then convert it back into the endian of the system you're currently on? |
02:56:13 | FromDiscord | <jtv> sent a code paste, see https://play.nim-lang.org/#ix=4ibD |
02:56:19 | FromDiscord | <jtv> With proper casting thrown in |
02:56:19 | FromDiscord | <Horizon [She/Her]> Ah |
02:56:29 | FromDiscord | <jtv> You have to cast each int8 to an int32 |
02:56:41 | FromDiscord | <jtv> But that makes it a little less clear 🙂 |
02:56:48 | FromDiscord | <Horizon [She/Her]> Yeah haha fair |
02:57:02 | * | ltriant quit (Ping timeout: 256 seconds) |
02:57:44 | FromDiscord | <Raynei486> I'll try to see if there's another approach that doesn't involve converting `uint8` and `uint32`↵But still thanks guys |
02:57:54 | FromDiscord | <jtv> Why is that an issue?? |
02:57:57 | FromDiscord | <jtv> That is free |
02:58:10 | FromDiscord | <jtv> It's just telling the compiler you know what you're doing, you're not making a type error |
02:58:30 | FromDiscord | <jtv> I know every way you could reasonably do it, and that is the best general purpose way 🙂 |
02:58:30 | FromDiscord | <Raynei486> No I'm not worrying about that |
02:58:58 | FromDiscord | <Raynei486> I feel like it's just better if I can avoid casting at all 😄 |
02:59:13 | FromDiscord | <Raynei486> parsing files be like... |
02:59:34 | FromDiscord | <jtv> Casting isn't a runtime thing here. The language makes you cast for size conversions to prevent unexpected errors |
02:59:45 | FromDiscord | <jtv> More so than many other languages that would automatically promote |
02:59:53 | * | ltriant joined #nim |
03:00:02 | * | neceve quit (Quit: ZNC - https://znc.in) |
03:00:03 | FromDiscord | <jtv> But again, it's all going to happen in the compiler, not when your code is running |
03:01:00 | FromDiscord | <jtv> In fact, llvm is smart enough that it knows whether those four bytes are next to each other in the array, and will just do a single LOAD instruction if that's the cheapest thing on the archtecture |
03:02:02 | FromDiscord | <jtv> You would even end up w/ the same code w/ the multiply approach, very obvious strength reduction compilers have done well for 30 years |
03:03:40 | * | neceve joined #nim |
03:04:03 | * | neceve quit (Remote host closed the connection) |
03:04:24 | FromDiscord | <jtv> Seriously, would love to understand why you think it's not a good approach |
03:06:59 | * | ltriant quit (Ping timeout: 260 seconds) |
03:21:21 | FromDiscord | <albassort> q: |
03:21:33 | FromDiscord | <albassort> if i have a module which runs code, when its imported, that code runs |
03:21:47 | FromDiscord | <albassort> but what happens if that module is imported multiple times |
03:22:06 | FromDiscord | <albassort> does that code run every time its imported or just the once |
03:22:45 | FromDiscord | <adsspottipsusa> I'll help the community how earn $30k within 3 days and hours but you will reimburse me 10% of your dividend when you collect it. Note\: only interested people should involve. Whatsapp +1 (209) 876-7868 immediately. |
03:23:19 | FromDiscord | <jtv> It only ever runs once |
03:23:24 | FromDiscord | <albassort> @Yardanico |
03:23:49 | FromDiscord | <albassort> <@&371760044473319454> |
03:24:59 | FromDiscord | <albassort> In reply to @jtv "It only ever runs": https://tenor.com/view/the-simpsons-mr-burns-evil-laugh-evil-laugh-gif-4076853 |
03:28:46 | * | wallabra quit (Ping timeout: 256 seconds) |
03:36:42 | * | neceve joined #nim |
03:37:01 | * | neceve quit (Remote host closed the connection) |
03:44:38 | * | neceve joined #nim |
03:45:02 | * | neceve quit (Remote host closed the connection) |
03:46:32 | * | ltriant joined #nim |
03:52:16 | * | wallabra joined #nim |
03:52:34 | * | ltriant quit (Ping timeout: 256 seconds) |
03:56:43 | * | neceve joined #nim |
03:56:59 | FromDiscord | <albassort> this is a dumb idea i had |
03:57:01 | * | neceve quit (Remote host closed the connection) |
03:57:38 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4ibJ |
03:57:53 | FromDiscord | <Rika> ? |
03:57:59 | FromDiscord | <Rika> Just don’t have the clause at the end |
03:58:06 | FromDiscord | <Rika> Or huh |
03:58:10 | FromDiscord | <Rika> Okay why though |
03:58:28 | FromDiscord | <albassort> because the alternative is |
03:58:42 | FromDiscord | <Rika> That doesn’t make sense because that’s not what finally means |
03:58:55 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4ibK |
04:00:12 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4ibL |
04:00:16 | FromDiscord | <Rika> In reply to @Rika "That doesn’t make sense": See |
04:00:24 | FromDiscord | <albassort> ok pick a different word |
04:00:33 | FromDiscord | <Rika> It’s not my idea |
04:00:34 | FromDiscord | <albassort> finally is like the closest i could think of |
04:00:38 | * | neceve joined #nim |
04:01:20 | FromDiscord | <Elegantbeef> Aremt you just describing a case statement? |
04:01:40 | FromDiscord | <Rika> No, he wants the new clause to trigger when any of the if statements do |
04:01:48 | FromDiscord | <Rika> So technically but no |
04:01:58 | FromDiscord | <Elegantbeef> Set a flag and trigger |
04:02:13 | FromDiscord | <Rika> Prolly doesn’t want to do that |
04:02:18 | FromDiscord | <albassort> thats the worst of all worlds |
04:02:54 | FromDiscord | <Rika> Really just use another if clause |
04:03:24 | FromDiscord | <albassort> that extra variable annoys me |
04:03:38 | FromDiscord | <Elegantbeef> So then use a proc and call it at the end of all your branches |
04:04:07 | FromDiscord | <Rika> Make a macro that does it |
04:05:06 | FromDiscord | <albassort> macros scary and needless |
04:05:23 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4ibN |
04:15:56 | * | ltriant joined #nim |
04:24:20 | * | ltriant quit (Ping timeout: 246 seconds) |
04:42:03 | * | rockcavera quit (Remote host closed the connection) |
04:43:37 | FromDiscord | <Cheeseinator> Is it possible to get Nim syntax highlighting for LaTeX? |
04:55:15 | FromDiscord | <Rika> Perhaps create one manually in listings? |
04:55:26 | FromDiscord | <Rika> Or use those other packages I’m not familiar with |
05:02:00 | * | arkurious quit (Quit: Leaving) |
05:02:23 | * | ltriant joined #nim |
05:07:24 | * | ltriant quit (Ping timeout: 264 seconds) |
05:51:13 | * | ltriant joined #nim |
05:55:56 | * | ltriant quit (Ping timeout: 260 seconds) |
06:00:02 | * | neceve quit (Quit: ZNC - https://znc.in) |
06:08:39 | * | neceve joined #nim |
06:09:01 | * | neceve quit (Remote host closed the connection) |
06:17:59 | * | wallabra_ joined #nim |
06:19:30 | * | wallabra quit (Ping timeout: 268 seconds) |
06:19:31 | * | wallabra_ is now known as wallabra |
06:19:33 | * | wallabra is now known as wallabra_ |
06:19:42 | * | wallabra_ is now known as wallabra |
06:20:27 | * | xet7 quit (Ping timeout: 248 seconds) |
06:24:24 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4ic2 |
06:25:20 | FromDiscord | <albassort> that is an interesting way to do that |
06:25:56 | FromDiscord | <albassort> i think that is pretty unreadable for most people though |
06:25:59 | FromDiscord | <albassort> it took me a bit |
06:26:04 | FromDiscord | <emanresu3> I like that Nim's expressions work like that |
06:26:21 | FromDiscord | <emanresu3> yeah kind of↵(@albassort) |
06:27:27 | FromDiscord | <albassort> doesn't work here though |
06:28:00 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4ic3 |
06:29:07 | FromDiscord | <albassort> completely disconnected conditions |
06:33:12 | * | xet7 joined #nim |
06:38:40 | * | neceve joined #nim |
06:39:01 | * | neceve quit (Remote host closed the connection) |
06:39:04 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4ic4 |
06:39:30 | FromDiscord | <emanresu3> but that continue tells me you're looping and that wouldn't exactly work |
06:40:42 | * | vicecea quit (Remote host closed the connection) |
06:42:12 | * | vicecea joined #nim |
06:44:13 | FromDiscord | <emanresu3> But maybe just write it as a template, but then again you would instead need to save the boolean in a flag variable |
06:50:42 | * | neceve joined #nim |
06:51:02 | * | neceve quit (Remote host closed the connection) |
06:54:56 | FromDiscord | <emanresu3> wait, but do you want the `continue` to be run only for the first condition but only after the "`finally`-like" clause?↵(@albassort) |
07:00:02 | FromDiscord | <ShalokShalom> Emanresu3: Did you see the nice forums post they did about nim-pipexp?↵↵People are loving it 😊 |
07:00:23 | * | neceve joined #nim |
07:00:36 | FromDiscord | <ShalokShalom> Do you want to push the composition arrows also to nimble?↵↵I could do that then also? |
07:02:14 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4icc |
07:02:41 | FromDiscord | <emanresu3> Hi @ShalokShalom I saw this one https://forum.nim-lang.org/t/9708↵(@ShalokShalom) |
07:03:26 | FromDiscord | <ShalokShalom> Yep |
07:03:58 | FromDiscord | <emanresu3> I'm glad people like it, as a shell scripter, it's the main feature I missed in python |
07:04:44 | FromDiscord | <ShalokShalom> Oh, I see 🙂 |
07:05:14 | FromDiscord | <ShalokShalom> Python has a quite nice library, that makes many of those features possible too |
07:05:37 | FromDiscord | <emanresu3> Maybe, but I don't think it's very ready yet, I don't use composition very often so maybe one would inmediately find problems with it? Like not working with overloaded procs↵(@ShalokShalom) |
07:05:42 | FromDiscord | <ShalokShalom> Will update the library on Github and Nimble, once I am at a computer. |
07:06:01 | FromDiscord | <ShalokShalom> In reply to @emanresu3 "Maybe, but I don't": Ok, then let us wait 🙂 |
07:06:21 | FromDiscord | <emanresu3> That would awesome thanks |
07:07:45 | FromDiscord | <emanresu3> I'm working on unpacking the placeholder in the pipexp repo, and maybe do expressions and lambdas like R's magrittr which is better syntax I think |
07:10:18 | FromDiscord | <ShalokShalom> I personally always thought => should be an anonymous func |
07:10:23 | FromDiscord | <ShalokShalom> Not a proc |
07:11:21 | FromDiscord | <ShalokShalom> That one is the library I meant:↵https://github.com/cognitedata/Expression |
07:11:51 | FromDiscord | <ShalokShalom> As you can see, they added it the same way, as you added the macro, syntax wise 🙂 |
07:12:45 | FromDiscord | <ShalokShalom> This library is used by Fable, to convert F# code into Python, or a copied subset of it at least. 🙂 |
07:14:32 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4icd |
07:15:01 | FromDiscord | <Elegantbeef> `static seq[T]` |
07:15:08 | FromDiscord | <Elegantbeef> or in devel `static openarray[T]` |
07:18:17 | FromDiscord | <emanresu3> But I'd need to know the seq's contents at compile time right? |
07:19:13 | FromDiscord | <Elegantbeef> Correct |
07:19:19 | FromDiscord | <Elegantbeef> Otherwise you could just use a proc or template |
07:19:29 | FromDiscord | <emanresu3> That wouldn't work because the macro would call a proc at runtime from the left-hand side |
07:20:52 | FromDiscord | <Elegantbeef> You need to know how many parameters to supply at CT |
07:20:56 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4ice |
07:21:31 | FromDiscord | <emanresu3> I got it to work for array literals of course, but I see that it wouldn't work for seq's I don't think |
07:22:15 | FromDiscord | <emanresu3> This looks cool! I'll definitely take a look↵(@ShalokShalom) |
07:36:13 | * | ltriant joined #nim |
07:53:25 | * | ltriant quit (Ping timeout: 260 seconds) |
08:25:56 | * | ltriant joined #nim |
08:30:37 | * | ltriant quit (Ping timeout: 256 seconds) |
08:40:59 | FromDiscord | <ShalokShalom> In order to update a package, that I already published to nimble, just run nimble publish again? |
08:41:18 | FromDiscord | <Rika> I don’t think so |
08:41:35 | FromDiscord | <ShalokShalom> Uhh |
08:41:51 | FromDiscord | <ShalokShalom> I refreshed my token and now is Nimble complaining |
08:42:15 | FromDiscord | <ShalokShalom> Ah, found the documentation: https://github.com/nim-lang/packages#releasing-a-new-package-version |
08:42:36 | FromDiscord | <ShalokShalom> Looked for the command, like `update` |
08:44:20 | FromDiscord | <ShalokShalom> Uff, I do not think, I have that .nimble file still laying around |
08:50:27 | FromDiscord | <ShalokShalom> Do they mean a .nimble file thats created, when I initially `nimble publish`? |
09:00:02 | * | neceve quit (Quit: ZNC - https://znc.in) |
09:02:40 | NimEventer | New thread by brendo-m: Cargo like subcommands in Nimble, see https://forum.nim-lang.org/t/9712 |
09:09:02 | FromDiscord | <emanresu3> Btw my tags weren't prefixed with 'v', I'll fix that right now, the version in the .nimble did change↵(@ShalokShalom) |
09:11:17 | FromDiscord | <ShalokShalom> Ah, I am blind 😅 |
09:12:41 | * | neceve joined #nim |
09:13:01 | * | neceve quit (Remote host closed the connection) |
09:13:25 | FromDiscord | <ShalokShalom> Considering that its your Codeberg URL, that is in the /packages directory, am I right that you can push updates on your own? |
09:14:11 | * | pro joined #nim |
09:15:37 | FromDiscord | <emanresu3> Uhm, I don't know, exactly? So you're saying that nimble packaging information updates itself? I thought I would have been another PR on github, or no? |
09:15:41 | * | neceve joined #nim |
09:16:01 | * | neceve quit (Remote host closed the connection) |
09:16:06 | FromDiscord | <Elegantbeef> The nim package registry doesnt track versions |
09:16:15 | FromDiscord | <Elegantbeef> It's just a list of git urls that one can use `nimble install packageName` with |
09:17:41 | * | pro left #nim (#nim) |
09:18:23 | FromDiscord | <ShalokShalom> I think you can edit both the nimble file and the tag on Codeberg |
09:18:38 | FromDiscord | <emanresu3> Oh, I see, then if I do `nimble install pipexp` I already get the latest version on my repo right?, there's no nimble update or PR on github necessary? |
09:18:38 | FromDiscord | <Elegantbeef> Correct |
09:18:43 | FromDiscord | <Elegantbeef> Nimble is a decentralised package manager |
09:18:49 | FromDiscord | <Elegantbeef> It just has a hard coded default package registry |
09:19:27 | FromDiscord | <emanresu3> That's great, and versions are tracked with git tags correct? |
09:19:39 | FromDiscord | <Elegantbeef> Or semver in your nimble file |
09:19:44 | * | neceve joined #nim |
09:20:01 | * | neceve quit (Remote host closed the connection) |
09:20:15 | FromDiscord | <Elegantbeef> When you \`requires "myNimblePkg \> 0.1.0" it gets the first commit that matches that afaik |
09:20:55 | FromDiscord | <ShalokShalom> I am so stupid |
09:21:06 | FromDiscord | <ShalokShalom> I named it pipexp and not nim-pipexp |
09:21:15 | FromDiscord | <ShalokShalom> Searches for nim-pipexp now fail |
09:21:56 | FromDiscord | <Elegantbeef> Putting Nim i nthe name is silly anyway |
09:22:06 | FromDiscord | <ShalokShalom> I could rename that later. Personally, I like pipexp also more |
09:22:23 | FromDiscord | <ShalokShalom> Then, I suggest to rename it to pipexp everywhere 🙂 |
09:22:31 | FromDiscord | <Elegantbeef> It's like going to a screw isle of a hardware store and asking for a "screw" |
09:22:38 | FromDiscord | <ShalokShalom> Yeah, sure |
09:22:40 | FromDiscord | <Elegantbeef> Well you're in the right place what do you expect |
09:22:44 | FromDiscord | <emanresu3> Awesome, then it's done I think. One final question could nimble get the information of `packages.json` from my packages repo? |
09:22:46 | FromDiscord | <ShalokShalom> I personally think so as well |
09:23:12 | FromDiscord | <Elegantbeef> Do you mean you can author a custom package registry? |
09:23:22 | FromDiscord | <emanresu3> I agree, I just put that prefix for my own codeberg account, but the nimble name is just pipexp |
09:23:47 | FromDiscord | <Elegantbeef> you cannot ship a package.json with your package but you can make your own registry |
09:24:06 | FromDiscord | <ShalokShalom> If I understood you right, nimble search pipexp shows you the details of your packages.json |
09:24:16 | FromDiscord | <ShalokShalom> So I guess yes. |
09:25:06 | FromDiscord | <ShalokShalom> The forum does not recognize my username anymore. |
09:25:24 | FromDiscord | <ShalokShalom> I am actually looking at a post, that I made that is showing the correct one. |
09:25:30 | FromDiscord | <emanresu3> Not sure if that's called authoring, just if later I'd like change the description a bit, just take it from the .nimble in the URL |
09:25:32 | FromDiscord | <ShalokShalom> It is not even possible, to restore password. |
09:28:41 | FromDiscord | <emanresu3> Well no, I see as tags "functional, pipeline, composition", but in my repo, there are other tags↵(@ShalokShalom) |
09:35:11 | FromDiscord | <ShalokShalom> In reply to @emanresu3 "Well no, I see": Oh, I see. Yeah, they are living in packages |
09:35:18 | FromDiscord | <ShalokShalom> Kinda weird, how this is split |
09:35:44 | FromDiscord | <ShalokShalom> I will sync this at home |
09:36:02 | FromDiscord | <ShalokShalom> Just on my way |
09:52:27 | * | ltriant joined #nim |
09:56:40 | * | neceve joined #nim |
09:57:01 | * | neceve quit (Remote host closed the connection) |
09:58:09 | * | ltriant quit (Ping timeout: 260 seconds) |
10:01:11 | * | neceve joined #nim |
10:11:59 | * | kenran joined #nim |
10:13:45 | * | kenran quit (Remote host closed the connection) |
10:21:42 | NimEventer | New post on r/nim by aphkyle: How should one start a GUI library, see https://reddit.com/r/nim/comments/zhp0o0/how_should_one_start_a_gui_library/ |
10:29:12 | * | ltriant joined #nim |
10:33:46 | * | ltriant quit (Ping timeout: 256 seconds) |
10:51:58 | * | ltriant joined #nim |
10:59:44 | FromDiscord | <a weird programmer> Hello, are pointers optional in nim? as in if i keep the GC i wont have to use pointers correct? |
11:02:58 | FromDiscord | <Bung> yes |
11:04:22 | FromDiscord | <Bung> in common you will use it when your project depends on c wrapper |
11:05:41 | FromDiscord | <a weird programmer> hm so the GC doesnt work well with C wrappers or it doesnt work at all? |
11:10:42 | FromDiscord | <Phil> So I have a proc with this signature:↵`func toFormField[T: range](value: Option[T], fieldName: string): FormField =`↵It apparently gets picked when T is a string.↵Which... I don't get, how is string a range? |
11:11:24 | FromDiscord | <Phil> What flabbergasts me more, the some context has this overload also around:↵`func toFormField(value: Option[string], fieldName: string): FormField = `↵And the range version gets picked over the string version |
11:11:46 | FromDiscord | <Phil> (edit) "What flabbergasts me more, the some context has this overload also around:↵`func toFormField(value: Option[string], fieldName: string): FormField = `↵And the ... range" added "generic" |
11:11:52 | FromDiscord | <Phil> (edit) "What flabbergasts me more, the some context has this overload also around:↵`func toFormField(value: Option[string], fieldName: string): FormField = `↵And the generic range version gets picked over the ... string" added "explicit" |
11:18:24 | FromDiscord | <j-james> wondering - how can i declare a function that takes an array of mutable objects? |
11:19:49 | FromDiscord | <j-james> whenever i iterate through it the compiler seems to treat the objects as immutable |
11:20:56 | FromDiscord | <j-james> er, what? weird |
11:21:33 | FromDiscord | <j-james> shadowing the object worked |
11:22:52 | FromDiscord | <j-james> cool that was just me forgetting how ref types work 🤦 |
11:24:12 | * | ltriant quit (Ping timeout: 256 seconds) |
11:43:51 | FromDiscord | <ravinder387> what's the purpose of ismainModule() function |
11:45:09 | FromDiscord | <.tochka> In reply to @ravinder387 "what's the purpose of": its a definition, to know when module is compiled as entry or imported |
11:46:34 | FromDiscord | <ravinder387> # file.nim |
11:46:43 | FromDiscord | <ravinder387> sent a long message, see http://ix.io/4id0 |
11:47:11 | FromDiscord | <ravinder387> so entry will begin with addTwoInteger() proc |
11:47:35 | FromDiscord | <ravinder387> when file.nim compiled to binary |
11:48:33 | FromDiscord | <.tochka> if you do `nim c file.nim` then code under when will be executed, but if you do `nim c otherFile.nim` that imports `file.nim`, then when will be ignored |
11:51:15 | FromDiscord | <ravinder387> In reply to @.tochka "if you do `nim": thanks dude |
11:51:24 | FromDiscord | <MetuMortis> In reply to @ravinder387 "what's the purpose of": It is like name == "main" in Python |
11:51:35 | FromDiscord | <MetuMortis> (edit) "name" => "`name" | ""main"" => ""main"`" |
12:00:02 | * | neceve quit (Quit: ZNC - https://znc.in) |
12:01:13 | * | junaid_ joined #nim |
12:06:24 | * | ltriant joined #nim |
12:10:16 | FromDiscord | <Horizon [She/Her]> How would i parse a ISO8601 date in Nim? Does the `times` module have a way to do it? |
12:10:57 | FromDiscord | <MetuMortis> In reply to @Patitotective "is there a nim": @Horizon [She/Her] |
12:11:14 | * | ltriant quit (Ping timeout: 256 seconds) |
12:11:32 | FromDiscord | <Horizon [She/Her]> ah alright, thanks aha |
12:12:06 | FromDiscord | <MetuMortis> 😄 |
12:13:49 | * | neceve joined #nim |
12:14:02 | * | neceve quit (Remote host closed the connection) |
12:17:51 | * | neceve joined #nim |
12:18:02 | * | neceve quit (Remote host closed the connection) |
12:21:40 | * | neceve joined #nim |
12:22:02 | * | neceve quit (Remote host closed the connection) |
12:26:48 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4id9 |
12:26:58 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4id9" => "https://play.nim-lang.org/#ix=4ida" |
12:28:06 | FromDiscord | <Phil> It's not even consistent on where it breaks, just 90% chance it breaks during this step |
12:28:56 | FromDiscord | <Phil> I just rebooted the machine as well, so at least it's no holdover from having installed updates on arch but not yet having rebooted |
12:31:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4idd |
12:32:35 | FromDiscord | <Phil> Nimibook also is sometimes randomly working for specific pages and sometimes not, the hell is going on |
12:33:19 | * | jmdaemon quit (Ping timeout: 260 seconds) |
12:33:51 | * | junaid_ quit (Remote host closed the connection) |
12:39:07 | FromDiscord | <hotdog> Looks like you have a flaky connection to GitHub @Phil |
12:39:14 | FromDiscord | <hotdog> Could be your end or theirs |
12:39:46 | FromDiscord | <hotdog> https://www.githubstatus.com |
12:40:44 | FromDiscord | <Horizon [She/Her]> How would i use an enum to convert string values to it's appropriate value? |
12:41:30 | FromDiscord | <Horizon [She/Her]> I have a `Privacy` enum with `Public="public", Private="private"` as the values, was wondering if there's a built-in conversion method |
12:41:33 | FromDiscord | <hotdog> In reply to @Event Horizon "How would i use": https://nim-lang.org/docs/strutils.html#parseEnum%2Cstring |
12:43:00 | FromDiscord | <Horizon [She/Her]> Ah thanks! |
12:43:41 | FromDiscord | <Phil> In reply to @hotdog "Looks like you have": That problem appears to have reduced. |
12:44:01 | FromDiscord | <Phil> Though now somehow toml_serialization is completely blocking my usage of nimibooks↵> Error: unhandled exception: cannot open: /home/philipp/.nimble/pkgs/toml_serialization-0.2.0/toml_serialization.nim [IOError] |
12:44:51 | * | crem joined #nim |
12:45:42 | * | ltriant joined #nim |
12:45:47 | FromDiscord | <Phil> Which is a 1.6.10 specific issue |
12:46:51 | FromDiscord | <ringabout> In reply to @Isofruit "Though now somehow toml_serialization": Use refc? |
12:48:01 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4idi |
12:48:25 | FromDiscord | <Phil> Pretty much. The issue is that it's for some reason that I do not understand looking specifically for 0.2.0 |
12:48:29 | FromDiscord | <Phil> I only have 0.2.3 though |
12:48:32 | FromDiscord | <Phil> And I can not install 0.2.0 |
12:52:40 | FromDiscord | <ringabout> In reply to @Isofruit "I only have 0.2.3": What's inside your `toml_serialization-0.2.3` directory? |
12:53:17 | FromDiscord | <ringabout> Is there a `0.2.0` directory in the `/home/philipp/.nimble/pkgs/`? |
12:54:23 | FromDiscord | <Phil> There is no 0.2.0 dir in my packages.↵Inside the 0.2.3 is this: https://media.discordapp.net/attachments/371759389889003532/1051119687955652708/image.png |
12:55:14 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4idk |
12:55:18 | * | Guest92 joined #nim |
12:55:41 | Guest92 | is anyone online here? |
12:57:08 | FromDiscord | <Phil> Quite a fair amount of folks are |
12:57:24 | Guest92 | are you from discord? |
12:57:30 | FromDiscord | <Phil> Aye |
12:57:42 | Guest92 | how do you see my messages? does a bot send them? |
12:57:58 | FromDiscord | <Phil> IRC, Matrix and discord are bridged to one another |
12:58:00 | FromDiscord | <Phil> No idea who set that up |
12:58:07 | Guest92 | oh interesting |
12:58:45 | * | Guest92 quit (Client Quit) |
12:59:11 | * | Guest92 joined #nim |
12:59:43 | * | Guest92 quit (Client Quit) |
13:01:20 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4ido |
13:03:52 | FromDiscord | <Phil> What exactly does one need to do a proper package update?↵So far I was under the impression its:↵1) Add a git tag ala "git tag v1.0.1"↵2) Update the nimble file |
13:03:56 | FromDiscord | <Phil> Is there anything else? |
13:04:17 | Zevv | hey ringabout; have we met? |
13:11:16 | FromDiscord | <ringabout> In reply to @Zevv "hey ringabout; have we": Hey, I have been around three years in the Nim community. So yes |
13:11:48 | FromDiscord | <ringabout> I changed my account name from "flywind" to "ringabout" |
13:12:28 | FromDiscord | <ringabout> In reply to @Isofruit "What exactly does one": I do it in the reverse order. |
13:12:53 | FromDiscord | <ringabout> Firstly update the nimble version, then tag the commit. |
13:15:38 | FromDiscord | <ringabout> In reply to @ringabout "I changed my account": If that can ring a bell. |
13:15:39 | Zevv | ah flywind, cool \o/ |
13:15:50 | Zevv | aka xflywind |
13:16:26 | FromDiscord | <ringabout> haha, yeah |
13:20:20 | FromDiscord | <Phil> Given he is ringabout now he is rather ex-xflywind |
13:20:48 | FromDiscord | <Phil> 👉 👉 |
13:25:39 | NimEventer | New thread by Isofruit: Snorlogue - A prologue extension, see https://forum.nim-lang.org/t/9713 |
13:26:16 | FromDiscord | <Phil> Alrighty, and with this I have been productive for the weekend |
13:26:31 | FromDiscord | <ringabout> @Phil Congrats! Btw, the Nim forum supports picture. |
13:26:38 | FromDiscord | <ringabout> (edit) "@Phil ... Congrats!" added "" |
13:28:22 | FromDiscord | <ringabout> There shall be a link to `Snorlogue` I think. |
13:28:56 | FromDiscord | <Phil> Just added it in, as for pictures I guess I could link the ones I already uploaded to imgur |
13:29:55 | FromDiscord | <ringabout> https://forum.nim-lang.org/t/9457 |
13:30:12 | FromDiscord | <ringabout> I don't know how they do this though, I didn't used this feature before. |
13:31:31 | FromDiscord | <Phil> The syntax is fairly easy, I'm just not sure about the format because it doesn't appear to resize the image |
14:06:50 | * | ltriant quit (Ping timeout: 256 seconds) |
14:24:44 | FromDiscord | <Horizon [She/Her]> Trying to switch over to `vim` instead of `nano` |
14:25:57 | FromDiscord | <rakgew> micro might be another alternative |
14:27:18 | FromDiscord | <Horizon [She/Her]> May look at that after tbh... Just hope there's Nim support |
14:33:41 | FromDiscord | <MetuMortis> In reply to @Event Horizon "Trying to switch over": I'd have a look to Neovim |
14:33:49 | FromDiscord | <MetuMortis> Specifically astro nvim |
14:36:03 | FromDiscord | <Horizon [She/Her]> In reply to @MetuMortis "I'd have a look": That's what i was looking at haha |
14:36:08 | FromDiscord | <Horizon [She/Her]> In reply to @MetuMortis "Specifically astro nvim": May try it later |
14:45:30 | FromDiscord | <rakgew> nim with micro is actually nice. no setup needed. |
14:46:05 | FromDiscord | <rakgew> does syntax coloring and on-save check out of the box. |
14:46:55 | FromDiscord | <rakgew> advanced things can be done with lua extensions. |
15:18:45 | arkanoid | fastest way to round a float32 to int? |
15:19:03 | arkanoid | math.round(mtFloat).int, is it? |
15:24:00 | Amun-Ra | or a good old way: int xf + 0.5 |
15:34:39 | FromDiscord | <MetuMortis> In reply to @Isofruit "There is no 0.2.0": How do you compile a project like that (multi module project) does it include all nim files in executable? |
15:36:00 | FromDiscord | <Horizon [She/Her]> In reply to @rakgew "advanced things can be": Nice! |
15:37:06 | FromDiscord | <Phil> In reply to @MetuMortis "How do you compile": In what sense do you mean?↵You typically just run the compile command against your projects main nim file (in my case `snorlogue.nim`), that'll lead to the compilation of all imported modules from there as well, which leads to the compilation of all modules from those modules etc. until everything is compiled and then gets statically linked against one another |
15:37:31 | FromDiscord | <Phil> It's not really different from compiling a single-module-project in practice |
15:38:14 | FromDiscord | <Horizon [She/Her]> Also, does anyone know of a library i could use for printing markdown in Nim? |
15:39:47 | arkanoid | Amun-Ra: k |
15:54:46 | * | ltriant joined #nim |
15:59:40 | FromDiscord | <MetuMortis> In reply to @Isofruit "It's not really different": Thanks a lot for the explanation |
16:00:43 | * | ltriant quit (Ping timeout: 248 seconds) |
16:06:50 | * | anddam left #nim (WeeChat 3.7.1) |
16:13:27 | FromDiscord | <ShalokShalom> In reply to @Isofruit "Alrighty, and with this": Quite my spirit 😄 |
16:13:49 | FromDiscord | <ShalokShalom> In reply to @Event Horizon "Also, does anyone know": Printing markdown? |
16:24:33 | NimEventer | New Nimble package! strides - Strided indexing and slicing with a step, see https://github.com/fsh/strides |
16:28:30 | FromDiscord | <Horizon [She/Her]> In reply to @ShalokShalom "Printing markdown?": Into the terminal yeah |
16:31:13 | * | ltriant joined #nim |
16:36:12 | * | ltriant quit (Ping timeout: 264 seconds) |
16:56:05 | * | pro joined #nim |
16:56:27 | * | pro left #nim (#nim) |
17:13:29 | FromDiscord | <Hamid_Bluri> I encountered to a stupid error where the async proc cannot continue after `except` block |
17:14:22 | FromDiscord | <Hamid_Bluri> I don't know why, it just says `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` |
17:15:02 | FromDiscord | <Hamid_Bluri> even the `finally` block is not executed |
17:39:26 | FromDiscord | <Gumbercules> That's a segmentation fault |
17:39:43 | FromDiscord | <Gumbercules> You tried to read invalid memory somewhere |
18:20:14 | * | arkanoid quit (Remote host closed the connection) |
18:20:31 | * | arkanoid joined #nim |
18:28:24 | * | arkanoid quit (Ping timeout: 268 seconds) |
18:30:20 | FromDiscord | <Hamid_Bluri> no, seems like `asyncCheck` have some problems in `except` branch, no problem with `discard await ...` |
18:32:41 | FromDiscord | <Hamid_Bluri> I'm still investigating |
19:15:22 | FromDiscord | <Phil> sent a long message, see http://ix.io/4ifE |
19:15:40 | FromDiscord | <Phil> If you can be certain that your seq[string] consists of strings that are individual characters, you can do by just going `str[0]` |
19:20:48 | FromDiscord | <lobsang2> In reply to @Isofruit "If you can be": Thanks! Solves the first problem. Can you help me understand why ord("A") won't work, but ord('A') does? |
19:20:53 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4ifH |
19:21:28 | FromDiscord | <Phil> In reply to @lobsang2 "Thanks! Solves the first": 'A' is a single character. ↵"A" is a string, basically an array of characters containing 1 character |
19:22:08 | FromDiscord | <Phil> It's kind of the difference between `5` and `@[5]` , one is just an int, the other is a sequence of integers that just happens to be 1 entry long |
19:22:31 | FromDiscord | <lobsang2> Gotcha! |
19:23:29 | FromDiscord | <Horizon [She/Her]> Is it better for a `property=` method to return a new object, or to update the existing object? (It's bound to an API, so) |
19:23:49 | FromDiscord | <Phil> What does property= do? |
19:23:54 | FromDiscord | <Phil> Does it set a value? |
19:24:40 | FromDiscord | <Horizon [She/Her]> Yup, but thinking about it now, it's probably better to make the object itself mutable, and then allow the user to update the object themselves via `pk.system("id") = systemObjectWithChanges` |
19:25:15 | FromDiscord | <Phil> My next question would've basically been whether it's a ref type or not, because for ref type I'd expect mutation of the existing object |
19:25:21 | FromDiscord | <Phil> for value types I'd expect the copy |
19:25:34 | FromDiscord | <Horizon [She/Her]> It's not a ref type no |
19:25:48 | FromDiscord | <Phil> You might want to ask others what their expectation would be for the given type, but I'd generally write the code around what the expectation would be if the reader knows the given type |
19:25:53 | FromDiscord | <Horizon [She/Her]> Hm fair, there's many properties though so getting a new object for every change sounds a bit redundant haha |
19:26:01 | FromDiscord | <Horizon [She/Her]> Yeah that's fair, thanks! |
19:26:28 | FromDiscord | <Phil> In reply to @Event Horizon "Hm fair, there's many": If you want to mutate the same thing a bunch that sounds like a case for a ref-type to me ^^ |
19:27:22 | FromDiscord | <Horizon [She/Her]> What's the point of a ref type? The only thing I've used them for is for storing them in a list so i can get the original type with it's values still there |
19:27:58 | ehmry | ref types are necessary if a type is recursive |
19:28:43 | FromDiscord | <Horizon [She/Her]> It's not recursive so i see no issue in this situation really |
19:31:03 | FromDiscord | <Phil> sent a long message, see http://ix.io/4ifK |
19:31:29 | FromDiscord | <Phil> (edit) "http://ix.io/4ifK" => "http://ix.io/4ifL" |
19:31:44 | FromDiscord | <Phil> (edit) "http://ix.io/4ifL" => "http://ix.io/4ifM" |
19:31:45 | FromDiscord | <Horizon [She/Her]> Chrono's `parseIsoTs` can't parse `2020-01-12T02:00:33.387824Z` but https://dencode.com/en/date/iso8601 can h, |
19:32:34 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "To me generally I": Hm fair, thanks! |
19:32:38 | FromDiscord | <Horizon [She/Her]> (edit) "h," => "hm" |
19:35:05 | * | arkanoid joined #nim |
19:44:02 | FromDiscord | <Horizon [She/Her]> In reply to @Event Horizon "Chrono's `parseIsoTs` can't parse": Created an issue for it on the repo: https://github.com/treeform/chrono/issues/7 |
19:47:49 | FromDiscord | <Horizon [She/Her]> @treeform sorry for the ping aha, just wondering why this wasn't acknowledged before? |
19:47:59 | FromDiscord | <Horizon [She/Her]> (the format, that is) |
19:48:26 | FromDiscord | <Horizon [She/Her]> And is there a workaround i can use? Not sure how to preserve the milliseconds with `parseTs` |
20:02:41 | FromDiscord | <treeform> that looks like it should work |
20:04:33 | FromDiscord | <treeform> I can confirm is get that as well |
20:06:51 | FromDiscord | <treeform> It looks like I don't have the code to parse the seconds |
20:08:15 | FromDiscord | <Horizon [She/Her]> Using inim with this code also gives me this error: `var myTs = parseTs("{year/4}-{month/2}-{day/2}T{hour/2}:{minute/2}:{second/2}.{secondFraction/3}Z", "2020-01-12T02:00:33.387824Z")`↵`var myTs = parseTs("{year/4}-{month/2}-{day/2}T{hour/2}:{minute/2}:{second/2}.{secondFraction/3}Z", "2020-01-12T02:00:33.387824Z")` |
20:09:25 | FromDiscord | <Horizon [She/Her]> (edit) ""2020-01-12T02:00:33.387824Z")`↵`var myTs = parseTs("{year/4}-{month/2}-{day/2}T{hour/2}:{minute/2}:{second/2}.{secondFraction/3}Z", "2020-01-12T02:00:33.387824Z")`" => ""2020-01-12T02:00:33.387824Z")`↵`/home/horizon/.nimble/pkgs/chrono-0.3.0/chrono/calendars.nim(667) parseCalendar`" |
20:09:37 | FromDiscord | <Horizon [She/Her]> Edited the error in, didn't copy it before |
20:13:00 | FromDiscord | <Horizon [She/Her]> Ah, my bad |
20:13:02 | FromDiscord | <treeform> In reply to @Event Horizon "Using inim with this": I found not 1 but two issues, here is the work around: |
20:13:10 | FromDiscord | <Horizon [She/Her]> `secondFraction` only, not `/6` |
20:13:29 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=4ifY |
20:13:52 | FromDiscord | <treeform> Bug 1 `parseIsoTs` should also do optional second fraction |
20:14:15 | FromDiscord | <treeform> Bug 2 converting ts to a calendar (how all formatting works)... forgets to copy over the secondFraction |
20:14:56 | FromDiscord | <treeform> maybe bug 3 or a nice to have is support for `{secondFraction/6}` |
20:15:05 | FromDiscord | <Horizon [She/Her]> `var myTs = parseTs("{year/4}-{month/2}-{day/2}T{hour/2}:{minute/2}:{second/2}.{secondFraction/3}Z", "2020-01-12T02:00:33.387824Z")` seems to work alright though? Doing `$myTs` gives `var myTs = parseTs("{year/4}-{month/2}-{day/2}T{hour/2}:{minute/2}:{second/2}.{secondFraction/3}Z", "2020-01-12T02:00:33.387824Z")` |
20:15:30 | FromDiscord | <Horizon [She/Her]> (edit) "`var myTs = parseTs("{year/4}-{month/2}-{day/2}T{hour/2}:{minute/2}:{second/2}.{secondFraction/3}Z", "2020-01-12T02:00:33.387824Z")`" => "`1578794433.387824`" |
20:16:09 | FromDiscord | <Horizon [She/Her]> Seems to be correct just reading it? I am using `chrono` `0.3.0`, installed by Nimble so |
20:16:26 | FromDiscord | <treeform> I get `Invalid format token: secondFraction/3` ? |
20:17:04 | FromDiscord | <Horizon [She/Her]> Ah i removed `/3`, i didn't update my clipboard aha |
20:17:23 | FromDiscord | <treeform> i'll have a fix for your issue soon |
20:17:33 | FromDiscord | <Horizon [She/Her]> Thank you! ^^ |
20:19:38 | * | jjido joined #nim |
20:36:35 | * | ltriant joined #nim |
20:41:36 | * | ltriant quit (Ping timeout: 268 seconds) |
20:45:27 | FromDiscord | <ambient> is there any sugar to create view into a seq or an array outside just typing 'openArray'? |
20:46:22 | FromDiscord | <Phil> That's.... beyond my scope of knowledge as I'm not familiar with the "view" terminology. |
20:47:04 | FromDiscord | <ambient> you have some array of continuous memory and you have start and end location at its simplest |
20:47:13 | FromDiscord | <ambient> striding is the more general concept |
20:48:35 | FromDiscord | <Phil> General question into the round:↵If I have an HTML string and want to (for testing purposes) do queries ala "Give me the HTML tag with this css class and give me its innerText/innerHTML attribute"... how do I do that in nim? |
20:48:46 | FromDiscord | <ambient> i guess it would be useful to just read through arraymancer sources |
20:49:11 | FromDiscord | <Phil> (edit) "nim?" => "nim?↵htmlparser doesn't seem that useful here" |
20:49:14 | FromDiscord | <auxym> not that I know of, but I think you could do it by defining a `[]` macro, like arraymancer does. which takes a special operator or something. like `arr[0 - 4]` or something |
20:50:34 | FromDiscord | <auxym> where `-` (I'm sure someone can think of something better) would generate a distinct slice type |
20:53:04 | FromDiscord | <ambient> i would probably just use a function like array.view[3:5, 5:-3::-2] or something like that |
20:54:53 | FromDiscord | <auxym> ah, didn't realize you wanted the fancy colon syntax, thought you just wanted a shortcut for `toOpenArray` |
20:55:22 | FromDiscord | <ambient> well a shortcut would be a start, and that's what my question was yes |
20:56:00 | FromDiscord | <ambient> although I think there's already arraymancer where I'm going, but that's a completely different style of programming instead of just some handy shortcuts to create array views |
21:03:29 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
21:06:40 | FromDiscord | <ambient> .view(3..5, -3..5|-2) or something like that would probably be more Nim-like |
21:07:17 | FromDiscord | <jtv> sent a long message, see http://ix.io/4ig1 |
21:08:10 | FromDiscord | <jos> RootRef? |
21:09:57 | FromDiscord | <jtv> Ah, so stick the value in a separate object type? |
21:17:22 | FromDiscord | <jtv> Okay, thanks, jos. That should work, was more expecting to directly box sequences as pointers directly, but I'll shove them in nested objects. |
21:17:27 | FromDiscord | <jtv> Good idea |
21:21:39 | FromDiscord | <a weird programmer> are there vectors in nim? |
21:21:50 | FromDiscord | <a weird programmer> i cant seem to find any documentation on it |
21:25:06 | FromDiscord | <MetuMortis> What will you do with Vectors? Like you can create one |
21:25:15 | FromDiscord | <ezquerra> You have built-in arrays and sequences |
21:25:54 | FromDiscord | <ezquerra> If you want something that behaves as mathematical vectors I suggest you check Arraymancer |
21:26:10 | FromDiscord | <ezquerra> You should ask in the #science channel |
21:26:27 | FromDiscord | <a weird programmer> i'll just make my own vector macro |
21:26:44 | FromDiscord | <a weird programmer> i just wanted to be sure it isnt in the std lib |
21:26:59 | FromDiscord | <Phil> What's the difference between vector and seq to you? |
21:27:05 | FromDiscord | <Phil> fixed size? |
21:29:44 | FromDiscord | <a weird programmer> yeah |
21:30:04 | FromDiscord | <a weird programmer> i need something that can scale until my ram is full |
21:34:26 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4igb |
21:34:56 | FromDiscord | <Phil> That way you can have access to all goodies that are already implemented for arrays and can define your own procs with your Vector type |
21:35:24 | FromDiscord | <a weird programmer> ah i see |
21:35:30 | FromDiscord | <a weird programmer> alright thanks! |
21:36:58 | FromDiscord | <a weird programmer> dont think this would work though |
21:37:10 | FromDiscord | <Phil> In reply to @a weird programmer "alright thanks!": Happy to help!↵That's a type alias, basically it's still array[3, int], you just can also call it Vector.↵If you want to make it a distinct type (which means `Vector` will not be able to be used with any other procs defined for array, and other arrays won't be able to use your Vector procs), you can use `distinct` types |
21:37:11 | FromDiscord | <a weird programmer> im computing squared numbers from 1 to 1 billion |
21:37:46 | FromDiscord | <Phil> So you want a vector that is 1 billion entries long? |
21:37:55 | FromDiscord | <Phil> And then create a second vector from that? |
21:37:56 | FromDiscord | <a weird programmer> yes |
21:38:04 | FromDiscord | <a weird programmer> but this stores integers no? |
21:38:34 | FromDiscord | <Phil> That one in particular, yes |
21:38:45 | FromDiscord | <Phil> Can of course also do an array of arrays |
21:39:03 | FromDiscord | <a weird programmer> like a 2d array? |
21:39:17 | FromDiscord | <Phil> Exactly like that |
21:39:18 | * | kenran joined #nim |
21:39:22 | FromDiscord | <a weird programmer> fair enough |
21:39:41 | * | kenran quit (Remote host closed the connection) |
21:40:01 | FromDiscord | <EyeCon> I have a feeling that you'd be happier with sequences though if you are looking into expandable containers |
21:40:14 | * | jjido joined #nim |
21:40:30 | FromDiscord | <Phil> I'd agree that it feels like you don't necessarily need to keep a billion numbers at ram at once |
21:40:48 | FromDiscord | <a weird programmer> hahaha yeah |
21:41:05 | FromDiscord | <a weird programmer> im gonna try both since why not |
21:45:52 | FromDiscord | <MetuMortis> When I use a template it is basically copy pasting the body of the template to the line I specified as I understand right? |
21:47:16 | FromDiscord | <Phil> In reply to @MetuMortis "When I use a": Correct |
21:47:32 | FromDiscord | <Phil> It's pretty useful when you want to replicate stuff like context-handlers in python |
21:47:40 | FromDiscord | <Phil> (edit) "context-handlers" => "context-managers" |
21:49:39 | FromDiscord | <Phil> ... I'm kinda surprised that this is turning out as difficult as it is |
21:52:36 | FromDiscord | <a weird programmer> sent a code paste, see https://play.nim-lang.org/#ix=4igd |
21:53:40 | FromDiscord | <Phil> Just wanted to write procs that, given an HTML file, confirm that a given piece of HTML is contained using basically JS stuff like `querySelector` and attributes like `innerHTML` and `innerText`. But the packages for `querySelector` and the like aren't behaving nicely with the terribly formatted HTML strings I have (with a lot of whacky whitespaces and newlines) |
21:54:11 | FromDiscord | <Phil> In reply to @a weird programmer "any idea why im": You know how your proc is returning a sequence of values? |
21:54:25 | FromDiscord | <a weird programmer> not quite sure |
21:54:27 | FromDiscord | <Phil> Nim doesn't like that you're doing nothing with it and is asking you whether it should assign that to a variable or just throw it away |
21:54:50 | FromDiscord | <a weird programmer> what do you mean nothing? |
21:54:59 | FromDiscord | <a weird programmer> i appended to it and then returned it |
21:55:02 | FromDiscord | <Phil> `proc compute(num: int): seq[int] =`↵the `: seq[int]` means "I return a sequence of integers" |
21:55:12 | FromDiscord | <a weird programmer> yes |
21:55:20 | FromDiscord | <a weird programmer> i think thats what its doing |
21:55:24 | FromDiscord | <Phil> Yeh but this line here `compute(10000)` doesn't do anything with the value it's getting |
21:55:51 | FromDiscord | <a weird programmer> it's counting upwards to that value |
21:56:14 | FromDiscord | <Phil> So now nim is confused and hurting itself in its confusion!↵Why are you returning a value there when you neither want to keep it (by assigning it) nor explicitly discard it |
21:56:43 | FromDiscord | <a weird programmer> i really dont understand |
21:57:22 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4igg |
21:58:29 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4igh |
21:59:03 | FromDiscord | <a weird programmer> huh |
21:59:05 | FromDiscord | <Phil> If you don't explicitly do anything with a value, nim will complain instead of implicitly throwing that value away |
21:59:26 | FromDiscord | <a weird programmer> so basically if i am returning something from a function i have to do something with it? |
21:59:32 | FromDiscord | <Phil> Pretty much |
21:59:39 | FromDiscord | <a weird programmer> i cant just call it and throw it away without saying discard? |
21:59:53 | FromDiscord | <Phil> discard is explicitly throwing away, aye |
22:00:16 | FromDiscord | <a weird programmer> this concept is really new to me |
22:00:35 | FromDiscord | <a weird programmer> so thats what all the langs were doing with functions that i do nothing with? just throwing it away |
22:01:20 | FromDiscord | <Phil> In reply to @a weird programmer "so thats what all": Throwing the reference away and waiting for the garbage collector to delete it eventually |
22:01:53 | FromDiscord | <EyeCon> sent a code paste, see https://paste.rs/tWh |
22:01:59 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/EiP |
22:02:12 | FromDiscord | <a weird programmer> In reply to @EyeCon "Well, you can write": because this shall be compiled into a shared object for python |
22:02:23 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4igl" => "https://play.nim-lang.org/#ix=4igk" |
22:02:27 | FromDiscord | <a weird programmer> i was testing it before i compile it into a SO |
22:02:37 | FromDiscord | <Phil> Ah, you using nimpy? |
22:02:40 | FromDiscord | <a weird programmer> yes |
22:03:03 | FromDiscord | <a weird programmer> im surprised its this easy to just make shared objects with nimpy |
22:03:53 | FromDiscord | <Phil> Yeh, it's fairly nifty. Just as a heads up, do remember to compile with the -d:release flag when you have your code where you want it, it's often forgotten ^^ |
22:04:07 | FromDiscord | <a weird programmer> alright |
22:04:21 | FromDiscord | <a weird programmer> tbh i havent had this much fun in a programming language in ages |
22:04:37 | FromDiscord | <a weird programmer> if im betting on a language like this is wallstreetbets i'd bet on nim |
22:04:53 | FromDiscord | <Phil> Imo nim is a really nice language to lead you towards a lot of deeper concepts |
22:05:04 | FromDiscord | <Phil> Such as compile-time evaluation, compilers in general, interop |
22:05:19 | FromDiscord | <a weird programmer> yeah the one we discussed above i never even knew it existed |
22:05:20 | FromDiscord | <Phil> Even ref types vs. value types and so on |
22:07:36 | FromDiscord | <Phil> sent a long message, see http://ix.io/4igo |
22:07:49 | FromDiscord | <Phil> Are you a pythonista? |
22:08:19 | FromDiscord | <a weird programmer> yessir born and raised |
22:08:37 | FromDiscord | <Phil> Because in the case that you prefer snake case and are feeling forced to use camelcase because the docs are all written in camelcase, despair not |
22:08:38 | FromDiscord | <a weird programmer> the level of abstraction python provides is crazy |
22:08:53 | FromDiscord | <Phil> For nim allows you to use type insensitivity |
22:09:06 | FromDiscord | <a weird programmer> In reply to @Isofruit "Because in the case": heh i tend to just ignore any conventions any lang uses in personal projects |
22:09:13 | FromDiscord | <a weird programmer> i do what i like since its not production |
22:09:17 | FromDiscord | <Phil> meaning `isPotato` and `is_potato` are identical |
22:09:33 | FromDiscord | <a weird programmer> camelcase should be a crime |
22:10:07 | FromDiscord | <a weird programmer> In reply to @Isofruit "It allows you to": hm so is it better to leave the return type empty or to put in void? |
22:10:10 | FromDiscord | <Phil> In reply to @a weird programmer "heh i tend to": While true, when using procs from other libs and the like you may feel forced to use their names.↵Thanks to type insensitivity though you can basically write in whatever style you want |
22:10:13 | FromDiscord | <a weird programmer> what i've been doing is putting in void |
22:10:43 | FromDiscord | <Phil> In reply to @a weird programmer "hm so is it": I don't think there's really a convention, both are fine |
22:10:48 | FromDiscord | <Phil> (edit) "In reply to @a weird programmer "hm so is it": I don't think there's really a convention, both are fine ... " added "and express the same thing" |
22:10:55 | FromDiscord | <a weird programmer> fair enough |
22:11:20 | FromDiscord | <a weird programmer> i wonder if nim is viable for embedded programming |
22:11:30 | FromDiscord | <Phil> One sec, we had this earlier |
22:12:07 | FromDiscord | <a weird programmer> holy shit why is -d:release making my program so much faster |
22:12:34 | FromDiscord | <Phil> PMunch, Girvo and Generic are all relatively active embedded folks↵https://discord.com/channels/371759389889003530/756920870525730947/1050352367838699592↵For example him talking about USB |
22:12:46 | FromDiscord | <Phil> In reply to @a weird programmer "holy shit why is": Because -d:release enables a lot of optimization checks |
22:12:51 | FromDiscord | <Phil> Should speed up your program around 10x |
22:13:09 | FromDiscord | <Phil> there's also -d:danger but I haven't seen that much of a performance uplift because of it in my own project |
22:13:18 | FromDiscord | <a weird programmer> what does -d:danger do? |
22:13:29 | NimEventer | New thread by snej: How do I ‘subclass’ StringStream?, see https://forum.nim-lang.org/t/9714 |
22:13:34 | FromDiscord | <Phil> -d:danger disables a lot of runtime checks which normally slow you down slightly |
22:13:35 | FromDiscord | <demotomohiro> C lang allows you to call a function and ignore the return value. That can make programmers forget to check return value and can cause a bug.↵Just ignoring return value result in compile error is for safety. |
22:14:01 | FromDiscord | <Phil> runtime checks being "is that actually the type I thought it was" at runtime |
22:14:19 | FromDiscord | <a weird programmer> so its not worth using -d:danger? |
22:14:21 | FromDiscord | <Phil> As well as "Is my index at runtime out of bounds" etc. |
22:14:40 | FromDiscord | <Phil> It can be, but that's when you're really squeezing out performance in my eyes |
22:14:53 | FromDiscord | <a weird programmer> plus does -d:release do something like -O2 in GCC? |
22:15:17 | FromDiscord | <Phil> I'm not familiar with that flag, though demo might be |
22:15:33 | FromDiscord | <Phil> He has, in fact, written several pretty good articles about C interop and compiling |
22:15:44 | FromDiscord | <a weird programmer> im not sure but its something like that |
22:15:45 | FromDiscord | <Phil> https://internet-of-tomohiro.netlify.app/index.en.html |
22:16:06 | FromDiscord | <a weird programmer> "gcc -O sets the compiler's optimization level." |
22:16:12 | FromDiscord | <Phil> Anyway, there are compiler flags to optimize the size of your binary, optimize the speed of your binary, etc. |
22:16:19 | FromDiscord | <a weird programmer> https://media.discordapp.net/attachments/371759389889003532/1051261100940857444/image.png |
22:16:27 | FromDiscord | <demotomohiro> Use `-d:danger` when you really want fastest code even if it could return wrong result.↵Or when you want cleaner assembly output. |
22:16:52 | FromDiscord | <a weird programmer> In reply to @demotomohiro "Use `-d:danger` when you": nim is fast enough no need to dive into the danger zone |
22:18:11 | FromDiscord | <Phil> sent a long message, see http://ix.io/4igs |
22:18:19 | FromDiscord | <demotomohiro> `-d:release` Nim option adds `-O2` or `-O3` option to gcc compiler option. You can see gcc compiler options with `--listcmd` Nim option. |
22:18:40 | FromDiscord | <Phil> Every time I see the Nintendo Switch compiler section I snicker a bit |
22:19:05 | FromDiscord | <Phil> It's just so unexpected to be there |
22:19:05 | FromDiscord | <a weird programmer> In reply to @Isofruit "Here the docs over": neaat |
22:19:13 | FromDiscord | <a weird programmer> In reply to @Isofruit "Every time I see": xD |
22:19:27 | FromDiscord | <a weird programmer> next homebrew edition will be written in nim |
22:19:34 | FromDiscord | <a weird programmer> you heard it here first |
22:23:17 | FromDiscord | <auxym> sent a code paste, see https://paste.rs/jtU |
22:24:57 | FromDiscord | <auxym> In reply to @a weird programmer "plus does -d:release do": d:release turns on optimization in GCC, but also does other stuff like remove stack traces and debug symbols / line mappings in the source, and disables asserts |
22:26:06 | FromDiscord | <a weird programmer> i computed too many numbers and my pc crashed |
22:26:12 | FromDiscord | <a weird programmer> we back |
22:26:41 | FromDiscord | <a weird programmer> nim is nice |
22:26:51 | FromDiscord | <a weird programmer> nice community nice language |
22:26:57 | FromDiscord | <a weird programmer> am i in heaven or what |
22:27:46 | * | sagax quit (Remote host closed the connection) |
22:28:42 | FromDiscord | <auxym> nim is nice yes. which it had a larger community (that would contribute to better tooling). v2 will bring many nice improvements, coming real soon |
22:29:04 | FromDiscord | <auxym> (edit) "which" => "I wish" |
22:29:20 | FromDiscord | <Phil> I do kinda wish that after this the focus for like the next year or two is just... refactoring, bugfixing and stabilizing |
22:29:49 | FromDiscord | <a weird programmer> it needs some corpo backing or some bollocks like that |
22:30:10 | FromDiscord | <a weird programmer> In reply to @auxym "nim is nice yes.": what nim v2 is coming? |
22:30:44 | FromDiscord | <Phil> In reply to @a weird programmer "what nim v2 is": You can use it right now in fact.↵If you have choosenim installed you can get it via `choosenim devel` |
22:30:57 | FromDiscord | <auxym> was supposed to be before EOY. At this point I'm guessing the release is slipping a bit? perhaps in january if so |
22:31:09 | FromDiscord | <a weird programmer> i hope it doesnt bring in any breaking changes |
22:31:17 | FromDiscord | <Phil> Not really, just more features |
22:31:19 | FromDiscord | <auxym> a few, nothing super major |
22:31:24 | FromDiscord | <a weird programmer> alright |
22:31:31 | FromDiscord | <MetuMortis> sent a code paste, see https://play.nim-lang.org/#ix=4igy |
22:31:50 | FromDiscord | <auxym> decent summary of v2: https://www.youtube.com/watch?v=aDi50K_Id_k&t=16s |
22:32:01 | FromDiscord | <a weird programmer> i just hope that the nim devs learnt from what happened with C++ and its backwards compatibility |
22:32:03 | FromDiscord | <Phil> In reply to @a weird programmer "alright": For reference, I swapped from 1.6 to devel (current nim) in a ~10.000 lines of code project without any real issues |
22:32:17 | FromDiscord | <a weird programmer> In reply to @Isofruit "For reference, I swapped": sounds stable enough |
22:32:18 | FromDiscord | <Phil> webdev mind you, not native code |
22:32:23 | FromDiscord | <a weird programmer> oh |
22:32:40 | FromDiscord | <Phil> So basically that was all just an HTTP server backend |
22:33:03 | FromDiscord | <Phil> But still, fairly stable overall |
22:33:08 | FromDiscord | <a weird programmer> ya think making a restapi in nim and making bindings for it to python would be viable? |
22:33:43 | FromDiscord | <Phil> In reply to @a weird programmer "ya think making a": I mean, what for? Like what exact task would be written in nim and where would python benefit? |
22:33:58 | FromDiscord | <Phil> I rewrote the backend of my sideproject from Python to nim as a learning exercise |
22:34:16 | FromDiscord | <Phil> And found that there's just not that much that python offers to me anymore other than pre-existing libraries when necessary |
22:34:17 | FromDiscord | <demotomohiro> @MetuMortis https://nim-lang.org/docs/os.html#setCurrentDir%2Cstring |
22:34:18 | FromDiscord | <a weird programmer> something like fastapi |
22:34:20 | FromDiscord | <a weird programmer> but in nim |
22:34:34 | FromDiscord | <MetuMortis> In reply to @demotomohiro "<@314774529207566337> https://nim-lang.org/docs/os.": tried that but it didn't work :/ |
22:35:23 | FromDiscord | <auxym> well it only affects the nim process, not the parent process (user's shell) |
22:35:59 | FromDiscord | <Phil> In reply to @a weird programmer "something like fastapi": I guess you could?↵I mean, wouldn't be that hard, you could basically take prologue as it is right now and throw nimpy over it I think |
22:36:07 | FromDiscord | <demotomohiro> @MetuMortis Or `import ospro; discard execCmd("cd dirname")` |
22:36:08 | FromDiscord | <Phil> Can't think of anything that would block you |
22:36:44 | FromDiscord | <Phil> But at that point you could as well use fast-api since you're not benefitting from nim that much anymore.↵The benefits from nim over python are, that you compile a binary once and then you can throw it up wherever |
22:36:50 | FromDiscord | <demotomohiro> `import osproc` |
22:36:53 | FromDiscord | <Phil> With python you need to install a bunch of libraries everywhere |
22:37:14 | FromDiscord | <a weird programmer> yeah |
22:37:45 | FromDiscord | <a weird programmer> the thing is, do i really want to write an api in nim for production? |
22:37:50 | FromDiscord | <a weird programmer> how am i gonna find nim devs |
22:38:02 | FromDiscord | <MetuMortis> what is ospro |
22:38:06 | FromDiscord | <Phil> In terms of performance you're slowing down the second you have to cross over into python-land and its not like python is unbearably slow in webdev in general.↵I speed up from ~150-500ms to 20-100ms, but that was going full nim |
22:38:13 | FromDiscord | <auxym> In reply to @MetuMortis "what is ospro": std/osproc |
22:38:39 | FromDiscord | <a weird programmer> In reply to @Isofruit "In terms of performance": yeah probably fastapi + numba would be more viable |
22:38:54 | FromDiscord | <a weird programmer> but eh more servers are cheaper than more devs |
22:39:33 | FromDiscord | <Phil> Aye. I'd still use nim over python any day personally because I get highly annoyed by duck-typing nowadays |
22:39:33 | FromDiscord | <MetuMortis> In reply to @demotomohiro "<@314774529207566337> Or `import ospro;": It doesn't work either :/ I believe it runs the command but not on the user's terminal & shell in use |
22:39:57 | FromDiscord | <a weird programmer> In reply to @Isofruit "Aye. I'd still use": whats duck-typing |
22:41:06 | FromDiscord | <a weird programmer> In reply to @Isofruit "Aye. I'd still use": and i'm just learning nim as a replacement for C, or if my python code slows down i make a shared object in nim |
22:41:07 | FromDiscord | <auxym> In reply to @MetuMortis "It doesn't work either": that's what I said: well it only affects the nim process, not the parent process (user's shell) |
22:41:13 | FromDiscord | <Phil> In reply to @a weird programmer "whats duck-typing": Python doesn't really type anything. Functions take in just variables you named, you don't really tell the compiler "whatever comes in here must be of type x".↵That's because you assume whatever enters your function will have whatever behaviour you need for it |
22:41:25 | FromDiscord | <Phil> "If it quacks like a duck, use it like a duck" |
22:41:44 | FromDiscord | <a weird programmer> yeah types mean jack shit in python |
22:41:57 | FromDiscord | <a weird programmer> plus nobody follow them |
22:42:17 | FromDiscord | <Phil> They do mean something, I mean you can't just do `5 + "lala"` |
22:42:19 | FromDiscord | <a weird programmer> have you seen 1k lines of no type code its a nightmare to figure out what returns what |
22:42:26 | FromDiscord | <a weird programmer> In reply to @Isofruit "They do mean something,": as in type hinting |
22:42:27 | FromDiscord | <Phil> Unlike some other languages I could mention |
22:42:37 | FromDiscord | <Phil> In reply to @a weird programmer "have you seen 1k": I have seen so much worse |
22:42:42 | FromDiscord | <a weird programmer> In reply to @Isofruit "Unlike **some other languages**": cough javascript cough |
22:43:04 | FromDiscord | <Phil> I started out in science, "scientific programming" is infamous for a reason |
22:43:53 | FromDiscord | <a weird programmer> xD |
22:46:04 | FromDiscord | <a weird programmer> anyways what are nim programmers called? |
22:46:23 | FromDiscord | <a weird programmer> nimsters? nimistas? nimpers? nymphos? |
22:46:33 | FromDiscord | <a weird programmer> hamsters? |
22:46:40 | FromDiscord | <Phil> beef-disciples↵(Not necessarily, but keep that one in mind whenever elegantbeef comes around) |
22:47:39 | FromDiscord | <Phil> I've seen nimmer in use I guess |
22:48:04 | FromDiscord | <a weird programmer> nimmers sounds nice |
22:48:52 | FromDiscord | <a weird programmer> anyways nymphos im going to bed, thanks for all the help especially you @Phil ! |
22:51:03 | FromDiscord | <Horizon [She/Her]> In reply to @a weird programmer "whats duck-typing": "if it quacks like a duck, it must be a duck" |
22:51:11 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit ""If it quacks like": Oh you already said it xD |
22:51:49 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "Unlike **some other languages**": `("ba" + + "a" + "a").toLowerCase()` |
22:52:14 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "I've seen nimmer in": Nimian is what i use haha |
22:53:23 | * | jjido quit (Quit: Textual IRC Client: www.textualapp.com) |
22:54:24 | FromDiscord | <MetuMortis> banana! |
22:55:39 | FromDiscord | <Phil> In reply to @MetuMortis "banana!": nimnana |
23:04:50 | FromDiscord | <Elegantbeef> @Phil\: sorry it's "Nim Programmers" |
23:05:07 | FromDiscord | <Phil> Its too late beef |
23:05:08 | FromDiscord | <Phil> it is now |
23:05:10 | FromDiscord | <Phil> beefciples |
23:07:03 | FromDiscord | <Elegantbeef> well i'm going to jump in front of a bus now, so dont worship me too long |
23:07:40 | FromDiscord | <Phil> bus didn't compile, macro error |
23:07:48 | FromDiscord | <etra> hello, are var arrays 0 init? |
23:08:24 | FromDiscord | <Elegantbeef> All data types are o init'd |
23:08:27 | FromDiscord | <Elegantbeef> 0 even |
23:10:04 | * | FromDiscord quit (Remote host closed the connection) |
23:10:17 | * | FromDiscord joined #nim |
23:22:57 | FromDiscord | <ajusa> Is there an easy way to get the name of a proc from a typedesc? I'm currently using `name` from typetraits and splitting on the string, not sure if there's a better way |
23:23:22 | FromDiscord | <Elegantbeef> "name of a proc from a typedesc".... what? |
23:24:10 | FromDiscord | <Phil> In reply to @Elegantbeef ""name of a proc": I'm pretty sure he wants `"x"` from `proc x() = echo "lala"` |
23:24:27 | FromDiscord | <Phil> Which I don't think works because x in this scenario behaves like a variable symbol itself |
23:24:53 | FromDiscord | <Elegantbeef> ajusa we need more details |
23:28:06 | FromDiscord | <ajusa> Yes, I want the name of the proc - eg "x" as Phil described |
23:29:31 | FromDiscord | <Elegantbeef> i'm a bit confused, how do you have the procedure definition? |
23:29:56 | FromDiscord | <Elegantbeef> Is this a macro you apply on a procedure, a macro that you pass a procedure to... |
23:30:34 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=4igI |
23:30:40 | FromDiscord | <Elegantbeef> `astToStr` |
23:30:55 | FromDiscord | <ajusa> (I know I'm usually more coherent, sleep deprived right now) |
23:30:57 | FromDiscord | <Elegantbeef> Though that doesnt work with anonymous procedures |
23:31:15 | FromDiscord | <ajusa> perfect, thank you! |
23:33:46 | NimEventer | New thread by RodSteward: C++ delete wrapping, see https://forum.nim-lang.org/t/9715 |
23:46:33 | FromDiscord | <πτ (pi man)> are there any tryParse methods in the stdlib? |
23:54:04 | FromDiscord | <treeform> In reply to @Event Horizon "Created an issue for": Issue https://github.com/treeform/chrono/issues/7 fixed. |
23:56:32 | FromDiscord | <Elegantbeef> parseutils has something akin to tryparse↵(@πτ (pi man)) |
23:56:48 | FromDiscord | <Elegantbeef> But you can also just make your own using strutils' parse |
23:57:23 | FromDiscord | <πτ (pi man)> strutils parse throws on bad parse, that sounds not good for implementing tryParse |
23:57:49 | FromDiscord | <Horizon [She/Her]> In reply to @treeform "Issue https://github.com/treeform/chrono/issues/7 f": Good to know, thanks! |
23:58:08 | FromDiscord | <πτ (pi man)> I'll look at parseutils |