00:03:51 | * | Figworm joined #nim |
00:03:54 | FromDiscord | <impbox [ftsf]> `Warning: implicit conversion to 'cstring' from a non-const location: version; this will become a compile time error in the future [CStringConv]` hmm does this make sense for the js backend? |
00:05:23 | * | Gustavo6046_ joined #nim |
00:05:50 | * | Figworm quit (Client Quit) |
00:05:58 | * | Figworm joined #nim |
00:06:10 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
00:06:24 | * | Figworm quit (Client Quit) |
00:08:07 | * | Gustavo6046_ is now known as Gustavo6046 |
00:08:21 | * | Figworm joined #nim |
00:14:23 | * | Gustavo6046_ joined #nim |
00:14:41 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
00:17:03 | * | Gustavo6046_ is now known as Gustavo6046 |
00:21:58 | FromDiscord | <juan_carlos> I think it does, cstring can be nil (?). |
00:27:31 | FromDiscord | <impbox [ftsf]> it could if i was converting from a cstring |
00:27:34 | FromDiscord | <impbox [ftsf]> but to a cstring? |
00:27:45 | FromDiscord | <impbox [ftsf]> a string can't be nil |
00:40:47 | * | Gustavo6046_ joined #nim |
00:41:55 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
00:43:42 | * | Gustavo6046_ is now known as Gustavo6046 |
02:03:51 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
02:05:10 | * | Gustavo6046 joined #nim |
02:18:08 | madprops | can os module be used to show file owners? |
02:27:57 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
02:33:36 | * | Gustavo6046 joined #nim |
02:44:46 | FromDiscord | <impbox [ftsf]> I don't think so, i don't think there's a cross platform interface for that |
02:58:43 | * | arkurious quit (Quit: Leaving) |
03:14:39 | FromDiscord | <ajusa> Bit of a library specific question, but how does one go about storing many objects using @treeform's flatty? For example I have a dataset that is too large to fit into memory that I can access via some sort of stream (either off disk or the network). How do I write that to a file using flatty without chucking it all into a seq in memory? |
03:15:55 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
03:17:32 | * | Gustavo6046 joined #nim |
03:18:47 | FromDiscord | <Elegantbeef> Flatty doesnt support streams so you'll probably have to implement streaming yourself or checkout disruptek's frosty |
03:20:40 | FromDiscord | <treeform> In reply to @ajusa "Bit of a library": Writing database is really hard. You could flatty some parts of it and write things in chunks. |
03:21:09 | FromDiscord | <treeform> Personally I don't like streams or files that don't fit into memory |
03:21:25 | FromDiscord | <treeform> I recommend creating small files that do and loading them when you need to. |
03:21:51 | FromDiscord | <treeform> I deal with lots of analytics data and storing it in daily, hourly, minute files is the way to go. |
03:22:11 | FromDiscord | <treeform> Rather then one huge 2 terabyte file. |
03:29:53 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
03:38:05 | * | Gustavo6046 joined #nim |
03:43:32 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
03:58:43 | * | Gustavo6046 joined #nim |
03:58:52 | FromDiscord | <ajusa> Got it. I'm taking a bit of a closer look at frosty, but not sure how I can integrate something like supersnappy with it. I'll also look into maybe doing this in batches of 100 records like treeform suggested, that way it fits into memory. |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:13:20 | FromDiscord | <Elegantbeef> Well frosty lets you make your own hooks so you can handle it however you want |
04:21:31 | FromDiscord | <treeform> I don't know about frosty, but with 100 record batches you can just flatty that and then supersnappy the string it gives you. |
05:19:37 | * | al1ranger joined #nim |
05:21:23 | * | al1ranger quit (Client Quit) |
05:21:43 | * | al1ranger joined #nim |
05:22:36 | * | al1ranger quit (Client Quit) |
05:57:47 | FromDiscord | <impbox [ftsf]> hmm is a reason to use non-pure enums? seems like pure enums are better in all ways |
05:58:45 | FromDiscord | <Elegantbeef> Overridable enums deprecated them |
05:58:50 | FromDiscord | <Rika> pure is deprecatred isnt it |
05:58:51 | FromDiscord | <Rika> yeah |
05:59:14 | FromDiscord | <impbox [ftsf]> hmm, but pure vs unadorned enums |
05:59:26 | FromDiscord | <Rika> yes |
05:59:32 | FromDiscord | <Rika> thats what beef means |
05:59:33 | FromDiscord | <impbox [ftsf]> what's an overriable enum? |
05:59:44 | FromDiscord | <Elegantbeef> 1.6 adds in name smarter enums |
05:59:46 | FromDiscord | <Rika> basically having two enums called "red" wont fuck with the compiler anymore |
05:59:58 | FromDiscord | <impbox [ftsf]> oh right, i thought pure already did that |
06:00:00 | FromDiscord | <Rika> basically poor man's backwards inference |
06:00:22 | FromDiscord | <impbox [ftsf]> and by deprecated you mean will be deprecated in 1.6 when that's out? |
06:01:04 | FromDiscord | <Elegantbeef> I think, or just made pointless |
06:01:26 | FromDiscord | <impbox [ftsf]> mmm ok, it seems non-pure enums are pointless in 1.4 |
06:01:45 | FromDiscord | <Elegantbeef> Not pointless just annoying eitherway |
06:02:37 | FromDiscord | <Elegantbeef> You need a prefix for non pure and namespace for pure |
06:09:09 | FromDiscord | <impbox [ftsf]> ahh i see, namespace is required when it's from a different module |
06:10:49 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
06:12:35 | * | Gustavo6046 joined #nim |
06:22:33 | FromDiscord | <Elegantbeef> Is it? Dont recall that being needed, it's just forced for ambiguity iirc |
06:23:03 | FromDiscord | <Elegantbeef> Which means just by importing a module you can cause your project to require changes |
07:00:07 | * | GreaseMonkey quit (Remote host closed the connection) |
07:00:27 | FromDiscord | <rainbowasteroids> What's the difference between pure and nonpure enums? |
07:00:51 | FromDiscord | <Elegantbeef> Pure create a namespace if ambigious |
07:25:55 | * | max22- joined #nim |
07:27:11 | * | jjido joined #nim |
07:27:12 | * | jjido quit (Client Quit) |
07:54:13 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
08:05:34 | FromDiscord | <retkid> Enums are something i dont utlize enough |
08:05:37 | FromDiscord | <retkid> (edit) "utlize" => "utilize" |
08:05:49 | FromDiscord | <retkid> In Java i use them a lot tho |
08:06:11 | FromDiscord | <retkid> but I think I haven't found a specific need |
08:06:45 | FromDiscord | <retkid> though Enums are one of those things where you never need one but it might make your code quality better |
08:07:54 | FromDiscord | <Rika> you never need it but it is highly recommended |
08:08:05 | FromDiscord | <Rika> i might personally file an issue in your repo if you're not |
08:08:42 | FromDiscord | <retkid> I just cannot think of anything in this repo that might need it |
08:08:44 | FromDiscord | <retkid> but |
08:09:00 | FromDiscord | <retkid> i haven't tried Nims enums yet so maybe they have some cool things |
08:09:02 | FromDiscord | <retkid> (edit) "Nims" => "nims" |
08:09:25 | FromDiscord | <retkid> i use enums in switch statements to cleanup code for java |
08:09:35 | FromDiscord | <Elegantbeef> Well for the most part they're just named integers, but you can use them with sets or index arrays with them |
08:09:52 | FromDiscord | <Elegantbeef> Though you can also assign a string to them |
08:10:17 | FromDiscord | <retkid> well you can also have preset data for each |
08:10:34 | FromDiscord | <retkid> like each type of object in a game |
08:10:47 | FromDiscord | <retkid> (edit) "like each type of object in a game ... " added "for example" |
08:10:51 | FromDiscord | <Elegantbeef> That's a java enum construct |
08:11:00 | FromDiscord | <retkid> welp |
08:11:16 | FromDiscord | <retkid> Java is my only real reference for OOP[ |
08:11:17 | FromDiscord | <Elegantbeef> Nim enums are simply just named integer(optional string) |
08:11:17 | FromDiscord | <retkid> (edit) "OOP[" => "OOP" |
08:11:25 | FromDiscord | <Elegantbeef> But enums arent oop |
08:11:29 | FromDiscord | <Elegantbeef> They're a primitive data type |
08:11:30 | FromDiscord | <retkid> really? |
08:11:42 | FromDiscord | <Elegantbeef> Indeed |
08:11:51 | FromDiscord | <retkid> I might be confused about what an enum is |
08:12:07 | FromDiscord | <Elegantbeef> Well you're a java user so you think they're different than what they are |
08:12:20 | FromDiscord | <retkid> IM NOT A JAVA USER IM A JAVA HOSTAGE |
08:12:31 | FromDiscord | <Elegantbeef> Java's enums are an abstraction over inheritance + a singleton |
08:13:19 | FromDiscord | <retkid> why would you use an enum when you can just use let |
08:13:33 | FromDiscord | <Elegantbeef> Well you mean const |
08:14:01 | FromDiscord | <retkid> I didn't know about const and I will now be changing some code |
08:14:33 | FromDiscord | <Elegantbeef> Enums are type safe firstly, secondly allow packed bitsets, thirdly are nicer than using consts since they're declared together and can have a string associated with them |
08:14:34 | FromDiscord | <Rika> because it adds type safety? |
08:14:38 | FromDiscord | <Rika> wtf beef |
08:14:40 | FromDiscord | <Rika> i hate u |
08:14:54 | FromDiscord | <Elegantbeef> Same beef is an asshole |
08:15:13 | FromDiscord | <retkid> cant you do that wth a Tuple |
08:15:19 | FromDiscord | <Rika> what? |
08:15:26 | FromDiscord | <Rika> tuples and enums are completely different |
08:15:29 | FromDiscord | <Elegantbeef> I might just be tired, but the fuck 😀 |
08:15:49 | FromDiscord | <Rika> nah i also thought "the fuck" in my head rn |
08:16:17 | FromDiscord | <retkid> you have the variable name, a digit, and a string |
08:16:34 | FromDiscord | <retkid> tuple[0] is the digit and tuple[1] is the string |
08:16:37 | FromDiscord | <Elegantbeef> Sure but that accepts all digit/string |
08:16:38 | FromDiscord | <Rika> an enum usually maps to a choice |
08:16:43 | FromDiscord | <Elegantbeef> So you lost type safety |
08:17:00 | FromDiscord | <Rika> and the digit and string arent coupled |
08:17:16 | FromDiscord | <Elegantbeef> Is this afformentioned repo open? |
08:17:17 | FromDiscord | <Rika> so you can have a tuple with intval 1 and strval 2 |
08:17:38 | FromDiscord | <retkid> In reply to @Elegantbeef "Is this afformentioned repo": mine? |
08:17:46 | FromDiscord | <Elegantbeef> Yes |
08:17:49 | FromDiscord | <retkid> LOL NOPE |
08:18:16 | FromDiscord | <retkid> maybe never, but if it ever is, it'll be once I fix all of my code quality issues |
08:18:25 | FromDiscord | <retkid> I'm still learning so i go back and i change pasta |
08:18:32 | FromDiscord | <retkid> stuff like |
08:18:56 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/896673135447924746/unknown.png |
08:19:28 | FromDiscord | <Rika> whats wrong here |
08:19:34 | FromDiscord | <Rika> the name? yeah |
08:19:39 | FromDiscord | <Rika> the spelling of makeup? |
08:19:45 | FromDiscord | <Elegantbeef> Spelling, name, spacing of the `:` |
08:19:48 | FromDiscord | <Elegantbeef> Spelling of that entire type |
08:19:49 | FromDiscord | <Rika> and nutrient? |
08:20:04 | FromDiscord | <Rika> spacing is a style thing, i would not say it is wrong |
08:20:04 | FromDiscord | <retkid> also furious amounts of typo |
08:20:11 | FromDiscord | <retkid> think every function has a typo |
08:20:21 | FromDiscord | <retkid> (edit) "think every function has a typo ... " added "and class too" |
08:20:34 | FromDiscord | <retkid> I didn't comment enough |
08:20:43 | FromDiscord | <retkid> I couldn't figure out how to do |
08:21:00 | FromDiscord | <retkid> (edit) "do" => "do↵if (x instanceOf foo bar) in nim" |
08:21:14 | FromDiscord | <retkid> (edit) "I couldn't figure out how to do↵if (x instanceOf foo bar) in nim ... " added "when using the | in the proc" |
08:21:25 | FromDiscord | <retkid> and i didn't wanna ask here because anxiety |
08:21:45 | FromDiscord | <Rika> `when x is Type:` |
08:21:48 | FromDiscord | <Rika> i think |
08:22:06 | FromDiscord | <Rika> or you can just do `when x.typeof == Type:` if that doesnt |
08:22:18 | FromDiscord | <retkid> i tried that |
08:22:19 | FromDiscord | <Rika> you need to ask questions or you wont learn |
08:22:33 | FromDiscord | <retkid> it doesn't cast the type so if you use specific methods it will error |
08:22:55 | FromDiscord | <Rika> well nim is not oop oriented |
08:23:07 | FromDiscord | <Rika> using | in the types is not oop btw |
08:23:13 | FromDiscord | <Rika> it's generics |
08:23:27 | FromDiscord | <retkid> .-. Java has runed me |
08:23:33 | FromDiscord | <Elegantbeef> Here is one lovely example for you to run for enums https://play.nim-lang.org/#ix=3Blc |
08:23:45 | FromDiscord | <Rika> well first stop thinking in java |
08:23:49 | FromDiscord | <Elegantbeef> Nim is only oop if you do \`ref object of SomeType |
08:24:13 | FromDiscord | <impbox [ftsf]> nim is only oop if you orient your objects |
08:24:29 | FromDiscord | <Rika> lmao |
08:24:37 | FromDiscord | <impbox [ftsf]> i like to keep my objects disoriented |
08:24:46 | FromDiscord | <Elegantbeef> I've seen your code, i know you do |
08:24:53 | FromDiscord | <retkid> I sexually orient all my objects |
08:24:55 | FromDiscord | <retkid> 😤 |
08:24:56 | FromDiscord | <Rika> you sure like confusing your objects huh |
09:06:58 | FromDiscord | <NullCode> In reply to @retkid "I sexually orient all": funniest shit I've ever seen |
09:08:15 | nrds | <Prestige99> lmao |
10:05:54 | * | neurocyte0132889 joined #nim |
10:05:54 | * | neurocyte0132889 quit (Changing host) |
10:05:54 | * | neurocyte0132889 joined #nim |
10:16:15 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3BlG |
10:16:41 | FromDiscord | <retkid> when generateReturnedItem returns a specific type with only 1 return? |
10:23:53 | FromDiscord | <Rika> ? |
10:24:02 | FromDiscord | <Rika> Can’t understand without code |
10:26:19 | FromDiscord | <retkid> think it has something to do with the context and the generic |
10:26:26 | FromDiscord | <retkid> i switched around some types in some places |
10:26:33 | FromDiscord | <retkid> (edit) "i switched around some types in some places ... " added "and its fine but i still dont get the error" |
10:26:39 | FromDiscord | <retkid> (edit) "think it has something to do with the context and the generic ... " added "used in the function" |
10:29:30 | FromDiscord | <Rika> ?? |
10:41:13 | FromDiscord | <retkid> holy shit |
10:41:57 | FromDiscord | <retkid> i dont know how but i completely forgot how this typed work and i spent a long time trying to something i had already planed for and could do in a single line of code |
10:42:55 | FromDiscord | <retkid> i wrote that function for a whole other type input for a reason |
10:43:22 | FromDiscord | <retkid> dont code anxious, not even once |
11:00:50 | * | max22- quit (Ping timeout: 268 seconds) |
11:40:51 | FromDiscord | <Archion> Hi |
11:56:28 | FromDiscord | <Rika> Hello |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:30 | * | supakeen joined #nim |
12:08:46 | NimEventer | New thread by Exelotl: Trailing commas in "command" syntax?, see https://forum.nim-lang.org/t/8492 |
12:24:35 | * | max22- joined #nim |
12:34:47 | FromDiscord | <federico3> In case this could be useful to fund Nim development\: https://www.fdl-lef.org/ |
12:52:27 | * | max22- quit (Ping timeout: 268 seconds) |
13:07:10 | * | max22- joined #nim |
13:37:05 | * | arkurious joined #nim |
14:45:37 | * | joast joined #nim |
14:54:54 | * | neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat) |
15:31:32 | * | pch_ joined #nim |
15:34:04 | * | pch quit (Ping timeout: 245 seconds) |
15:50:54 | * | LyndsySimon quit (Ping timeout: 265 seconds) |
15:51:29 | * | LyndsySimon joined #nim |
17:36:57 | * | Gustavo6046 joined #nim |
17:46:22 | * | stkrdknmibalz joined #nim |
18:22:09 | * | max22- quit (Ping timeout: 250 seconds) |
18:43:45 | FromDiscord | <AlexDev> Can Nim be used in an IDE? |
18:44:58 | FromDiscord | <ynfle (ynfle)> Like VSCode? |
18:45:01 | FromDiscord | <ynfle (ynfle)> Ya |
18:45:05 | FromDiscord | <ynfle (ynfle)> There are a bunch of extensions |
18:45:15 | FromDiscord | <ynfle (ynfle)> also there is nimlsp |
18:45:58 | FromDiscord | <AlexDev> |
18:47:15 | FromDiscord | <ynfle (ynfle)> Is there a way to modify the lineinfo object of a NimNode? I recall there being a `lineinfo=` proc or something like that |
18:50:04 | FromDiscord | <AlexDev> ah i just found an article on how to integrate it with different IDEs, still thanks! |
18:58:46 | FromDiscord | <razzlom> https://nim-lang.org/faq.html↵(@AlexDev) |
18:59:11 | * | max22- joined #nim |
19:02:53 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
19:08:22 | * | Gustavo6046 joined #nim |
19:53:26 | * | stkrdknmibalz quit (Ping timeout: 245 seconds) |
20:03:01 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
20:03:16 | * | Gustavo6046 joined #nim |
20:22:43 | * | PMunch joined #nim |
20:34:06 | * | Gustavo6046_ joined #nim |
20:34:52 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
20:36:49 | * | Gustavo6046_ is now known as Gustavo6046 |
20:43:01 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
20:43:15 | * | Gustavo6046 joined #nim |
20:44:48 | * | greaser|q joined #nim |
20:45:50 | * | greaser|q quit (Changing host) |
20:45:50 | * | greaser|q joined #nim |
20:45:54 | * | greaser|q is now known as GreaseMonkey |
20:50:16 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
20:51:25 | * | Gustavo6046 joined #nim |
20:56:40 | Mister_Magister | https://github.com/Michal-Szczepaniak/nim_pigpio wrapper is coming together very nicely |
20:56:42 | Mister_Magister | and its working! |
20:56:43 | nrds | <R2D299> itHub: 7"<No Description>" |
20:56:56 | Mister_Magister | how do you add package to nimble? |
20:57:14 | Mister_Magister | https://github.com/nim-lang/nimble#creating-packages |
20:57:15 | Mister_Magister | gotcha |
20:57:16 | nrds | <R2D299> itHub: 7"Package manager for the Nim programming language." |
20:59:10 | FromDiscord | <Yardanico> @mister_magister just fyi, you don't need ";" at the end of proc definitions with importc |
21:33:42 | * | max22- quit (Quit: Leaving) |
21:40:24 | * | PMunch quit (Quit: leaving) |
21:42:05 | * | stkrdknmibalz joined #nim |
21:52:01 | * | Gustavo6046_ joined #nim |
21:52:11 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
21:55:00 | * | Gustavo6046_ is now known as Gustavo6046 |
22:29:31 | * | vicfred joined #nim |
23:03:22 | FromDiscord | <zidsal> quick question how come `proc add[T](x: var seq[T]; value: sink T) ` is annotated with noSideEffect? surely the fact it mutates the sequence is a side effect! |
23:03:35 | FromDiscord | <Elegantbeef> Nope |
23:03:45 | FromDiscord | <Elegantbeef> the sequence is passed as a mutable parameter |
23:04:00 | FromDiscord | <Elegantbeef> Modification of mutable parameters is not a side effect as it was explicitly mutable |
23:04:23 | FromDiscord | <zidsal> I guess that's a way of seeing it! fair enough |
23:07:10 | Mister_Magister | @Yardanico gotcha thanks |
23:09:24 | FromDiscord | <impbox [ftsf]> it's an effect rather than a side-effect I guess? |
23:09:30 | FromDiscord | <impbox [ftsf]> though yeah I would still be surprised |
23:10:09 | FromDiscord | <Elegantbeef> Well side effect is about mutating anything that is not passed in, or chance to mutate it |
23:10:18 | FromDiscord | <Elegantbeef> It's why you cannot even echo global `let/var`s |
23:13:41 | FromDiscord | <exelotl> I think it's a sensible definition of "no side effects" for procedural code |
23:14:12 | FromDiscord | <Elegantbeef> Well strict funcs does it better since you cannot mutate any parameter that's not `var` including references |
23:14:32 | FromDiscord | <exelotl> yeah |
23:14:48 | FromDiscord | <Elegantbeef> Makes it vastly more consistent |