<< 07-11-2023 >>

00:14:24*xet7 joined #nim
00:14:59*bcksl joined #nim
00:41:17*bcksl quit (Quit: \)
00:45:01*bcksl joined #nim
00:45:49*bcksl quit (Remote host closed the connection)
00:46:31FromDiscord<girvo> Anyone doing UDP multicast in Nim? Seems the IPv4 versions of the membership structs and such are missing (as well as IP_ADD_MEMBERSHIP et al) in terms of the std/net and std/posix bindings?
00:49:32*bcksl joined #nim
01:17:40*xet7 quit (Remote host closed the connection)
01:36:31*adigitoleo quit (*.net *.split)
01:38:23*adigitoleo joined #nim
01:38:28*adigitoleo quit (*.net *.split)
01:38:37*adigitoleo joined #nim
01:38:41*adigitoleo quit (Max SendQ exceeded)
01:38:52*adigitoleo joined #nim
03:05:59*edr quit (Quit: Leaving)
04:06:39*derpydoo quit (Read error: Connection reset by peer)
05:03:27*rockcavera quit (Remote host closed the connection)
05:06:12*tinystoat quit (Server closed connection)
05:06:21*tinystoat joined #nim
05:40:34*jmdaemon joined #nim
06:07:12FromDiscord<odexine> In reply to @chronos.vitaqua "> If much less": How much memory do you have available?
06:10:46FromDiscord<nnsee> In reply to @chronos.vitaqua "I can't change the": as someone who contributes to owasp, trust me when I say that the recommendations there are embarrassingly low and need to be revisited
06:26:20FromDiscord<Chronos [She/Her]> Fair :p
06:26:37FromDiscord<Chronos [She/Her]> In reply to @odexine "How much memory do": 26 GB but this is for testing
07:05:35*PMunch joined #nim
07:18:23*redj quit (Remote host closed the connection)
07:19:45*redj joined #nim
08:27:53*redj quit (Quit: No Ping reply in 180 seconds.)
08:29:25*redj joined #nim
11:15:02*computerquip quit (Server closed connection)
11:15:18*computerquip joined #nim
12:41:21*edr joined #nim
12:46:16arkanoidby reading nim code of vscode extension from saem, I see that importc and importcpp con be used also when targeting js. What use is this? https://github.com/saem/vscode-nim/blob/main/src/platform/vscodeApi.nim
12:46:43*dtomato joined #nim
13:00:42FromDiscord<ringabout> It is just used for interfacing JS types and functions. Though, `{.importjs` should be preferred when interfacing with JS functions.
13:03:18arkanoidyeah I see it from https://github.com/juancarlospaco/nodejs/blob/main/src/nodejs/jscore.nim
13:35:24arkanoidI don't understand how js ffi works in this context. How this type def uses {.importc.} with no specific name, but the real name is different? https://github.com/saem/vscode-nim/blob/d77dc7cfad68cecbd4fcf2b8dfd85f1927065c8b/src/platform/vscodeApi.nim#L10 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/df8b6b7613a23ed5fa3aac8c9a8db35d9b87462e/types/vscode/index.d.ts#L2938
13:36:10arkanoidI mean "VscodeMarkdownStringObj {.importc.} = object of JsObject" VS "export class MarkdownString { ... }"
13:39:14FromDiscord<jmgomez> It doesnt seem to make a difference in types
13:39:59arkanoidbut the name is different
13:41:21arkanoidI understand that the required field does match, and interpretation could run correctly, but then why the {.importc.}
13:42:08FromDiscord<jmgomez> it does make a difference in `proc` it adds the `infix` flag to it
13:43:15FromDiscord<jmgomez> so yes, I guess it should be `importjs` everywhere as ringabout pointed out
13:59:47*gooba_ quit (Quit: Leaving)
14:00:02*gooba joined #nim
14:05:11*gooba quit (Remote host closed the connection)
14:05:33*gooba joined #nim
14:28:15*PMunch_ joined #nim
14:31:07*PMunch quit (Ping timeout: 264 seconds)
15:01:01FromDiscord<taperfade> Guys
15:01:04FromDiscord<taperfade> Lets just say
15:01:26FromDiscord<taperfade> How do i send commands through a socket
15:01:35FromDiscord<taperfade> Commands to cmd.exe
15:01:42FromDiscord<taperfade> And have me get the response
15:01:49FromDiscord<taperfade> :meoww:
15:06:22PMunch_How about doing something more productive than writing malware?
15:07:40FromDiscord<ieltan> lol
15:08:10FromDiscord<taperfade> In reply to @PMunch_ "How about doing something": Im not smart enough
15:08:12FromDiscord<taperfade> :(
15:09:35*PMunch_ quit (Quit: Leaving)
15:13:59FromDiscord<pmunch> I have a simple project if you want the exercise. Read the output of du -h from a file, then create small tool to navigate and find big folders/files
15:14:15FromDiscord<pmunch> Bonus point for an interface like baobab
15:14:33FromDiscord<pmunch> But it could also be TUI based
15:15:52arkanoidjmgomez, sorry but I didn't get it. What do you mean? how does importc adds that infix?
15:15:57arkanoidsorry, prefix
15:18:42FromDiscord<taperfade> In reply to @pmunch "I have a simple": du -h ?
15:39:47FromDiscord<jmgomez> In reply to @arkanoid "<@726017160115126333>, sorry but I": https://github.com/nim-lang/Nim/blob/devel/compiler/pragmas.nim#L910
15:50:09arkanoidjmgomez, I still don't get it. Do not worry, my fault.
15:52:36FromDiscord<pmunch> In reply to @taperfade "du -h ?": https://www.geeksforgeeks.org/du-command-linux-examples/
15:57:04FromDiscord<jmgomez> It adds that flag to the `proc` that uses it which quoting the doc in the compiler indicates: ↵> symbol needs infix call syntax in target language; for interfacing with C++, JS
16:06:29arkanoidI'm so far from understanding it, that I don't know why you are talking about procs and infix call syntax, when the question is about type importc implicit name that differs from the imported one
16:11:09FromDiscord<jmgomez> Im just highlighting the differences between `importc` and `importjs`. I should have use the reply rather than just commenting though, because I wasnt answering the question you asked above
16:12:39FromDiscord<jmgomez> That said, AFAIK the final js is untyped so the name doesnt matter
16:14:11FromDiscord<jmgomez> well a better wording would be it doesnt care about the types as it treats everything as a dictionary
16:14:31FromDiscord<jmgomez> I didnt play too much with js anyways, so I may be wrong
16:19:01Amun-Rapmunch: why '-h'?
17:21:14FromDiscord<pmunch> Eh, that's just always what I usually run 😛
17:23:56Amun-Rait makes parsing harder :P
18:02:58FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4KVO
18:03:40FromDiscord<leorize> no, only some operators are paired
18:04:31FromDiscord<ieltan> 😢
18:04:33FromDiscord<ieltan> sadge
18:11:04*systemdsucks quit (Server closed connection)
18:11:14*systemdsucks joined #nim
18:14:14*syl quit (Quit: C-x C-c)
18:19:17*syl joined #nim
18:22:49*oisota quit (Quit: Ping timeout (120 seconds))
18:23:08*oisota joined #nim
18:34:23*neceve joined #nim
19:40:03*via quit (Server closed connection)
19:40:10*via joined #nim
19:40:26FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4KW7
19:40:41FromDiscord<aintea> Or something that lets me destructure an object
19:41:30FromDiscord<odexine> no
19:45:41FromDiscord<aintea> So I can't
19:45:45FromDiscord<aintea> 😔
19:46:00FromDiscord<aintea> I tought that anything that could be tought, could be programmed in Nim
19:50:00FromDiscord<inventormatt> you could probably create a macro that does that
19:57:12FromDiscord<JJ> you'll have to put up with calling it something other than `let` but that is how ex. `fusion/matching` works, yeah
20:40:27FromDiscord<.aingel.> In reply to @pmunch "Bonus point for an": Whats baobab?
20:41:59FromDiscord<pmunch> In reply to @.aingel. "Whats baobab?": https://wiki.gnome.org/action/show/Apps/DiskUsageAnalyzer?action=show&redirect=Apps%2FBaobab
20:58:17FromDiscord<.aingel.> Ooh gotcha
20:58:56FromDiscord<bostonboston> In a importcpp statement is there a way to ignore a parameter, I know `'i` will give you the i'th type, but I'd there an equivalent for i'th value
20:59:21FromDiscord<pmunch> In reply to @aintea "So I can't": Maybe with a term rewriting macro
20:59:32FromDiscord<pmunch> But that's pretty hairy stuff
21:03:13FromDiscord<bostonboston> In reply to @bostonboston "In a importcpp statement": I suppose I can `/#/` in some cases
21:22:42FromDiscord<aintea> In reply to @pmunch "But that's pretty hairy": Yeah but I wanted to see how far I could go trying to make nim a functional language
21:22:49FromDiscord<aintea> For example for linked lists
21:30:54*LuxuryMode joined #nim
21:37:11*raynei joined #nim
21:40:47FromDiscord<pmunch> In reply to @aintea "Yeah but I wanted": I mean the features are there, but the syntax might be tricky
21:41:16FromDiscord<pmunch> Hmm, what happens if you have a converter to a tuple, does your unpack sample work then?
21:41:32FromDiscord<aintea> How could I get all the fields from the class
21:41:49FromDiscord<aintea> I need to get them manually ?
21:42:07FromDiscord<aintea> I need to hardcode them ? Or is there a function to get them
21:43:12*raynei quit (Ping timeout: 255 seconds)
21:44:36FromDiscord<pmunch> Damn it, a converter doesn't work..
21:44:54*lucasta joined #nim
21:45:08FromDiscord<pmunch> You can iterate over the fields of an object, at least in a macro
21:45:42FromDiscord<aintea> I really can iterate over the fields of an object in a macro ?
21:46:04FromDiscord<aintea> Could I have some examples ? I think your method might work
21:46:04Amun-Rayes
21:47:51Amun-Raaintea: that was one of my very first macros I did so it may not be the best/clear/etc. https://github.com/amnr/dynlibutils
21:48:20FromDiscord<aintea> Thanks, I'm gonna take a look at it tomorrow
21:48:44FromDiscord<aintea> Thank you guys, I think it might work with all information you provided me
21:49:21Amun-Rano worries, have fun with macros
21:50:10*neceve quit (Ping timeout: 258 seconds)
21:52:25Amun-Rawhat I must add if to support when foo: […] during iteration
21:52:36Amun-Rais*
21:53:28*raynei joined #nim
22:03:56FromDiscord<Elegantbeef> A very macro averse unpack solution https://play.nim-lang.org/#ix=4KWw
22:04:04FromDiscord<Elegantbeef> Thought I had this laying around but I did not
22:04:05FromDiscord<Elegantbeef> Yet another thing to add to my wiki 😄