<< 10-10-2021 >>

00:03:51*Figworm joined #nim
00:03:54FromDiscord<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:58FromDiscord<juan_carlos> I think it does, cstring can be nil (?).
00:27:31FromDiscord<impbox [ftsf]> it could if i was converting from a cstring
00:27:34FromDiscord<impbox [ftsf]> but to a cstring?
00:27:45FromDiscord<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:08madpropscan 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:46FromDiscord<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:39FromDiscord<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:47FromDiscord<Elegantbeef> Flatty doesnt support streams so you'll probably have to implement streaming yourself or checkout disruptek's frosty
03:20:40FromDiscord<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:09FromDiscord<treeform> Personally I don't like streams or files that don't fit into memory
03:21:25FromDiscord<treeform> I recommend creating small files that do and loading them when you need to.
03:21:51FromDiscord<treeform> I deal with lots of analytics data and storing it in daily, hourly, minute files is the way to go.
03:22:11FromDiscord<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:52FromDiscord<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:20FromDiscord<Elegantbeef> Well frosty lets you make your own hooks so you can handle it however you want
04:21:31FromDiscord<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:47FromDiscord<impbox [ftsf]> hmm is a reason to use non-pure enums? seems like pure enums are better in all ways
05:58:45FromDiscord<Elegantbeef> Overridable enums deprecated them
05:58:50FromDiscord<Rika> pure is deprecatred isnt it
05:58:51FromDiscord<Rika> yeah
05:59:14FromDiscord<impbox [ftsf]> hmm, but pure vs unadorned enums
05:59:26FromDiscord<Rika> yes
05:59:32FromDiscord<Rika> thats what beef means
05:59:33FromDiscord<impbox [ftsf]> what's an overriable enum?
05:59:44FromDiscord<Elegantbeef> 1.6 adds in name smarter enums
05:59:46FromDiscord<Rika> basically having two enums called "red" wont fuck with the compiler anymore
05:59:58FromDiscord<impbox [ftsf]> oh right, i thought pure already did that
06:00:00FromDiscord<Rika> basically poor man's backwards inference
06:00:22FromDiscord<impbox [ftsf]> and by deprecated you mean will be deprecated in 1.6 when that's out?
06:01:04FromDiscord<Elegantbeef> I think, or just made pointless
06:01:26FromDiscord<impbox [ftsf]> mmm ok, it seems non-pure enums are pointless in 1.4
06:01:45FromDiscord<Elegantbeef> Not pointless just annoying eitherway
06:02:37FromDiscord<Elegantbeef> You need a prefix for non pure and namespace for pure
06:09:09FromDiscord<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:33FromDiscord<Elegantbeef> Is it? Dont recall that being needed, it's just forced for ambiguity iirc
06:23:03FromDiscord<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:27FromDiscord<rainbowasteroids> What's the difference between pure and nonpure enums?
07:00:51FromDiscord<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:34FromDiscord<retkid> Enums are something i dont utlize enough
08:05:37FromDiscord<retkid> (edit) "utlize" => "utilize"
08:05:49FromDiscord<retkid> In Java i use them a lot tho
08:06:11FromDiscord<retkid> but I think I haven't found a specific need
08:06:45FromDiscord<retkid> though Enums are one of those things where you never need one but it might make your code quality better
08:07:54FromDiscord<Rika> you never need it but it is highly recommended
08:08:05FromDiscord<Rika> i might personally file an issue in your repo if you're not
08:08:42FromDiscord<retkid> I just cannot think of anything in this repo that might need it
08:08:44FromDiscord<retkid> but
08:09:00FromDiscord<retkid> i haven't tried Nims enums yet so maybe they have some cool things
08:09:02FromDiscord<retkid> (edit) "Nims" => "nims"
08:09:25FromDiscord<retkid> i use enums in switch statements to cleanup code for java
08:09:35FromDiscord<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:52FromDiscord<Elegantbeef> Though you can also assign a string to them
08:10:17FromDiscord<retkid> well you can also have preset data for each
08:10:34FromDiscord<retkid> like each type of object in a game
08:10:47FromDiscord<retkid> (edit) "like each type of object in a game ... " added "for example"
08:10:51FromDiscord<Elegantbeef> That's a java enum construct
08:11:00FromDiscord<retkid> welp
08:11:16FromDiscord<retkid> Java is my only real reference for OOP[
08:11:17FromDiscord<Elegantbeef> Nim enums are simply just named integer(optional string)
08:11:17FromDiscord<retkid> (edit) "OOP[" => "OOP"
08:11:25FromDiscord<Elegantbeef> But enums arent oop
08:11:29FromDiscord<Elegantbeef> They're a primitive data type
08:11:30FromDiscord<retkid> really?
08:11:42FromDiscord<Elegantbeef> Indeed
08:11:51FromDiscord<retkid> I might be confused about what an enum is
08:12:07FromDiscord<Elegantbeef> Well you're a java user so you think they're different than what they are
08:12:20FromDiscord<retkid> IM NOT A JAVA USER IM A JAVA HOSTAGE
08:12:31FromDiscord<Elegantbeef> Java's enums are an abstraction over inheritance + a singleton
08:13:19FromDiscord<retkid> why would you use an enum when you can just use let
08:13:33FromDiscord<Elegantbeef> Well you mean const
08:14:01FromDiscord<retkid> I didn't know about const and I will now be changing some code
08:14:33FromDiscord<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:34FromDiscord<Rika> because it adds type safety?
08:14:38FromDiscord<Rika> wtf beef
08:14:40FromDiscord<Rika> i hate u
08:14:54FromDiscord<Elegantbeef> Same beef is an asshole
08:15:13FromDiscord<retkid> cant you do that wth a Tuple
08:15:19FromDiscord<Rika> what?
08:15:26FromDiscord<Rika> tuples and enums are completely different
08:15:29FromDiscord<Elegantbeef> I might just be tired, but the fuck 😀
08:15:49FromDiscord<Rika> nah i also thought "the fuck" in my head rn
08:16:17FromDiscord<retkid> you have the variable name, a digit, and a string
08:16:34FromDiscord<retkid> tuple[0] is the digit and tuple[1] is the string
08:16:37FromDiscord<Elegantbeef> Sure but that accepts all digit/string
08:16:38FromDiscord<Rika> an enum usually maps to a choice
08:16:43FromDiscord<Elegantbeef> So you lost type safety
08:17:00FromDiscord<Rika> and the digit and string arent coupled
08:17:16FromDiscord<Elegantbeef> Is this afformentioned repo open?
08:17:17FromDiscord<Rika> so you can have a tuple with intval 1 and strval 2
08:17:38FromDiscord<retkid> In reply to @Elegantbeef "Is this afformentioned repo": mine?
08:17:46FromDiscord<Elegantbeef> Yes
08:17:49FromDiscord<retkid> LOL NOPE
08:18:16FromDiscord<retkid> maybe never, but if it ever is, it'll be once I fix all of my code quality issues
08:18:25FromDiscord<retkid> I'm still learning so i go back and i change pasta
08:18:32FromDiscord<retkid> stuff like
08:18:56FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/896673135447924746/unknown.png
08:19:28FromDiscord<Rika> whats wrong here
08:19:34FromDiscord<Rika> the name? yeah
08:19:39FromDiscord<Rika> the spelling of makeup?
08:19:45FromDiscord<Elegantbeef> Spelling, name, spacing of the `:`
08:19:48FromDiscord<Elegantbeef> Spelling of that entire type
08:19:49FromDiscord<Rika> and nutrient?
08:20:04FromDiscord<Rika> spacing is a style thing, i would not say it is wrong
08:20:04FromDiscord<retkid> also furious amounts of typo
08:20:11FromDiscord<retkid> think every function has a typo
08:20:21FromDiscord<retkid> (edit) "think every function has a typo ... " added "and class too"
08:20:34FromDiscord<retkid> I didn't comment enough
08:20:43FromDiscord<retkid> I couldn't figure out how to do
08:21:00FromDiscord<retkid> (edit) "do" => "do↵if (x instanceOf foo bar) in nim"
08:21:14FromDiscord<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:25FromDiscord<retkid> and i didn't wanna ask here because anxiety
08:21:45FromDiscord<Rika> `when x is Type:`
08:21:48FromDiscord<Rika> i think
08:22:06FromDiscord<Rika> or you can just do `when x.typeof == Type:` if that doesnt
08:22:18FromDiscord<retkid> i tried that
08:22:19FromDiscord<Rika> you need to ask questions or you wont learn
08:22:33FromDiscord<retkid> it doesn't cast the type so if you use specific methods it will error
08:22:55FromDiscord<Rika> well nim is not oop oriented
08:23:07FromDiscord<Rika> using | in the types is not oop btw
08:23:13FromDiscord<Rika> it's generics
08:23:27FromDiscord<retkid> .-. Java has runed me
08:23:33FromDiscord<Elegantbeef> Here is one lovely example for you to run for enums https://play.nim-lang.org/#ix=3Blc
08:23:45FromDiscord<Rika> well first stop thinking in java
08:23:49FromDiscord<Elegantbeef> Nim is only oop if you do \`ref object of SomeType
08:24:13FromDiscord<impbox [ftsf]> nim is only oop if you orient your objects
08:24:29FromDiscord<Rika> lmao
08:24:37FromDiscord<impbox [ftsf]> i like to keep my objects disoriented
08:24:46FromDiscord<Elegantbeef> I've seen your code, i know you do
08:24:53FromDiscord<retkid> I sexually orient all my objects
08:24:55FromDiscord<retkid> 😤
08:24:56FromDiscord<Rika> you sure like confusing your objects huh
09:06:58FromDiscord<NullCode> In reply to @retkid "I sexually orient all": funniest shit I've ever seen
09:08:15nrds<Prestige99> lmao
10:05:54*neurocyte0132889 joined #nim
10:05:54*neurocyte0132889 quit (Changing host)
10:05:54*neurocyte0132889 joined #nim
10:16:15FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3BlG
10:16:41FromDiscord<retkid> when generateReturnedItem returns a specific type with only 1 return?
10:23:53FromDiscord<Rika> ?
10:24:02FromDiscord<Rika> Can’t understand without code
10:26:19FromDiscord<retkid> think it has something to do with the context and the generic
10:26:26FromDiscord<retkid> i switched around some types in some places
10:26:33FromDiscord<retkid> (edit) "i switched around some types in some places ... " added "and its fine but i still dont get the error"
10:26:39FromDiscord<retkid> (edit) "think it has something to do with the context and the generic ... " added "used in the function"
10:29:30FromDiscord<Rika> ??
10:41:13FromDiscord<retkid> holy shit
10:41:57FromDiscord<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:55FromDiscord<retkid> i wrote that function for a whole other type input for a reason
10:43:22FromDiscord<retkid> dont code anxious, not even once
11:00:50*max22- quit (Ping timeout: 268 seconds)
11:40:51FromDiscord<Archion> Hi
11:56:28FromDiscord<Rika> Hello
12:06:02*supakeen quit (Quit: WeeChat 3.3)
12:06:30*supakeen joined #nim
12:08:46NimEventerNew thread by Exelotl: Trailing commas in "command" syntax?, see https://forum.nim-lang.org/t/8492
12:24:35*max22- joined #nim
12:34:47FromDiscord<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:45FromDiscord<AlexDev> Can Nim be used in an IDE?
18:44:58FromDiscord<ynfle (ynfle)> Like VSCode?
18:45:01FromDiscord<ynfle (ynfle)> Ya
18:45:05FromDiscord<ynfle (ynfle)> There are a bunch of extensions
18:45:15FromDiscord<ynfle (ynfle)> also there is nimlsp
18:45:58FromDiscord<AlexDev>
18:47:15FromDiscord<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:04FromDiscord<AlexDev> ah i just found an article on how to integrate it with different IDEs, still thanks!
18:58:46FromDiscord<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:40Mister_Magisterhttps://github.com/Michal-Szczepaniak/nim_pigpio wrapper is coming together very nicely
20:56:42Mister_Magisterand its working!
20:56:43nrds<R2D299> itHub: 7"<No Description>"
20:56:56Mister_Magisterhow do you add package to nimble?
20:57:14Mister_Magisterhttps://github.com/nim-lang/nimble#creating-packages
20:57:15Mister_Magistergotcha
20:57:16nrds<R2D299> itHub: 7"Package manager for the Nim programming language."
20:59:10FromDiscord<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:22FromDiscord<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:35FromDiscord<Elegantbeef> Nope
23:03:45FromDiscord<Elegantbeef> the sequence is passed as a mutable parameter
23:04:00FromDiscord<Elegantbeef> Modification of mutable parameters is not a side effect as it was explicitly mutable
23:04:23FromDiscord<zidsal> I guess that's a way of seeing it! fair enough
23:07:10Mister_Magister@Yardanico gotcha thanks
23:09:24FromDiscord<impbox [ftsf]> it's an effect rather than a side-effect I guess?
23:09:30FromDiscord<impbox [ftsf]> though yeah I would still be surprised
23:10:09FromDiscord<Elegantbeef> Well side effect is about mutating anything that is not passed in, or chance to mutate it
23:10:18FromDiscord<Elegantbeef> It's why you cannot even echo global `let/var`s
23:13:41FromDiscord<exelotl> I think it's a sensible definition of "no side effects" for procedural code
23:14:12FromDiscord<Elegantbeef> Well strict funcs does it better since you cannot mutate any parameter that's not `var` including references
23:14:32FromDiscord<exelotl> yeah
23:14:48FromDiscord<Elegantbeef> Makes it vastly more consistent