<< 12-04-2020 >>

00:00:02*junland quit (Quit: %ZNC Disconnected%)
00:00:42*junland joined #nim
00:01:03FromDiscord<KingDarBoja> By cut off the larger container, you mean it was splitting the string?
00:02:24leorizeit means zip("123456", [1, 2, 3]) -> @[("1", 1), ("2", 2), ("3", 3)]
00:03:45FromDiscord<KingDarBoja> Oh okay, gotcha
00:04:03krux02so zip on two strings should not create strings, it should create characters
00:05:43FromDiscord<KingDarBoja> https://docs.python.org/3/library/functions.html#zip yeah it is at the Python example
00:06:49FromDiscord<KingDarBoja> But pretty clever fix if you ask me
00:06:58FromDiscord<KingDarBoja> Didn't expected the x != y comparison was the issue
00:07:16FromDiscord<KingDarBoja> Due to zip not creating characters
00:07:17leorizethat's not the only issue :)
00:07:31leorizealso it wasn't creating characters because you didn't use it correctly
00:07:59leorize!eval zip("abcd", "1234")
00:08:01NimBotCompile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'zip'
00:08:03leorize!eval echo zip("abcd", "1234")
00:08:05NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'zip'
00:08:13leorize!eval import sequtils; echo zip("abcd", "1234")
00:08:16NimBot@[('a', '1'), ('b', '2'), ('c', '3'), ('d', '4')]
00:08:27leorize^ characters
00:08:38leorizeanother issue is that you weren't using a raw string
00:08:56FromDiscord<__ibrahim__> hi, what is the equivalent of:
00:08:56FromDiscord<__ibrahim__> (void*)0
00:08:56FromDiscord<__ibrahim__> in nim?
00:08:59leorizeso `\t` and `\n` turns into literal tabs and newlines instead :)
00:09:05leorize__ibrahim__ nil
00:09:13FromDiscord<__ibrahim__> ok thanks
00:10:00FromDiscord<KingDarBoja> Where it was? I didn't saw it
00:10:02FromDiscord<KingDarBoja> πŸ™ˆ
00:11:22leorize[m]line 6 and 7 in your version
00:11:41leorize[m]you can see that in line 3 and 4, the python code was passing raw strings
00:12:09FromDiscord<KingDarBoja> The regex?
00:12:18leorize[m]yep
00:13:14FromDiscord<KingDarBoja> Oh, the "r"
00:14:06FromDiscord<KingDarBoja> I definetively feel a bit confused due to how Nim split string in several definitions while Python is pretty much string for all (ofc for users)
00:14:16FromDiscord<KingDarBoja> That happens with unicode handling too
00:14:50FromDiscord<KingDarBoja> But Variount explained that to me (the char as data type and character)
00:16:11FromDiscord<KingDarBoja> How old have you been coding on Nim? just curious
00:16:23*opal quit (Ping timeout: 240 seconds)
00:19:38*opal joined #nim
00:30:05FromDiscord<KingDarBoja> Umm, just tested a special case, when it has `\t` character on the string
00:30:06FromDiscord<KingDarBoja> https://repl.it/repls/SoggyFabulousPhysics
00:38:26Prestigeprocs implicitly return values? Looking at https://nim-lang.org/docs/tut1.html#advanced-types-open-arrays
00:38:50Prestigeseems openARraySize is returning oa.len, thought you'd have to assign it to result or explicitly return
00:41:51*dwdv quit (Ping timeout: 260 seconds)
00:43:36FromDiscord<Rika> Prestige: if every last statement matches the return type, that is returned
00:44:03PrestigeNeat, thanks
00:44:04FromDiscord<Rika> every, since there can be multiple last statements
00:44:22PrestigeI'll probably avoid doing that but it's good to know
00:44:51FromDiscord<KingDarBoja> I tend to use return instead of assigning to result unless it is a initMyType / newMyType proc πŸ™ˆ
00:45:07FromDiscord<KingDarBoja> And yes, I know return performs a call to result
00:45:27FromDiscord<Recruit_main707> It’s a matter of preferences
00:45:31FromDiscord<Rika> ^
00:45:45FromDiscord<Rika> i use last-statement and result more than return
00:45:46Prestigeyeah, I think using `return x` is much more readable
00:45:54Prestigebut all preference
00:45:59FromDiscord<Rika> i only use return when its control flow is needed
00:46:07Prestigewas just confused cuz I didn't know about the implicit return
00:46:09FromDiscord<Recruit_main707> I use return specially when it’s one line long
00:46:34FromDiscord<Rika> i especially avoid return when its one line long
00:46:35FromDiscord<Recruit_main707> Or on specially long procs that don’t need result
00:47:16FromDiscord<KingDarBoja> String literals can also be delimited by three double quotes """ ... """.
00:47:24*FromDiscord <KingDarBoja> Literals in this form may run for several lines, may contain " and do not interpret any escape sequences.
00:47:32FromDiscord<KingDarBoja> Oh yikes!
00:48:39FromDiscord<KingDarBoja> So I can't put `\t` inside a string literals surrounded by triple double quotes
00:52:20PrestigeI suppose you could just press tab on your keyboard? hm
00:52:27Prestigethat is a bit odd though
00:54:46FromDiscord<KingDarBoja> Just comparing some Python vs Nim code
00:55:02FromDiscord<KingDarBoja> And noticed that while passing the `\t` inside triple string quotes
00:55:04leorizeNim has r"string" too btw
00:55:43FromDiscord<KingDarBoja> Yeah but that one do not interpret escape sequences
00:55:56leorizewell choose one :P
00:56:03leorize!eval echo "\\t"
00:56:05NimBot\t
00:56:08leorizeor you can compromise a bit
00:56:45FromDiscord<KingDarBoja> Did you ran the Python example with that?
00:56:58leorize?
00:57:10FromDiscord<KingDarBoja> https://repl.it/repls/SoggyFabulousPhysics
00:57:13FromDiscord<KingDarBoja> This one
00:57:23FromDiscord<KingDarBoja> I changedt he string inside triple quotes
00:58:37leorizeI still don't know what you mean :P
00:58:59*Tyresc quit (Quit: WeeChat 2.7-dev)
00:59:37leorize[m]<FromDiscord "<KingDarBoja> How old have you b"> been writing Nim for 3 years I think
00:59:38FromDiscord<Rika> nim: r"\t" will look like `\t` and not the actual character; same with """\t"""
00:59:49leorizeecho """\t"""
00:59:52leorize!eval echo """\t"""
00:59:53FromDiscord<KingDarBoja> Yeah, what Rika said
00:59:55NimBot\t
01:00:03leorizeok sounds like a bug
01:00:04FromDiscord<Rika> @KingDarBoja wahts your aim then??
01:00:28FromDiscord<KingDarBoja> Not a bug, the docs stated that triple quote strings doesn't excape characters
01:00:51FromDiscord<KingDarBoja> Which is different to how Python handles that, just noticed after testing both dedent implementations
01:00:54FromDiscord<KingDarBoja> escape*
01:01:01leorizeah, yea
01:01:10FromDiscord<KingDarBoja> So Nim one will crash xD
01:01:24FromDiscord<Rika> crash?
01:01:25FromDiscord<Rika> why so?
01:02:23FromDiscord<KingDarBoja> Oops, wrong word
01:02:30FromDiscord<KingDarBoja> I mean, not escape it πŸ˜›
01:02:37leorize[m]about result or return: I use result all the time, unless I can't
01:02:46leorize[m]return is kinda like `go to`
01:02:50leorize[m]`goto`*
01:03:25FromDiscord<Rika> @KingDarBoja you can still input the actual character, you just cannot use escape sequences im pretty sure
01:04:14FromDiscord<KingDarBoja> Yeah, by pressing the tab
01:04:41FromDiscord<KingDarBoja> Like, whoever tries to use it, will have to check the docs πŸ˜„
01:04:59leorize[m]luckily no one ever does :P
01:05:54FromDiscord<KingDarBoja> Well, not very experienced on graphql projects besides the ones I made at my job but maybe someone does that xD
01:06:09FromDiscord<KingDarBoja> Ofc speaking about Python
01:07:17FromDiscord<Rika> well, whoever knows nim is bound to know that """ """ is raw
01:07:33leorizeI learned that just now lol
01:07:36FromDiscord<Rika> so they'd know \t isnt gonna be converted
01:07:45FromDiscord<Rika> leorize: ah well fuck
01:08:42*krux02 quit (Remote host closed the connection)
01:08:45FromDiscord<KingDarBoja> Plus ultra!
01:09:23FromDiscord<KingDarBoja> I just replace it by pressing the tab, xD
01:10:11FromDiscord<Rika> i dont use tabs anyway πŸ˜›
01:10:19FromDiscord<KingDarBoja> Tabs > spaces
01:10:37FromDiscord<Avatarfighter> imagine indenting ur code smh
01:11:25leorizetabs are evil
01:11:57FromDiscord<Avatarfighter> the strat is to set tabs to spaces of size 4 in your editor so you can say your using spaces even though your pressing tab lol
01:12:16leorizethey create the illusion of "you can size it however you want"
01:12:18FromDiscord<KingDarBoja> LOOL
01:12:25leorizethat never work out in practice
01:12:34leorize@Avatarfighter: the Nim standard is 2 spaces :P
01:12:47FromDiscord<KingDarBoja> Well, 1 tab = 2 spaces
01:13:02FromDiscord<KingDarBoja> You saving one extra button press
01:13:05FromDiscord<Avatarfighter> smh
01:13:26leorize[m]well I didn't save one extra button press
01:13:31FromDiscord<Avatarfighter> https://dsh.re/7bf3c guess im a rebel πŸ™‚
01:13:36leorize[m]I save my thumb :p
01:13:59FromDiscord<Rika> ah man here we go again w/ the tabs vs spaces argument
01:14:02*chemist69 quit (Ping timeout: 260 seconds)
01:14:06FromDiscord<Avatarfighter> naw im using spaces
01:14:13leorize[m]@Avatarfighter: don't worry it's kinda common too
01:14:14FromDiscord<Rika> i mean w/ boja and leo
01:14:22FromDiscord<Avatarfighter> ah lol
01:15:34FromDiscord<Avatarfighter> ugh why is it that whenever I need a specific algorithm its always explained in a written fashion but doesn't include pseudocode or examples of it
01:15:54*chemist69 joined #nim
01:16:45FromDiscord<Rika> its reading comprehension time
01:16:57FromDiscord<Avatarfighter> :GWaobloChildPepeSweat:
01:20:00FromDiscord<Avatarfighter> I needed the LEDBAT algorithm and it took me like an hour look for code that wasn't spaghetti haha
01:22:55FromDiscord<Avatarfighter> it also took a bit to find something that wasn't someones thesis
01:26:18leorize[m]sometimes you just gotta read the thesis :P
01:28:32FromDiscord<Avatarfighter> yeah sadly sometimes you must
01:30:49*Cthalupa quit (Ping timeout: 264 seconds)
01:32:34*lritter quit (Ping timeout: 265 seconds)
01:32:52*Cthalupa joined #nim
01:33:11*lritter joined #nim
01:35:19FromDiscord<KingDarBoja> Options > proc overload
01:35:45FromGitter<awr1> 2 spaces is good for nim
01:36:14FromGitter<awr1> Often DSLs/untyped macros will leave you with numerous indentation levels
01:36:48FromGitter<awr1> Cue Linux Style guide excerpt about how too many indentation levels == bad
01:39:02FromGitter<awr1> in general though while adopting a new style might be awkward you get used to it eventually. certainly i didn't like nim's pythonic indentation style the first time i tried it, but gradually grew to prefer it
01:39:43*Cthalupa quit (Ping timeout: 260 seconds)
01:41:52FromDiscord<Rika> @KingDarBoja well, i guess you can go have fun doing none type and some value and optionval.get() and stuff like that
01:42:08FromDiscord<Rika> also, not compiletime i dont think
01:42:21FromDiscord<KingDarBoja> I was being funny, not serious
01:42:23FromDiscord<KingDarBoja> πŸ˜„
01:42:35FromDiscord<Rika> ok
01:42:46FromDiscord<KingDarBoja> I still need to look the advantages for each one, so far using the Options one
01:43:47FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2hG6 leorize, I had to read the whitespaceOnly as this case wasn't stripping the leading whitespace
01:43:53FromDiscord<KingDarBoja> the regex I mean
01:44:00FromDiscord<Rika> i really only use options when "the value has a none type other than 0 or "" or whatever default"
01:44:01*xcm is now known as Guest15637
01:44:13FromDiscord<Rika> aka "if the field is empty and theres no default"
01:44:35*Guest15637 quit (Read error: Connection reset by peer)
01:44:54FromDiscord<KingDarBoja> Nvm, it doesn't
01:45:18FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2hG8 πŸ€”
01:45:34*Cthalupa joined #nim
01:45:49*xcm joined #nim
01:46:14FromDiscord<KingDarBoja> Rika: Well it seems my use case, mostly for `MyCustomType or seq[MyCustomType]` on proc parameter (with multiple params being like this)
01:52:24*Cthalupa quit (Ping timeout: 256 seconds)
01:54:55*Cthalupa joined #nim
01:55:37FromGitter<awr1> https://play.nim-lang.org/#ix=2hGd
01:55:41FromGitter<awr1> my take on it
01:56:21FromGitter<awr1> probably broken
01:56:30FromDiscord<KingDarBoja> We are using the base implementation of Python textwrap.dedent
01:57:04FromDiscord<KingDarBoja> In this case, Leo and I did the implementation on Nim by following almost the same algorithm
01:57:24FromDiscord<KingDarBoja> I said almost because Leo optimized the loop
01:57:39FromDiscord<KingDarBoja> Or well, fixed my broken implementation lol
01:57:53FromDiscord<KingDarBoja> But all cases passing except this one xD
01:58:52FromDiscord<KingDarBoja> Also awr1, you are asuming it start and ends with braces, which is not the only use case πŸ˜›
02:01:53leorizeok so why did you ping me?
02:02:36*Jjp137 quit (Read error: Connection reset by peer)
02:02:53*Jjp137 joined #nim
02:03:41FromGitter<awr1> ya i figured
02:03:57FromGitter<awr1> the python version is probably correct
02:04:39FromDiscord<KingDarBoja> I didn't ping you lol
02:05:04leorizeah mentioning someone name is pinging in irc land :P
02:05:08FromDiscord<KingDarBoja> Unless typing ur name means
02:05:11FromDiscord<KingDarBoja> Ok, then I did
02:05:17FromDiscord<KingDarBoja> You saw the example?
02:12:42leorizeyea, what about it?
02:14:59FromDiscord<KingDarBoja> Not sure why it didn't worked out
02:15:29FromDiscord<KingDarBoja> Did we miss something?
02:17:36leorize[m]what didn't work?
02:18:22leorize[m]if you're talking about this: https://play.nim-lang.org/#ix=2hG8, then it's working exactly as it should
02:19:42FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2hGj
02:20:08FromDiscord<KingDarBoja> Well, was basically the same example but I put the expected result on a comment in this case
02:20:43FromDiscord<KingDarBoja> Unless...
02:20:47FromDiscord<KingDarBoja> Wait a minute...
02:21:49leorize[m]https://play.nim-lang.org/#ix=2hGl
02:21:51leorize[m]I reframed it a bit
02:21:58leorize[m]now can you see why it's working as expected?
02:23:08FromDiscord<KingDarBoja> Yeah, just checking if Python did the same, so weird
02:23:52leorize[m]it's not weird when you think about it :P
02:24:11FromDiscord<KingDarBoja> Yeah yeah, got the thing
02:24:37FromDiscord<KingDarBoja> It's a matter of how it is written on the statement
02:24:51FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2hGn
02:26:37leorize[m]please don't tell me you're really using `dedent` just so you can have your string indented :P
02:26:42*muffindrake quit (Ping timeout: 265 seconds)
02:27:37FromDiscord<KingDarBoja> No no..
02:28:50*muffindrake joined #nim
02:29:24FromDiscord<Rika> does graphql even care about indent
02:29:33FromDiscord<Rika> it has braces for gods sake
02:30:30FromDiscord<KingDarBoja> It's more like a utility
02:30:42FromDiscord<KingDarBoja> Calm down πŸ˜„
02:33:17leorize[m]https://play.nim-lang.org/#ix=2hGq as far as Nim goes this is how we usually write our long string literals
02:33:36leorize[m]the first newline will be removed
02:34:06leorize[m]but not the last though, so if you don't want that one you gotta inline the closing `"""` with the last line
02:39:55shashlick@leorize - if nim ast cannot store comments, how does nimpretty work?
02:40:52FromDiscord<Rika> i assume with the raw text
02:41:35FromDiscord<Rika> or maybe it parses the ast but modifies as raw text, then does the comments after that
02:42:11shashlicksounds too messy
02:42:28shashlickanyway, i'd really like comments support
02:47:18FromDiscord<Chiqqum_Ngbata> Is there no way to get -o compile flag value at compile time (linux)
02:47:58leorizeshashlick: yep, raw text + ast :p
02:48:13shashlickeww
02:48:14leorizeChiqqum_Ngbata: see std/compilesettings
02:49:03shashlickso i'd have thought that at least for nimpretty, you'd end up with comments support in the ast
02:49:19leorizenah, the AST isn't a miracle
02:49:31shashlickcause then all you'd do is read nim to ast and then render it back out and you have standard looking nim
02:49:41shashlickbut life's never that easy
02:49:47FromDiscord<Rika> not exactly no?
02:49:47leorizeit has most of the syntax elements there, but it has none that nimpretty actually care about
02:50:11leorizealso the renderer don't give out idiomatic nim code :p
02:50:15FromDiscord<Chiqqum_Ngbata> Perfect, thanks
02:50:24leorizemost of the time the code looks fine
02:50:41leorizebut when you go for a full file it looks kinda weird
02:50:52leorizealso nimpretty care about stuff that the AST can't capture
02:51:03leorizenot really "can't" but more of "doesn't make sense to"
02:51:12leorizelike how much indent is being used for one space
02:51:29leorizehow much spaces is being used as an indent is what I meant :P
02:55:12FromDiscord<Skaruts> am I the only one who finds two spaces unreadable?
02:55:24FromDiscord<Skaruts> just curious πŸ™‚
02:56:19FromDiscord<Skaruts> (not quite unreadable, just a bit confusing)
02:58:53FromDiscord<Elegant Beef> I do
02:59:27FromDiscord<Elegant Beef> I much prefer indents equal to 8 characters, cause im weird and prefer clear indentation
03:00:51FromDiscord<Skaruts> πŸ˜„
03:01:13FromDiscord<Skaruts> that's a bit too much for me
03:01:18FromDiscord<Skaruts> but I understand
03:01:23FromDiscord<Elegant Beef> Which is why im very pro-tabs, cause why not
03:04:05FromDiscord<Skaruts> yea me too...
03:05:10FromDiscord<Skaruts> I have a bit of a problem here: I have a template that takes a block of code, but I'd like to give it a few named parameters, BUT that creates the problem that they must go after the code-block parameter, but that doesn't compile when I call the template with the named one before the block
03:05:16FromDiscord<Skaruts> Is there some way to turn the code-block parameter into a named parameter?
03:06:59FromDiscord<Skaruts> this is my template sig: `template button*(x, y:int, text:string, code:untyped):untyped =`
03:08:44FromDiscord<Skaruts> the goal was to give it optional parameters for styling and other button properties, with default values
03:09:24*oculux quit (Quit: blah)
03:09:55*oculux joined #nim
03:10:48FromDiscord<Skaruts> I could go with overloads, but I think that would force me to have an additional overload for each additional optional parameter...
03:12:51FromDiscord<KingDarBoja> https://nim-lang.org/docs/marshal.html just found this right now
03:14:51FromDiscord<KingDarBoja> But eww at the output on some type
03:15:52FromDiscord<KingDarBoja> Seems like it was a mistake trying to use initTable as default value
03:24:12*waleee-cl quit (Quit: Connection closed for inactivity)
03:27:12*xcm quit (Remote host closed the connection)
03:28:24shashlick@leorize but isn't the whole point of Nim pretty to give a consistent output independent of existing formatting and indent
03:29:17shashlickAnd if the renderer isn't pretty enough, it could be updated
03:29:25*xcm joined #nim
03:33:56FromDiscord<Skaruts> nevermind my problem, I actually managed to use overloads in a much simpler way that I was thinking
03:35:23FromDiscord<KingDarBoja> Show us? πŸ˜„
03:36:00FromDiscord<KingDarBoja> I am curious because been using Options module for that case but starting to feel the struggle of using some, none and get() as Rika said
03:36:58*xcm quit (Read error: Connection reset by peer)
03:38:06leorizeshashlick: no, actually nimpretty respects its user
03:39:02*xcm joined #nim
03:44:49*dddddd quit (Ping timeout: 265 seconds)
03:50:08shashlickis there any way to control the order in which dynlibs are loaded
03:50:31shashlickactually, i don't think that will help
03:51:15shashlickloading libbass and libbass_fx as dynlib doesn't work since libbass_fx looks for libbass and cannot find its procs even though it is loaded
03:51:46shashlickworks on windows, not on linux
03:55:29*Zectbumo quit (Remote host closed the connection)
03:58:42FromDiscord<Avatarfighter> Does anyone know if nim already has a UDP hole punching library? I'm making one right now because I couldn't find one but just incase someone knows one
03:59:32FromDiscord<Avatarfighter> and as I say that I find treeform's NetPipe library
04:01:56FromDiscord<KingDarBoja> Anyone knows how to provide a default value to some Table[string, string] as proc parameter?
04:05:11*silvernode joined #nim
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:44*supakeen joined #nim
04:26:02*noonien quit (Quit: Connection closed for inactivity)
04:37:56*Guest85 joined #nim
04:41:42FromGitter<awr1> @shashlick strange. i thought the dynamic loader on linux also skips if a dynlib is already loaded into memory
04:50:51*Hexeratops quit (Read error: Connection reset by peer)
04:52:24shashlickya but i think the way Nim loads dynlibs with the {.importc, dynlib: "xyz".} is not the same as -lxyz
04:52:31shashlickwhen I changed it, it worked fine
05:00:42*silvernode quit (Ping timeout: 256 seconds)
05:16:58*Zectbumo joined #nim
05:24:50*lritter quit (Ping timeout: 256 seconds)
05:25:24shashlickfinished porting nimbass to ast2 - https://github.com/genotrance/nimbass/tree/nimterop
05:28:40*narimiran joined #nim
05:29:46shashlick@jyapayne - added nim-sdl2 to https://github.com/nimterop/nimterop/wiki/Wrappers
05:36:00*Guest85 quit (Quit: My Mac Pro has gone to sleep. ZZZzzz…)
05:39:12*nsf joined #nim
05:44:41*hax-scramper quit (Ping timeout: 258 seconds)
05:57:48*Jjp137 quit (Read error: Connection reset by peer)
05:58:23*Jjp137 joined #nim
06:01:20*Jjp137 quit (Read error: Connection reset by peer)
06:04:02*Jjp137 joined #nim
06:12:31*hax-scramper joined #nim
06:31:30lbartHi, I have a problem with the forum. I can't activate my mail (so I can't post) since I never received the link to activate it. I deleted and recreated it several times, but each times. I have "an error has occured", long minutes after a mail with the link, and when I go the link to activate my account. I have a "Invalid ident hash"
06:31:45lbartAny idea? Solution?
06:31:46lbartThanks
06:36:30*solitudesf joined #nim
06:49:11leorize[m]lbart: ping dom96
06:53:34*xcm quit (Remote host closed the connection)
06:56:22*xcm joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:05:04*gmpreussner joined #nim
07:17:20*hax-scramper quit (Read error: Connection reset by peer)
07:17:40*hax-scramper joined #nim
07:26:14*zedeus quit (Quit: zedeus)
07:30:03*hax-scramper quit (Ping timeout: 265 seconds)
07:30:50*hax-scramper joined #nim
07:32:26*zedeus joined #nim
07:33:24*hax-scramper quit (Read error: Connection reset by peer)
07:33:41*hax-scramper joined #nim
07:34:15FromGitter<sheerluck> github told me "dom96 starred Pebaz/nimporter 9 hours ago"
07:34:20FromGitter<sheerluck> so I immediately became interested
07:34:25FromGitter<sheerluck> added {.exportpy.} to my mkv.nim
07:34:31FromGitter<sheerluck> and when I said "import nimporter, mkv" inside of ipython, I've got a result
07:34:36FromGitter<sheerluck> It feels like magic
07:34:42FromGitter<sheerluck> https://media.giphy.com/media/VHngktboAlxHW/giphy.mp4
08:03:46*tane_ joined #nim
08:04:36*hax-scramper quit (Ping timeout: 258 seconds)
08:05:32*hax-scramper joined #nim
08:07:29*s4mu3lbk joined #nim
08:10:50*Zectbumo quit (Remote host closed the connection)
08:35:12*liblq-dev joined #nim
08:36:17*nsf quit (Quit: WeeChat 2.8)
08:39:59*zedeus quit (Quit: zedeus)
08:44:07*zedeus joined #nim
08:51:08*krux02 joined #nim
09:18:05*dddddd joined #nim
09:21:06dadadasheerluck: agree
09:25:24dadadamy only mild criticism would be, why do you need {.exportpy.}, couldn't it simply import everything by default?
09:28:51Yardanicodadada: well it needs that pragma to be able to know which stuff to import
09:28:55dadadaI'd love to see some performance tests of nimporter put against cython or the like
09:28:57YardanicoI think it would be harder without the pragma
09:30:59dadadaYardanico: in all the examples they're importing everything, might as well just create a macro that parses the whole file and adds the {.exportpy.} macro to all funcs/procs, and then the usual processing could start
09:31:11Yardanicodadada: well that's examples
09:31:15Yardanicoin real life you wouldn't always do that :)
09:31:24Yardanicoand exportpy comes from nimpy
09:31:36Yardanicohttps://github.com/yglukhov/nimpy
09:32:15dadadaah, didn't know that came from nimpy, still, this could be made more comfortable, I think the usual case for this is that you'll be wanting to use a nim module in python, the same way you'd use this nim module in nim
09:32:35Yardanicowell nimpy isn't only calling nim from python, it's also for calling python from nim
09:32:40dadadaand when using a nim module in nim, obviously no special macros are needed
09:33:29Yardanicowell I understand what you mean but I think it would be harder to do
09:33:47Yardanicosince you'll have to circumvent the compiler and manually include the needed nim files via macros
09:33:59Yardanicowell, or just put a pragma call on the top of the file
09:34:38dadadait would only be marginally harder, as I said, you simply write a macro that reads the whole module as a block of code, then puts the {.exportpy.} in the right places, saves this to a tmp-location, and then the same algorithm as used now gets used on this tmp-location, done
09:34:52Yardanicowell that seems hacky for me :P
09:35:10YardanicoI don't think it's worth the effort honestly
09:35:49dadadaYardanico: the point is that you shouldn't have to put a pragma/macro in the file at all, I suppose people have working nim modules, when the goal is to make them seamlessly available in python, the ideal is not to have to touch the file at all
09:36:19dadadaYardanico: and I think the effort isn't even that high to do it
09:37:20PrestigeI'm going to have to re-read much of the docs, there's a lot to take in
09:37:38dadadain an ideal world you do not have to maintain two versions of the same module, one for using it with python, one for using it in a nim project as usual, you'll ideally just want to have one file and one source history
09:40:35*dwdv joined #nim
09:50:49*endragor joined #nim
09:58:53dom96lbart, give me your nickname and I'll activate for you
10:00:29*gangstacat quit (Quit: Ĝis!)
10:06:30FromGitter<zacharycarter> What does drnim do? I got it compiling and ran it against a source file but it didn't produce any binary or anything
10:06:39Yardanicoit allows you to add special pragmas
10:06:59FromGitter<zacharycarter> ah
10:07:08Yardanicosee doc/drnim
10:07:18FromGitter<zacharycarter> thanks
10:09:36dadadahttps://www.phoronix.com/scan.php?page=news_item&px=Wasmtime-Go-WebAssembly
10:10:00dadadacan't wait for Nim bindings for this
10:10:24dadada"Wasmtime has already provided bindings for Rust, C, Python, and Microsoft .NET while Go is the latest on the list."
10:11:23FromDiscord<Recruit_main707> I want flatbuffers for Nim
10:11:33FromDiscord<Recruit_main707> That would be great
10:15:52dadadaRecruit_main707: I support you in that wish
10:18:17dadadaRecruit_main707: stuff like this would have been perfect for a GoogleSummerOfCode
10:20:35FromDiscord<Recruit_main707> I will open an issue on the GitHub repo and try
10:23:51dadadaRecruit_main707: awesome
10:24:13FromGitter<gogolxdong> Is there any Fourier transform library?
10:26:29Zevvyes
10:26:48Zevv!package fftw3
10:31:43*noonien joined #nim
10:31:54FromGitter<sealmove> Hi everyone
10:41:39FromGitter<faulander> hi guys
10:42:16planetis[m]hi
10:51:59*Vladar joined #nim
11:00:28FromGitter<Vindaar> @gogolxdong there are also bindings to kiss fft
11:04:50*narimiran quit (Ping timeout: 256 seconds)
11:23:18planetis[m]are there any plans for the enumerate macro to replace pairs iterators or was abandoned?
11:25:13planetis[m]there is an rfc: https://github.com/nim-lang/RFCs/issues/74
11:25:17planetis[m]great
11:31:26*jjido joined #nim
11:48:41FromDiscord<sealegs> Hey guys is there a way to convert string to int64? I've tried using parseInt but I get a value error saying that it's out of range.
11:49:33FromDiscord<Generic> try parseBiggestInt
11:49:45FromDiscord<Generic> and cast that one to int64
11:53:14krux02biggest int is int64
11:53:29FromDiscord<sealegs> it says "Error: type mismatch: got <int64> but expected 'int"
11:53:56FromDiscord<sealegs> code:
11:53:56FromDiscord<sealegs> ```nim
11:53:57FromDiscord<sealegs> proc getShardID*(gid: string): int =
11:53:57FromDiscord<sealegs> result = (parseBiggestInt(gid) shl 22) mod 1
11:53:57FromDiscord<sealegs> ```
11:54:11FromGitter<sealmove> the box that appears when you search in nim docs looks shitty in dark mode
11:54:12krux02yes the type is not automatically converted, but what I mean it is actually a 64 bit integer.
11:54:26FromDiscord<Recruit_main707> `(gid: string): int64` the return type must be int64
11:54:27krux02there is currently no supported platform where the biggest int is more than that.
11:54:37FromGitter<sealmove> guys parseBiggestInt returns an int
11:55:51FromGitter<sealmove> actually there is `parseutils.parseBiggestInt` and `strutils.parseBiggestInt`
11:56:26FromGitter<sealmove> sealegs you need `strutils`'s one
11:56:39FromDiscord<Recruit_main707> that doesnt seem the issue, its just that result expects an int
11:56:43FromDiscord<Recruit_main707> not in64
11:56:54FromDiscord<sealegs> I already imported strutil's one
11:57:30krux02sealmove: parseutlis.parseBiggestInt returns an int that is not the parsed int
11:58:21krux02sealegs: you should convert the result of parseBiggestInt into an actual int
11:58:49krux02result = int((parseBiggestInt(gid) shl 22) mod 1)
11:59:23krux02int(expr) is a range checked conversion to int
11:59:51krux02cast[int](expr) is a non range checked bit copy
12:00:23*krux02 quit (Read error: Connection reset by peer)
12:00:44FromGitter<sealmove> ah right
12:03:00*superbia joined #nim
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:47*supakeen joined #nim
12:08:12FromGitter<sealmove> guys, what's an easy workaround for recursive module dependency when you can't move types from file to other file?
12:08:30FromGitter<sealmove> `include`?
12:08:31*superbia left #nim ("WeeChat 2.4")
12:11:16FromGitter<sealmove> or is there an experimental feature that takes care of it?
12:13:18FromGitter<sealmove> a hack is fine by me for now
12:13:46*dadada quit (Ping timeout: 265 seconds)
12:15:18FromGitter<zacharycarter> I haven't used this in anything beyond a very simple test - but I was able to get hot reloading working with `--gc:arc` and `cr.h`
12:15:25*dadada joined #nim
12:15:43*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:15:48*dadada is now known as Guest28737
12:15:57FromGitter<zacharycarter> will play around with it more later today - I was hoping shaslick's plugin project would work with `--gc:arc` but the tests fail presently
12:19:12*s4mu3lbk quit (Quit: WeeChat 2.3)
12:26:44*narimiran joined #nim
12:26:50planetis[m]sealmove: https://forum.nim-lang.org/t/4745
12:32:13*hax-scramper quit (Read error: Connection reset by peer)
12:33:03*gangstacat joined #nim
12:33:05*hax-scramper joined #nim
12:36:59FromGitter<sealmove> oh actually maybe I can solve it with export
12:37:32FromGitter<sealmove> https://nim-lang.org/docs/manual.html#modules-export-statement
12:40:53shashlick@zacharycarter will be awesome to get plugins working with arc
12:41:07shashlickThat's the eventual goal
12:41:18FromGitter<zacharycarter> I agree - I'm just not sure how to do so at the moment
12:41:50shashlickI need to port nimterop as well to work with arc
12:42:01shashlickToo much to do, only so much time
12:47:18shashlickFor plugins, need to compile the plugins also with arc, not just the main binary
12:48:36FromGitter<zacharycarter> how should the plugins be named>?
12:48:38FromGitter<zacharycarter> ?
12:48:47FromGitter<zacharycarter> running the tests is a bit poorly documented I think
12:50:43FromGitter<zacharycarter> does the test command also compile the plugins?
12:51:02FromGitter<zacharycarter> I tried building a dylib from them myself but every time I run test they get deleleted
12:53:07FromGitter<zacharycarter> oh I see the plugins module compiles it for you - okay let me try that
12:54:08*ikan_keli joined #nim
13:00:17FromGitter<zacharycarter> yeah - crashes still when plugins are compiled with `--gc:arc`
13:08:29*Guest85 joined #nim
13:25:41*Guest85 quit (Quit: My Mac Pro has gone to sleep. ZZZzzz…)
13:28:42*jjido joined #nim
13:47:03FromDiscord<jb> hi guys
13:47:28FromDiscord<jb> I'm compiling the following to the JS target:
13:47:29FromDiscord<jb> import jsconsole
13:47:29FromDiscord<jb> type MyEnum {.pure.}= enum
13:47:29FromDiscord<jb> One = "A".cstring, Two = "B".cstring
13:47:29FromDiscord<jb> console.log(MyEnum.One) # output: 0, expected: "A"
13:47:30FromDiscord<jb> Is this a bug?
13:48:30Yardanicois it the same if you try console.log($MyEnum.One) ?
13:48:46Yardanicoalso please don't make code pastes in discord, it's a bit ugly for people in IRC here :P
13:49:42FromDiscord<jb> Ah that did the trick, awesome. Sorry didn't know about the line splitting bot
13:50:24Yardanicowell I think the reason why the behaviour is different is because "echo" in Nim calls $ for all arguments, and console.log doesn't do that, so it outputs the numerical value of the enum element
13:53:31FromDiscord<jb> That must be it, thanks a lot
13:53:57Yardanicoyou can just use "echo" though I think
13:54:05Yardanicono need for console.log, "echo" will work for JS target too
13:54:48Yardaniconim "echo" in JS target uses console.log anyway
13:56:24FromDiscord<jb> cool, didn't know that
14:00:53*krux02 joined #nim
14:02:26*Guest85 joined #nim
14:07:55*tane_ is now known as tane
14:15:54FromDiscord<kodkuce> hmm is something wrong with 1.2 and async, just tryed to run exmaplel form https://nim-lang.org/docs/asynchttpserver.html
14:15:59Yardanicoyes
14:16:02FromDiscord<kodkuce> basic usage simplest example
14:16:04Yardanicoit's already fixed in devel and will be in 1.2.2
14:16:23FromDiscord<kodkuce> so i can do chosenim head
14:16:28FromDiscord<kodkuce> and it will wokr
14:16:31Yardanicohttps://github.com/nim-lang/Nim/issues/13866
14:16:45FromDiscord<kodkuce> devel
14:16:49Yardanicoyep
14:17:23Yardanicoit's quite sad that it got into 1.2.0 but now we have proper tests for asynchttpserver :)
14:17:24FromDiscord<kodkuce> hmm oh i frogot this mereged to irc
14:17:33FromDiscord<kodkuce> wanted to say ty
14:17:45lbartdom96: Thanks, my username is lbartoletti
14:17:48FromDiscord<kodkuce> duno what does thunb up icon do ower irc or whawer
14:18:08*Guest85 quit (Quit: My Mac Pro has gone to sleep. ZZZzzz…)
14:18:30dom96lbart, getting a 404 for that, did you delete the account?
14:18:48lbartdom96: Yes, and I try to recreate it
14:19:00lbartI receive a mail to activate it
14:19:07lbartbut I got an "invalid ident hash"
14:19:14dom96right, well I cannot bring that one back
14:19:17dom96at least not easily
14:19:27dom96do you have another account you didn't delete?
14:19:52lbartI can create a new one
14:20:56lbartdom96: "lbart" is created and activated
14:21:14lbart(with the same adress as my former nickname)
14:21:27lbartand the mail was instantanely
14:21:36dom96good, I gave you "user" permissions
14:24:17lbartdom96: thanks
14:25:37*ikan_keli quit (Ping timeout: 260 seconds)
14:26:33*liblq-dev quit (Ping timeout: 250 seconds)
14:28:26*liblq-dev joined #nim
14:32:09*Guest28737 is now known as dadada
14:41:11*aEverr quit (Ping timeout: 265 seconds)
14:41:11*PMunch joined #nim
14:41:56*aEverr joined #nim
14:43:55FromDiscord<Recruit_main707> can macros affect emitted code??
14:44:06Yardanicowhat do you mean exactly?
14:44:16Yardanicowell macros can insert "emit" calls to emit raw C and stuff
14:44:20FromDiscord<Recruit_main707> its hard to explaint, wait a min
14:45:26FromDiscord<__ibrahim__> is there a way to automatically generate procs from a C or C++ lib?
14:45:38Yardaniconimterop works for most C libraries
14:45:48Yardanicobut it still requires some manual work
14:46:01FromDiscord<__ibrahim__> nice
14:46:07FromDiscord<__ibrahim__> cpp is manual
14:46:14FromDiscord<__ibrahim__> ?
14:46:27Yardanicowell there's c2nim which will work for some stuff, also nimterop might work a bit too
14:46:51FromDiscord<__ibrahim__> thanks mate! im asking coz i couldnt find 3d physics in nimble
14:49:07FromDiscord<Recruit_main707> this is more or less what i want to do: https://play.nim-lang.org/#ix=2hJn (i know about nimpy, this is different)
14:49:56Yardanicowell yeah you should be able to do this
14:50:03supakeenYardanico: Thanks for putting that back in my mind, I need to extend those tests to cover more of it now that the basis is there. Especially now that my own projects are running out of issues with all this staying at home stuff :)
14:50:04Yardanicomacros can add ANY ast to valid Nim code
14:50:14Yardanicowell I mean valid Nim syntax
14:50:15Yardaniconot code
14:50:20Yardanicohttps://nim-lang.org/docs/macros.html#callsslashexpressions-pragmas
14:50:21supakeenIs there any sort of coverage report for the nim testcases I could generate by the way?
14:51:07*endragor quit (Remote host closed the connection)
14:52:50Yardanicoalso @Recruit_main707 in the case of an example you've shown you can get away with a template I think
14:53:01Yardanicoah no, you want to apply it as a pragma, sorry
14:53:36FromDiscord<Recruit_main707> yes, and i will have to modify more things of the function body also very likely
14:53:51Yardanicoyeah then you need a macro
14:59:00*Tyresc joined #nim
15:08:17*ryukoposting quit (Quit: Leaving)
15:10:58*endragor joined #nim
15:11:35shashlick@zacharycarter thanks for checking
15:14:26zedeusshashlick your telegram bot is reposting images
15:15:28*endragor quit (Ping timeout: 258 seconds)
15:15:41FromDiscord<kodkuce> hmm is there an easyer way to format this string """<div> <a href="""" & $MYVARHERE & """">Visit W3Schools.com!</a>"""
15:16:42Yardanicostrformat module
15:16:48FromDiscord<kodkuce> frogot closing div on end but, my point is if i have strings that contain " and i need in them to put my vairables is there some faster thing like
15:16:51FromDiscord<kodkuce> ok will check
15:19:55*inv2004 joined #nim
15:20:47FromDiscord<kodkuce> hmm i think i am blind
15:20:58PMunchkodkuce, you can backslash escape "
15:22:10FromDiscord<kodkuce> <a href="""" & $MYVARHERE & """"> beacomes <a href="/ $MYVARHERE /"> or what
15:22:27FromDiscord<kodkuce> lol i even mised backshals postion
15:23:04PMunchAnd those are forward slashes :P
15:23:31FromDiscord<kodkuce> oh ye that too xD
15:24:49FromDiscord<kodkuce> ok got it working ty :0
15:25:08FromDiscord<kodkuce> and i missed now ) should buy new hands of kayboard
15:26:46inv2004Hi, can someone explain the magic: I have a file with lines like "> test line\r\nABC", when I do file.readline(line): echo line - it outputs " test line\n A B C\n".
15:27:22inv2004So => I do not see '>' and spaces? why ?
15:28:09PMunchBecause you're reading the wrong file?
15:28:55*NimBot joined #nim
15:29:12Yardanicohttps://play.nim-lang.org/#ix=2hJJ
15:29:13Yardanicoworks just fine
15:30:05Yardanicohttps://play.nim-lang.org/#ix=2hJK this works too
15:30:51inv2004Can you try this file? https://gofile.io/?c=s8RJDZ
15:31:14inv2004I am very confused: I have one file which works on, and another one which is not. but in vscode both of them are ok
15:31:23inv2004on = ok
15:31:44*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:32:17Yardanicoinv2004: it probably doesn't work because it's not just >
15:32:30Yardanicorepr for the first line gives this
15:32:30Yardanico0x7f615e6b7058"\255\254>\0O\0N\0E\0 \0H\0o\0m\0o\0 \0s\0a\0p\0i\0e\0n\0s\0 \0a\0l\0u\0\13\0"
15:32:36Yardanicoso there are \255 and \254 before the >
15:32:53PMunchUTF BOM marker?
15:33:08inv2004hm, hm, hm. Thank you
15:33:40inv2004Looks like something wrong ... with Rust which generated it :)
15:33:45YardanicoPMunch: seems like it's UTF-16 little-endian BOM xdd
15:33:52Yardanico0xFF 0xFE
15:34:05PMunchYardanico :D
15:34:42Yardanicobut it should be fine after you skip those two bytes I think
15:35:07*jjido joined #nim
15:35:11Yardanicosince all of it is just plain ASCII except those two first bytes
15:35:16PMunchWell, the file is still UTF-16
15:35:21PMunchSee all those \0 in there?
15:35:26Yardanicoah right
15:35:37PMunchAnd since it's LE it's not ASCII compatible
15:35:50Yardanicoyeah you're right
15:35:52PMunchWell, it wouldn't be either way..
15:36:14PMunchSo Nim prints all the way to str.len, that's nice to know
15:37:01Yardanicoyeah, seems like it ignores null terminator in these lines
15:38:47*inv2004 quit (Ping timeout: 260 seconds)
15:46:42*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:51:55*al1ranger joined #nim
15:53:37FromDiscord<kodkuce> hmm can i order interator first before using it or do i have to dump all from interator to seq then order it
15:54:39FromDiscord<kodkuce> in my case iterator walkDir
15:54:56Yardanicoyes, you need to first get all values from it and then sort/order/etc
15:56:18FromDiscord<kodkuce> hmm then question too is there some proc that returns me all file/dirs or do i have to walkDir add, am looking in OS modul duno if i am blind or what
15:56:32YardanicoI don't think there's a module like that, you can just use toSeq from sequtils
15:56:56FromDiscord<kodkuce> ok ty
16:13:26FromDiscord<kodkuce> hmm i am getting some wierd error isent a tuple just an int?
16:13:30FromDiscord<kodkuce> var paths = toSeq( cdir.walkDir(true) ).sort do ( x,y:tuple[kind: PathComponent, path: string] ) -> int: cmp(y.kind, x.kind)
16:13:41FromDiscord<kodkuce> var result`gensym19665080: seq[type(cdir.walkDir(true))] = @[]
16:13:41FromDiscord<kodkuce> for x`gensym19665081 in walkDir(cdir, true, false):
16:13:42FromDiscord<kodkuce> add(result`gensym19665080, x`gensym19665081)
16:13:42FromDiscord<kodkuce> result`gensym19665080, do (x, y: tuple[kind: PathComponent, path: string])-> int:result = cmp(
16:13:42FromDiscord<kodkuce> y.kind, x.kind), Ascending)' has no type (or is ambiguous)
16:13:50Yardanicopls don't paste like that, people in IRC suffer :P
16:14:03PMunchHaha, was just about to type that up Yardanico :)
16:14:13dadadakodkuce: use play.nim-lang.org
16:14:17FromDiscord<kodkuce> i should start using irc for nim i alwies frogot stupit discord
16:15:48FromDiscord<kodkuce> https://play.nim-lang.org/#ix=2hK0
16:16:33Yardanico@kodkuce how do you want to sort?
16:16:36Yardanicoby what I mean
16:16:47FromDiscord<kodkuce> basicly i just want to compere if pcDir or pcFile thats pathComponent enum
16:16:55FromDiscord<kodkuce> just wanted to put dirs on top
16:17:01Yardanicooh
16:17:07Yardanicowell ok
16:17:20FromDiscord<kodkuce> am trying to make simple http server like python one + option to upload too
16:18:28FromDiscord<kodkuce> does bot show draged images or have to upload somwere else?
16:18:37Yardanicoit shows images just fine (as links)
16:19:31FromDiscord<kodkuce> ok
16:20:26Yardanico@kodkuce if you want dirs on top, you can do something like "var paths = toSeq(cdir.walkDir(true)).sortedByIt(it.kind).reversed()"
16:20:41Yardanicobut isn't it cleaner to have a for loop
16:20:42FromGitter<mantielero> Hello
16:20:44Yardanicohi
16:20:59FromGitter<mantielero> How can I convert a NimNode into an identifier?
16:21:17Yardanicowhat do you exactly mean?
16:21:19FromDiscord<kodkuce> hmm how uou mean for loop
16:21:29Yardanico@kodkuce nvm it would be a bit more complex
16:21:37Yardanicobut the code i gave you will work, but also import "sequtils"
16:21:41FromDiscord<kodkuce> like from what i see only walkdirs is for going woer files
16:22:46FromDiscord<kodkuce> wtf, ) Error: internal error: environment misses: result`gensym19665080
16:22:52FromDiscord<kodkuce> what is this gensym thingy
16:23:06FromGitter<mantielero> I want to create to create a random identifier that I can refer later. "let myname = genSym()", but I want to use it as an identifier
16:23:28YardanicogenSym proc in macros has an "ident" arg
16:23:29FromDiscord<KingDarBoja> Got a power outage last night 😒
16:24:43FromDiscord<kodkuce> hmm on nim playground it wokrs meybe its cuz devel?
16:24:46FromGitter<mantielero> when I do "myname.ident" I get a "node lacks field: ident"
16:26:05Yardanicoah well I understood what you mean
16:26:11YardanicogenSym is for creating symbols, not indents really
16:26:37Yardanicocan you provide a code example?
16:26:51FromGitter<mantielero> How can I create a random ident
16:27:03Yardanicojust create a random string? :P
16:27:08Yardanicorandomly generated*
16:27:11Yardanicoand "ident" proc
16:27:22Yardanicohttps://nim-lang.org/docs/macros.html#ident%2CNimNode
16:27:36YardanicoI had something like that in my own project, you can either use random module or just a global compile-time counter
16:27:59Yardanicoah actually not "ident" but newIdentNode
16:28:05Yardanicoah actually just "ident" :D
16:29:51FromGitter<mantielero> Let me try this (I have never used the playgraound): https://play.nim-lang.org/#ix=2hKa
16:29:57FromDiscord<kodkuce> https://play.nim-lang.org/#ix=2hKb can somone comfirm this crashes on devel?
16:29:57FromGitter<mantielero> Do you see the code?
16:30:06Yardanicoyes
16:30:16Yardanico@kodkuce I'll check just in a sec
16:30:56FromDiscord<kodkuce> ty
16:31:31Yardanicoworks just fine for me on latest devel here
16:31:36Yardanicoexact same code on linux
16:31:46Yardanicoare you sure you're on latest devel? :P
16:31:55Yardanicoit should work on 1.2.0 too
16:32:05Yardanicosince it works on playground which is 1.2
16:32:17FromGitter<mantielero> Another thing that puzzles me is the comment "Deprecated: Deprecated since version 0.18.1; All functionality is defined on 'NimNode'." Where is that functionality defined?
16:33:27FromDiscord<kodkuce> hmm i did choosenim dvel like 30min ago
16:33:33FromGitter<sealmove> on NomNode
16:33:34FromDiscord<kodkuce> meybe i broke it somwere else brb
16:34:31FromGitter<mantielero> https://play.nim-lang.org/#ix=2hKc
16:34:41*Trustable joined #nim
16:35:13*silvernode joined #nim
16:35:31Yardanico@mantielero https://play.nim-lang.org/#ix=2hKe
16:35:43Yardanicoin playground it will have no output, try it locally
16:35:48Yardanicoalso ident argument for genSym is optional
16:36:39Yardanicojust try to use `eval_ff` in your quote do and comment out eval_f
16:36:44FromDiscord<kodkuce> Yardanico: http://ix.io/2hKf
16:37:02FromDiscord<kodkuce> meybe cuz its in async
16:37:06Yardanico@kodkuce
16:37:13Yardanicoit's a known issue with asynchttpserver
16:37:16Yardanicoit's broken on 1.2.0 :P
16:37:19Yardanicothat's already fixed in devel though
16:37:25Yardanicolemme try your code
16:37:34Yardanicoit works just fine
16:37:46FromDiscord<kodkuce> did you uncooment
16:37:50FromDiscord<kodkuce> that sort before run
16:38:02FromDiscord<kodkuce>
16:38:03FromDiscord<kodkuce> https://cdn.discordapp.com/attachments/371759389889003532/698934969598476288/2020-04-12_183643.png
16:38:14Yardanicostill works
16:38:30Yardanicoah nvm it doesn't
16:38:32Yardanicoand I actually know whyt
16:38:34Yardanicowhy
16:38:37FromDiscord<kodkuce> πŸ™‚
16:38:52FromDiscord<kodkuce> i would like to know too
16:38:54Yardanicohttps://github.com/nim-lang/Nim/issues/10456
16:38:55*Hexeratops joined #nim
16:39:37Yardanicoinstead split it into two lines like https://play.nim-lang.org/#ix=2hKh
16:40:03FromGitter<mantielero> I get: Error: unhandled exception: transf.nim(1112, 10) `prc.kind in routineKinds`
16:40:09FromDiscord<kodkuce> ok ty
16:40:28Yardanico@mantielero hmm that's a compiler crash :P can you share the whole code to reproduce the same issue or try to minimize it?
16:40:35Yardanicoyou can also open an issue on nim github
16:43:21FromGitter<mantielero> I have my code here: https://github.com/mantielero/ipopt.nim
16:43:34FromGitter<mantielero> It requires the library "ipopt"
16:43:56FromGitter<mantielero> The file that I am trying is: src/ex01.nim
16:44:20FromGitter<mantielero> It is a numerical solver that I am trying to wrap
16:44:56*jjido joined #nim
16:45:34Yardanicook I'll try to run it locally
16:47:01FromGitter<mantielero> Thanks mate
16:51:47Yardanicosorry, it's partly my fault, it seems to happen if you try to use a node made by genSym in quote do, also - do you plan on using that eval_f procedure outside of the macro or it'll be called by code generated inside of the macro?
16:52:25Yardanicoah I understand why it's like that
16:52:26Yardanicoright
16:52:28FromGitter<mantielero> It is used by code outside of the macro.
16:52:42Yardanicowell then how will the user know the correct name for it?
16:52:51Yardanicosince you want to generate random names each time
16:52:54FromDiscord<Recruit_main707> how did you print the ast
16:52:59YardanicoexpandMacros
16:53:12Yardanicothat's not for the AST though, it outputs Nim code
16:53:23FromDiscord<Recruit_main707> of a given node
16:53:33Yardanicofor AST there's treeRepr, lispRepr and astGenRepr
16:53:39FromDiscord<Recruit_main707> ok thanks
16:53:52Yardanico@mantielero well your code will work if you call gensym like that "genSym(nskProc, ident="eval_f")"
16:54:12Yardanicobecause symbol must be of a specific kind for declaration, in our case we want to use it for a procedure so we define it to be nskProc
16:54:34FromGitter<mantielero> I will try
16:54:36Yardanicothat macro will create a procedure with a name like "eval_f_13970296"
16:54:48Yardanicoso I guess you might want to ask the user to provide the name for the resulting procedure
16:56:06Yardanicolike that - https://play.nim-lang.org/#ix=2hKn
16:56:38Yardanicobasically just remove eval_f line, add first argument to the macro "name: untyped", in quote do use it like "proc `name`"
16:56:50Yardanicoand when calling the macro call it like problem(myProcName): body
16:58:17FromGitter<mantielero> I tried the nskProc thing. It seems to work, but then it fails on during linking:
16:58:32FromGitter<mantielero> Error: execution of an external program failed: 'gcc -o /home/jose/src/ipopt.nim/src/ex01 /home/jose/.cache/nim/ex01_d/stdlib_assertions.nim.c.o /home/jose/.cache/nim/ex01_d/stdlib_formatfloat.nim.c.o /home/jose/.cache/nim/ex01_d/stdlib_io.nim.c.o /home/jose/.cache/nim/ex01_d/stdlib_system.nim.c.o /home/jose/.cache/nim/ex01_d/stdlib_parseutils.nim.c.o /home/jose/.cache/nim/ex01_d/stdlib_unicode.nim.c.o
16:58:32FromGitter... /home/jose/.cache/nim/ex01_d/stdlib_strutils.nim.c.o /home/jose/.cache/nim/ex01_d/stdlib_strformat.nim.c.o /home/jose/.cache/nim/ex01_d/@mipopt.nim.c.o /home/jose/.cache/nim/ex01_d/@mex01.nim.c.o -lm -ldl'
16:58:43Yardanicohuh, can you paste full error on some paste service?
16:58:55Yardanicoalso as I said even with nskProc the user will not know the name of the resulting procedure
16:58:58Yardanicoso he won't really be able to call it
16:59:25Yardanicoso you might want to let the user name a procedure himself (like in the modified ipopt.nim file I sent above)
17:00:21FromGitter<mantielero> On second though this all might be unnecesary. Because I will end up creating the call to the function. Like in here: https://github.com/mantielero/ipopt.nim/blob/master/src/ex01.nim#L205
17:00:49Yardanicooh maybe
17:01:00FromGitter<mantielero> But I want to be able to reference the function within the macro in any case
17:01:18Yardanicoyeah, with gensym and nskProc you'll be able to do that
17:02:18FromGitter<mantielero> https://pastebin.com/dTQyteDS
17:02:47FromGitter<mantielero> Strange because it complains about multiple definitions of `eval_f`
17:03:03Yardanicoyeah, strange, can you try removing nim cache by rm -rf ~/.cache/nim ?
17:03:05Yardanicoand trying again
17:04:30FromGitter<mantielero> Same failure
17:05:46FromGitter<mantielero> It is strange becuase `expandMacro` shows: https://pastebin.com/nZX6GrfT
17:06:18FromGitter<mantielero> So `eval_f_12805296` shouldn't clash with anything else
17:06:46Yardanicotry renaming ident in the proc to something else, maybe it'll work, not really sure
17:10:01FromGitter<mantielero> Fixed by doing: `let eval_f = genSym(nskProc, ident="eval_ff")`
17:10:16FromGitter<mantielero> I thing this might be bug in Nim
17:11:02FromGitter<mantielero> I believe it might be checking "ident" content instead of the final symbol ident
17:11:17FromDiscord<kodkuce> can i tag a global variable to be .gcsafe. so it stops harrasing me with warinings
17:11:18FromGitter<mantielero> (Not sure these are the right words)
17:13:03FromDiscord<kodkuce> let cdir = getCurrentDir() like how is this unsafe if in global
17:13:47FromDiscord<kodkuce> its not mutable so hmm
17:14:02Yardanicoit talks about GC memory
17:14:08Yardanicoyou can ignore it if you don't use multiple threads
17:14:15Yardanicostrings are GC'd in Nim
17:16:59FromDiscord<kodkuce> so if i use threads it will will not copy it to seperate thread?
17:17:18Yardaniconim has thread-local GC heap, but that'll be solved by arc memory management model which is in development
17:17:23FromDiscord<kodkuce> or GC will dump it in one thred
17:17:36Yardanicoso with the current default GC you can't really pass GC'd objects between threads without using raw pointers
17:18:08FromDiscord<kodkuce> i can use raw pointer for this i guess cuz it will newer change anyway
17:18:17Yardanicoyou need threads?
17:18:26FromDiscord<kodkuce> or use beohem but think its better to use raw pointer
17:18:36FromDiscord<kodkuce> 9999% noth but why not
17:18:47Yardanico???
17:19:56FromGitter<JohnAD> @dom96 You around today?
17:23:06FromDiscord<kodkuce> Error: expression has no address; maybe use 'unsafeAddr'
17:23:19Yardanicoit should be "var", not "let" if you want to get its address
17:24:44FromDiscord<kodkuce> beh i will just call evry request getCurrentDir like tard
17:24:54Yardanicowhy not use simple caching?
17:25:33FromDiscord<kodkuce> hmm what
17:25:51FromDiscord<kodkuce> feed me like i like metal oval things xD
17:26:03Yardanicocheck if less than 10 (or whatever) seconds passed since the previous request and if not, reply with old cached string
17:26:27Yardanicootherwise walk the dir again and return the new value
17:26:34Yardanicoand don't forget to set the cache variable to the new value
17:26:43Yardanicoand change last time too
17:27:08*Jesin quit (Quit: Leaving)
17:27:51*letto quit (Quit: Konversation terminated!)
17:29:09FromDiscord<kodkuce> hmm dont i need to build catch first, i dident know asynchttpserver stores catches automaticly, anyway my issue is this is retarded cuz getCurrentDir() is dir from where i run my server and it newer changes
17:29:51*letto joined #nim
17:29:52Yardanico?? asynchttpserver doesn't cache anything
17:30:10Yardanico@kodkuce well you can specify absolute path to walkDir and ask the user to provide the path
17:30:53Yardanicoalthough there's no need for caching well (I mean there is, but it would be a bit harder to implement since you'll need to use a table or two of them)
17:30:54FromDiscord<kodkuce> i think you are owerthinking what i am doing, i just trying to make like python -m http.server
17:31:05FromDiscord<kodkuce> just server currten dir
17:31:42FromDiscord<kodkuce> user has nothing to input whatewer i just need a string that will alwies be same
17:31:53Yardanicook
17:32:00FromDiscord<kodkuce> like it gets populated on first run with let cdir = getCurrentDir()
17:32:04dadadawhere is disruptek? wanna watch his stream
17:32:16Yardanicodadada: his router died I think
17:32:19Yardanicoso he isn't online
17:32:29FromDiscord<kodkuce> but insted using that one, now i for ewry request i do let cdir = getCurrentDir() and thats kinda retarded
17:32:38Yardanicowell just do simple caching as I said
17:33:34Yardanicoalthough python -m http.server doesn't do any caching at all
17:33:51FromDiscord<kodkuce> cuz it probbaly has curent dir in variable or someting
17:33:56Yardanico???
17:34:45FromDiscord<kodkuce> like i need constant path to dir from what i run myserver
17:34:53Yardanicoyou don't ?
17:35:25Yardanicowell you might need it yeah but that's the issue
17:35:33YardanicoI just don't understand what's the problem you're having
17:36:29FromDiscord<kodkuce> hmm, like i open some Folder, and i run myNimSimpleHttpServer, i want to serve that dir and cuz of that i need to have dirpath in variable or to evry request do let cdir = getCurrentDir() thats probbaly infecient to do and retarded cuz you can store it in variable
17:37:14Yardanicoif you do "let cdir = getCurrentDir()" in global scope getCurrentDir will only get called once
17:37:26Yardanicosince "let" is not an alias, it's for ASSIGNING a value to a variable
17:37:29FromDiscord<kodkuce> my problem is if i expose let cdir = getCurrentDir() as global var then GC crys how its not usnefe
17:37:37Yardanicoit's just a warning as I said
17:37:44Yardanicoand it can be safely ignored if you don't use threads
17:37:47Yardanicoand asynchttpserver doesn't
17:38:52FromDiscord<kodkuce> i know but i hate it and i say i can use gc:beohem or try that pointer thingy but then it coplains 'unsafeAddr'
17:39:02Yardanicoyou can disable warnings
17:39:14FromDiscord<kodkuce> hmm so asynchttpserver does not use threads if too much requests?
17:39:23Yardanicoit's async so it doesn't use threading at all
17:39:24FromDiscord<kodkuce> if i turn threads:on
17:39:30*Jesin joined #nim
17:39:39Yardanicoit won't use threads anyway
17:39:46Yardanico"threads:on" is not a "magical" switch
17:39:54Yardanicoit doesn't magically make all of your code threaded :)
17:40:17FromDiscord<kodkuce> ye but i thinked it has some limit and if i 0thread is stucked with CPU it will spawn new thread
17:40:34FromDiscord<kodkuce> guess i watched too much harry poter then
17:40:36Yardanicoit won't, and that would've been mentioned if that was the case
17:41:04Yardanico"httpbeast" can do threading by the way
17:41:15Yardanicoand it's used by "jester" if you run on a supported OS like Linux
17:41:47*leorize quit (Quit: WeeChat 2.7.1)
17:42:13FromDiscord<kodkuce> hmm ye i run linux, but anyway am making this for just times when you need a simple http server and kinda dont give a crap about pefomance xD
17:42:25Yardanicowell so why are you worrying so much then? :P
17:42:47Yardanicowarnings are not errors
17:43:01FromDiscord<kodkuce> cuz i hate that warring thingy
17:43:15FromDiscord<kodkuce> ye i know i can suppress but i have to type stuff for that
17:43:25FromDiscord<kodkuce> guess can bash alias it
17:43:32Yardanicoor you can create a config file for your nim file
17:43:40Yardanicoeither .cfg (old config format) or .nims (nimscript)
17:44:04Yardanicoif .nims, name it "nameofyourmainnimfile.nims" and put warning("GcUnsafe", false) there
17:44:28Yardanicoand put it in the same folder with your main file
17:45:01FromDiscord<kodkuce> ("GcUnsafe", false)' is of type 'tuple of (string, bool)' and has to be discarded
17:45:14FromDiscord<kodkuce> to add discard infront or what
17:45:21Yardanicoin .nims
17:45:30Yardanicoand ignore the errors from VSCode, it can't properly handle .nims files right now
17:45:32FromDiscord<kodkuce> yes its in simpleserver.nims
17:45:41YardanicoI mean the Nim extension
17:45:43FromDiscord<kodkuce> not in simpleserver.nim
17:45:47Yardanicoit'll work fine
17:46:00Yardanicoit's just that nim extension thinks that .nims is same as .nim
17:48:11*nixfreak joined #nim
17:48:12FromGitter<eagledot> Hello
17:48:33nixfreak!hash
17:48:58nixfreak!help
17:49:02Yardanico?
17:49:12nixfreakbot commands
17:49:17Yardanicodisbot is down
17:49:22*narimiran quit (Quit: leaving)
17:49:28nixfreakoh sorry didn't know
17:50:52FromGitter<eagledot> Is it possible to just forward declare a struct in C and use it in a function prototype in a header file like
17:51:18leorize[m]yea, disruptek's router is kinda broken, so disbot went with him
17:51:43leorize[m]@eagledot: I'm not sure what you're trying to achieve here...
17:52:47FromGitter<eagledot> Is it possible to forward declare a struct and then use it in a function prototype in a header file like... ⏎ `typedef struct temp` ⏎ `void function(temp **)`
17:53:01FromDiscord<sealegs> When I do `parseBiggestInt(id).int` it gives me a range error
17:53:03Yardanicohow's that related to Nim? :P
17:53:16Yardanico@sealegs how the error looks like?
17:53:48FromDiscord<sealegs> ```
17:53:48FromDiscord<sealegs> fatal.nim(48) sysFatal
17:53:48FromDiscord<sealegs> asyncfutures.nim(431) asyncCheckCallback
17:53:49FromDiscord<sealegs> asyncfutures.nim(383) read
17:53:49FromDiscord<sealegs> Error: unhandled exception: value out of range: 571359938501410826 [RangeError]
17:53:52FromDiscord<sealegs> Error: execution of an external program failed: 'C:\Users\KrispPurg\Desktop\Projects\Programming\nim-lang\discord_bots\dimscord\main.exe '```
17:54:23FromGitter<eagledot> https://github.com/Picovoice/porcupine/blob/master/include/picovoice.h ⏎ There is this header file...i was trying to call `pv_porcupine_init`
17:55:48Yardanico@sealegs well don't convert it back to "int" then
17:55:56Yardanicoseems like your' compiling for 32-bit arch so "int" is 32-bit
17:56:06Yardanicohence it can't hold this value in an "int" type
17:56:13Yardanicos/your'/you're
17:57:00FromGitter<eagledot> There is no definition of struct ..just declaration...and then it is passed into a C function ...when i try to just declare an `object type` and try to get the pointer ...it says expression has no address
17:58:21leorize[m]@eagledot: you're doing it wrong :)
17:59:01FromGitter<eagledot> `typedef struct pv_porcupine pv_porcupine_t; ⏎ void pv_porcupine_init( ⏎ ⏎ ``` pv_porcupine_t **object);```` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5e9356e53a85536c4325ba39]
17:59:24Yardanicocan you show nim code?
17:59:54FromDiscord<sealegs> sure
17:59:54FromDiscord<sealegs> ```nim
17:59:54FromDiscord<sealegs> proc getShardID*(id: string): int =
17:59:54FromDiscord<sealegs> result = (parseBiggestInt(id) shl 22) mod 1```
18:00:08Yardanicowell I didn't ask you @sealegs but ok :) and I already answered
18:00:11*exelotl joined #nim
18:00:18FromDiscord<sealegs> oh lol
18:00:19leorize[m]@sealegs: please don't paste code into discord
18:00:21Yardanicoeither compile for 64-bit or use int64 everywhere where you handle id
18:00:25leorize[m]use play.nim-lang.org for pasting
18:00:40leorize[m]`BiggestInt` is an actual type too btw
18:00:58leorize[m]@eagledot: you gotta explain what exactly does that init function take :)
18:02:10FromGitter<awr1> `type PVPorcupine = object; proc initPVPorcupine(obj :var PVPorcupine)`
18:02:46FromGitter<awr1> or `proc newPVPorcupine() :ref PVPorcupine = result.new`
18:03:14leorize[m]anyhow, this is how we would wrap it in Nim: https://play.nim-lang.org/#ix=2hL7
18:04:12FromGitter<awr1> yeah without more context i'm confused what you're trying to do
18:04:43FromGitter<awr1> https://github.com/Picovoice/porcupine/blob/master/include/pv_porcupine.h
18:04:47FromGitter<awr1> are you trying to generate bindings to this?
18:04:54FromGitter<awr1> i reccomend nimterop
18:05:07FromGitter<awr1> https://github.com/nimterop/nimterop
18:05:10FromGitter<eagledot> @awr1 Yes..
18:05:53*waleee-cl joined #nim
18:06:24FromGitter<eagledot> I was confused as there is no defintion of `struct pv_porcupine_t`.
18:06:59FromGitter<eagledot> The c code is passing `pv_porcupine_t **`
18:07:25FromGitter<awr1> does Porcupine need to build anything separately or can you just import it as a header
18:08:15FromGitter<eagledot> https://play.nim-lang.org/#ix=2hLg
18:08:40leorize[m]@eagledot: that is a C idiom for opaque struct
18:09:03leorize[m]see my example above for how to define it in Nim
18:09:37FromGitter<awr1> yeah if you wanted a opaque struct that is C-compatible do leorize's thing
18:10:26FromGitter<awr1> i was confused if you were just writing nim code by itself and wanted to know the equivalent to something from C or actually making bindings to something
18:12:04FromGitter<eagledot> Now i actually wanted equivalent in NIM ...by reading C header file...they provide dll. ⏎ Thanks for the help. i will try your code
18:13:47FromGitter<eagledot> what does pragma `cdecl` does?
18:14:20FromDiscord<kodkuce> how do i send file in respons in asnchttpserver
18:15:54FromDiscord<kodkuce> i read it with streams and just put it as repsons string and add {application type}
18:16:27FromDiscord<kodkuce> or what
18:17:15FromGitter<awr1> what is the dll name
18:18:20leorize[m]@eagledot: it tells Nim to use C calling convention
18:19:03FromGitter<eagledot> @awr1 `libpv_porcupine.dll` ⏎ https://github.com/Picovoice/porcupine/tree/master/lib/windows/amd64
18:19:40FromGitter<eagledot> Is it not the default i.e C convention?
18:20:34leorize[m]yea, the default is Nim calling convention
18:20:41leorize[m]which differs depends on which OS you're on
18:21:26*al1ranger quit (Quit: Leaving)
18:21:35FromGitter<awr1> https://gist.github.com/awr1/d3b7198a0c3941e971e78ff9091ae07f
18:21:40FromGitter<awr1> this might work
18:21:49FromGitter<awr1> uhh
18:21:52FromGitter<awr1> whoops
18:22:07FromGitter<awr1> fixed it
18:22:48FromGitter<awr1> i think
18:22:59leorize[m]https://play.nim-lang.org/#ix=2hLn <- that's a handwritten high-level wrapper
18:23:01FromGitter<awr1> i didn't test it fwiw but it seems simple
18:23:25FromGitter<eagledot> @awr1 I am a newbie to nim:) ⏎ That is alot for me to undestand ...thanks though :)
18:23:41FromGitter<awr1> nimterop is an advanced binding generator
18:23:50FromGitter<awr1> you can install it with `nimble install nimterop`
18:24:00FromGitter<awr1> then all you do is just import that file
18:24:04FromGitter<eagledot> is it like c2nim?
18:24:10leorize[m]it's better :P
18:24:36FromGitter<awr1> it can use c2nim if you want
18:25:34FromGitter<awr1> but in general it's very easy to use, is automatic and doesn't require you to have to implement extra steps in your build system
18:30:07FromGitter<awr1> once you make that, procs like `porcupineInit()` should be available
18:30:18FromGitter<eagledot> @ leorize[m] In your code your are using `ptr porcupine` while C prototype expects ` struct **`, am i missing something?
18:31:32leorize[m]https://play.nim-lang.org/#ix=2hLt <- better wrapper that accounts `pv_status_t`
18:31:43leorize[m]@eagledot: I use `var Porcupine`
18:31:55FromGitter<eagledot> Should it not be double `pointer.` i.e like `ptr ptr PorcupineObj`
18:31:59leorize[m]which expands into `var ptr PorcupineObj`
18:32:24leorize[m]this requires some understanding in C semantics
18:33:04leorize[m]the generated Nim code will be `ptr ptr PorcupineObj`
18:33:21FromGitter<eagledot> OK.
18:34:50*silvernode quit (Ping timeout: 256 seconds)
18:38:14FromGitter<awr1> also speaking of nimterop, did you read my comments @leorize https://github.com/nimterop/nimterop/issues/177#issuecomment-612507171
18:41:56PrestigeIt appears you can omit pragmas on procs if you forward declare procs with them, is this recommended though? E.g. https://play.nim-lang.org/#ix=2hLw
18:43:49PrestigeI feel like it'd be easier to maintain if it's a proc you're forward declaring, at least
18:44:28PrestigeAlso leorize[m] does your plugin have autocomplete for pragmas?
18:45:15leorize[m]Prestige: typically, I'd avoid forward declaring altogether
18:45:31leorize[m]and no, I don't autocomplete pragmas or keywords
18:45:40leorize[m]they are short so I don't really bother
18:46:18FromDiscord<Varriount> Forward declaring (for now at least) is a necessary inconvenience.
18:46:21PrestigeI have keyword autocompletion set up but nothing for pragmas unfortunately, think it's just useful to prevent typos
18:46:34leorize[m]my plugin highlights them
18:46:43FromDiscord<KingDarBoja> I had to use forward declaring in order to keep things consistent with source code
18:46:44leorize[m]so if you made a typo you will see it :p
18:46:59FromDiscord<Varriount> Ideally there would be a tool that would create and sync forward declarations with their implementation.
18:47:03Prestigehm that's nice. What plugin am I using for syntax highlighting...
18:47:28Prestigeah, zah/nim.vim
18:47:48PrestigeVarriount that would be very nice
18:47:59leorize[m]zah/nim.vim syntax highlighting is terrible
18:48:10PrestigeYeah I'm going to try yours for highlighting
18:48:22PrestigeIm just hoping the autocompletion doesn't conflict with coc-nvim
18:49:28leorize[m]it won't do anything if you don't configure it
18:49:43PrestigeI love it, that's how plugins should be set up by default
18:49:46leorize[m]I'll see if it's possible to hook this up with coc-nvim
18:50:07PrestigeWhich nim.vim was it again? idr your github username
18:50:39leorize[m]does templating works on coc-nvim with nimlsp (ie showing you the proc prototype as you write your code)?
18:50:44leorize[m]Prestige: alaviss/nim.nvim
18:50:46PrestigeYep
18:50:48Prestigety leorize[m]
18:51:51leorize[m]for maximum highlighting, make sure the file you open is saved on the disk :)
18:51:51Prestigeoh that's much better highlighting!
18:52:17leorize[m]it just have to exists, then I can employ nimsuggest on it :P
18:53:13dadadaPMunch: any tryExtract news?
18:53:28PMunchdadada, not really
18:53:35PMunchI've been away at our cabin for easter
18:53:50PMunchJust got back today :)
18:54:22dadadaPMunch: convenient excuse for burying bodies in the woods :-)
18:54:55Prestiges/bodies/eggs (nothing to see here FBI)
18:55:08tanehow is one supposed to obtain a "ptr proc(foo,bar)"? (trying to set a callback in the linenoise module)
18:56:40PMunchThe bodies of those who's sticking their nose in the macroutils module where they don't belong
18:58:19dadadaI knew it
18:58:27leorize[m]Prestige: if it's convenient, can you show me how nimlsp + coc-nvim looks like? :)
18:59:34Prestigehm sure I'll make a very short video
18:59:57PMunchcoc-nvim?
19:00:45FromGitter<zetashift> an LSP provider for neovim?
19:00:55FromGitter<zetashift> and iirc also autocompletion
19:02:32PrestigeYeah
19:03:15Prestigehttps://0x0.st/iQrs.mp4
19:03:19Prestigeleorize[m]: ^
19:05:01leorize[m]nice, can you show how it's like when you're typing parameters? thanks :)
19:07:35PrestigeHm I don't think I'm getting param autocompletion like I normally do with other languages, I'm just setting the proc signature
19:08:10PMunchHuh, neat
19:08:25Prestiges/setting/getting
19:08:31PrestigeMy brain is off this morning
19:09:29Prestigeleorize[m]: with other langauges with coc-nvim, I usually am shown the function signature each time I use a comma to start entering the next parameter
19:09:41Prestigebut I guess that's not happening with nim yet
19:10:11*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:10:15FromDiscord<KingDarBoja> Anyone said syntax highlighting?
19:10:18leorize[m]it will once I found the motivation to work on it :P
19:10:19FromDiscord<KingDarBoja> Been using the vscode-nim extension, is there a different one πŸ‘€
19:10:28*kiwi_41 joined #nim
19:10:40leorize[m]use neovim and you'll get first class syntax highlighting :P
19:10:54kiwi_41Hi
19:10:59PrestigeI think just has to do with nimlsp features?
19:11:20kiwi_41how is embedding smh like Lua to nim program?
19:11:25kiwi_41are there any libs for that?
19:11:29PMunchMight be a missing feature in nimlsp as well
19:12:00leorize[m]nimlsp still gotta base its feature on nimsuggest :p
19:12:00Prestigecoc-nvim interacts with the lsp so I think it's just that, but it's nbd. nimlsp works really well
19:12:06PrestigeTrue
19:12:06FromDiscord<KingDarBoja> Ah Lua, I remember taking free courses on 2D game dev on Lua lol
19:12:43PMunchleorize[m], indeed, but not everything in nimsuggest is in nimlsp yet
19:12:54PMunchkiwi_41, depends on what you need
19:13:08leorize[m]PMunch: the `con` command should get you the function signature for as long as the cursor is inside the function call params
19:13:52kiwi_41I guess id like some scripting options for data my nim program will spit out
19:14:16PMunchThen maybe look into tying NimScript into Nim
19:14:44kiwi_41i would prefer smh mainstream like Lua :D
19:15:12leorize[m]https://github.com/jangko/nimLUA
19:16:02FromDiscord<KingDarBoja> Nice
19:16:10leorize[m]PMunch: the only reason why nim.nvim doesn't use nimlsp is because you haven't got it merged into Nim yet :P
19:16:38leorize[m]and that you haven't cracked semantic highlighting over lsp too :P
19:16:39PMunchWell, it uses external Nim packages..
19:16:54PMunchThere is an extension to LSP that does that..
19:16:54leorize[m]dr nim uses external packages too :)
19:17:01PMunchIt does?
19:17:07Yardanicoz3
19:17:26leorize[m]and zevv's nimz3 wrapper
19:17:34PMunchHuh, when I decided not to make a PR for nimlsp it was because of external dependencies. But maybe now that the flood gates are open..
19:17:38*kiwi_41 quit (Quit: Connection closed)
19:20:56*lritter joined #nim
19:29:13*inv2004 joined #nim
19:30:07*Hexeratops quit (Read error: Connection reset by peer)
19:32:49*jjido joined #nim
19:42:10Prestigehm this is interesting: https://nim-by-example.github.io/variables/result/
19:42:28PrestigeIn the 'unexpected' proc, I would expect `result` to be shadowed
19:43:19PrestigeOr is it that, if you shadow `result`, you must explicitly return result?
20:04:54*blackbeard420 quit (Quit: ZNC 1.7.5 - https://znc.in)
20:07:29FromDiscord<kodkuce> i got GET part working but hmm how do i upoload a file to asynchttpserver, am trying to net depend on js , so i tryed with plain HTML5 post and <input file but in post req i only see my filename nothing else
20:09:04*inv2004 quit (Ping timeout: 265 seconds)
20:10:27FromDiscord<kodkuce> was missing enctype="multipart/form-data"
20:12:56FromDiscord<Recruit_main707> from the example in here, https://nim-lang.org/docs/macros.html#statements-procedure-declaration the first proc, how would i access that return type? (its the first line inside nnkFormalParams)
20:13:03FromDiscord<Recruit_main707> (from a macro)
20:18:24*Vladar quit (Quit: Leaving)
20:22:57FromDiscord<kodkuce> now i think i know why jester exists cuz i need a parser for POST body request
20:34:48FromDiscord<kodkuce> there is no multipart parser Nim lib right?, meybe i can use some C lib https://github.com/twTwo/multipart-parser-c
20:37:25leorize[m]Prestige: yea, result was shadowed, but the special result is the one that's returned
20:37:53leorize[m]@kodkuce: or you can just import only the multipart parser...
20:38:54FromDiscord<kodkuce> from whee i think jester has some
20:39:14leorize[m]https://github.com/dom96/jester/blob/b68c1a88612b0dae319be03caaac430b18905adf/jester/private/utils.nim#L55
20:39:17*chemist69 quit (Ping timeout: 246 seconds)
20:40:22*chemist69 joined #nim
20:40:56FromDiscord<kodkuce> how can i import only part of jester, like form jester import multypart ?
20:41:20FromDiscord<kodkuce> tough from what i see its utils in jester
20:42:04PMunchimport jester/utils?
20:43:14Prestigeleorize[m]: ah, that's interesting
20:44:12Prestigefrom jester import util looks correct to me, is that not working?
20:45:18Prestigeutils*
20:45:33FromDiscord<kodkuce> /home/me/Documents/Projects/Nim/SimpleHTTPupload/simpleserver.nim(9, 14) Error: cannot open file: jester/utils
20:46:38FromDiscord<kodkuce> /home/me/Documents/Projects/Nim/SimpleHTTPupload/simpleserver.nim(9, 20) Error: undeclared identifier: 'utils'
20:48:43FromDiscord<kodkuce> hmm i need to rip just filedata from that whole body so i can save it on my server
20:48:45FromDiscord<kodkuce> dooom
20:50:23FromDiscord<kodkuce> import jester/private/utils << this worked
21:04:02*audiofile joined #nim
21:04:03audiofileguys
21:04:09audiofilenim sounds like a dream come true
21:04:21PMunchPreaching to the choir in here :)
21:04:23audiofilerecommended resource to learn this language?
21:04:33audiofileI mean, I just checked out the features tab and I'm already sold
21:04:36audiofileyeah :P PMunch
21:05:20FromDiscord<Recruit_main707> audiofile, sadly, almsot no tutorials out there out of the very basic stuff
21:05:27PMunchPrestige, the `from X import Y` means that you want to import the procedure or variable Y from the module X. `import X/Y` means you want to import the module Y in subfolder X
21:05:44audiofileah I see... have to noodle around myself to get past the beginner stage I see
21:05:45PMunchRecruit_main707? Really what are you missing?
21:05:55audiofilebut from first glance, nim seems VERY versatile
21:06:11Prestigeah thanks PMunch
21:06:23FromDiscord<Recruit_main707> PMunch, metaprogramming tutorials get reduced to literally the docs :p
21:06:39FromDiscord<KingDarBoja> I wish Jetbrains will release some plugin for Nim or a fully IDE like PyCharm
21:06:58PMunchRecruit_main707, this might be useful for you: https://peterme.net/metaprogramming-and-read-and-maintainability-in-nim.html
21:07:04PMunchI basically walk through how I create my macros
21:09:28FromDiscord<Recruit_main707> PMunch: great page, i have a macros problam though, could you help me?
21:09:32*audiophile joined #nim
21:09:32*audiophile is now known as videofile
21:09:34FromDiscord<Recruit_main707> it should not be very hard
21:09:38*videofile quit (Changing host)
21:09:38*videofile joined #nim
21:09:55PMunchSure
21:09:57PMunchAsk away
21:10:27videofiledo you write a lot about nim?
21:10:36*audiofile quit (Ping timeout: 256 seconds)
21:10:40PMunchMe?
21:10:44videofileyessir
21:10:55PMunchWell, pretty much everything on that site is about Nim :P
21:11:15videofileoh I could find only 6 entires under nim tag. will try homepage then
21:11:17PMunchBut I'm not sure you'd consider that much..
21:11:43FromDiscord<Recruit_main707> PMunch: https://nim-lang.org/docs/macros.html#statements-procedure-declaration the first proc, how would i access that return type? (its the first line inside nnkFormalParams)
21:11:43FromDiscord<Recruit_main707> (from a macro)
21:11:47videofilesorry, missed the older entries button
21:12:14PMunchHaha, yeah that button could be more obvious..
21:13:03PMunchmyProcDef[3][0]
21:13:06leorize[m]@Recruit_main707: `[0]`
21:13:14videofileanyway I can submit corrections/typos on a post?
21:13:21FromDiscord<Recruit_main707> thats a bit ugly isnt it?
21:13:25PMunchvideofile, sure
21:13:37PMunchRecruit_main707, yes
21:13:38leorize[m]that's where @PMunch macroutils comes in :P
21:13:42PMunchHence why I wrote macroutils :)
21:14:21leorize[m]you can actually do this: `procDef.params[0]` with only `macros` right now
21:14:54FromDiscord<Recruit_main707> but the AST will always look the same right?
21:15:43FromDiscord<Recruit_main707> (ie: FormalParams will always be at that position)
21:16:14PMunchYes
21:18:01*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:22:55*inv2004 joined #nim
21:24:22FromGitter<zacharycarter> shashlik: np
21:25:14*solitudesf quit (Ping timeout: 240 seconds)
21:25:34videofilenim hit 1.0 right? I think I saw a hn post
21:25:52PMunchYes, quite a while back
21:25:56PMunchWe're on 1.2 now
21:26:03videofilesweeet!
21:26:22videofileso will there be any breaking changes expected like from python2 to 3?
21:26:26videofileor backward compat
21:26:35videofilei assume 1.0 means the latter
21:27:31videofilewow you can use different GCs???
21:27:34videofilecraycray!
21:27:43FromDiscord<Recruit_main707> and the new arc!
21:27:50videofilearc??
21:27:53videofileI'll have to look that up
21:28:16FromDiscord<Recruit_main707> automatic reference counting https://docs.elementscompiler.com/Concepts/ARCvsGC/
21:28:35FromDiscord<Recruit_main707> ^ this is not nim specific
21:28:43PMunchWell, breaking changes for 2.0
21:29:34videofiledoes retain cycle mean stuff referencing each other, possibly not getting removed from memory?
21:30:03FromDiscord<Recruit_main707> i think, i know almost nothing about gcs
21:30:31videofileim a python refugee and can tell you that metaprogramming in python sucks
21:31:05videofilethere is the ast package but it is really unwieldy
21:31:19*Northstrider joined #nim
21:32:22PMunchAnd it's runtime
21:32:23NorthstriderHey. I see csources has not been updated for quite a while, how's it able to build the most recent compilers?
21:32:26PMunchWhere's the fun in that!
21:32:35*Hexeratops joined #nim
21:32:36videofileexactly!!!
21:32:44PMunchNorthstrider, well it understands the subset of Nim that the compiler uses
21:32:54PMunchI mean it doesn't use every single feature
21:33:12NorthstriderAh okay
21:33:31NorthstriderSo if the compiler/stdlib used new constructs, csources would also be updated?
21:33:51videofilethe style insensitivity seems...odd coming from other languages
21:33:58videofileis nim the first to do this
21:34:08PMunchNorthstrider, probably yeah
21:34:13PMunchWell I mean, they'd have to
21:34:14NorthstriderMakes sense, thanks
21:34:18PMunchvideofile, don't worry about it
21:34:33videofilei dont think ill lose any sleep over it :P
21:34:36PMunchIt's a great feature once you get used to it (ie. realise that you don't actually ever think about it)
21:34:53videofilei just need to find a vim plugin for nim :/
21:34:57PMunchAnd I don't think Nim is the first to do it
21:35:01PMunchvideofile, which editor?
21:35:01videofileoh
21:35:09videofilevim PMunch
21:35:14videofileand what language was it? just curious
21:35:32NorthstriderAlso, where would I find the first version of the c compiler capable of building the first nim compiler that could self host? i.e. the point where the c compiler didn't need to be used anymore. 1_1 in csources is auto generated from what I can see
21:35:38PMunchI use this: https://github.com/zah/nim.vim along with nimlsp
21:36:06videofileoh second one is by a certain PMunch? :D
21:36:16PMunchHaha, yes :P
21:36:26videofileniiice, thanks for doing that
21:36:34dadadavideofile: https://totallywearingpants.com/posts/nim-language-highlights/
21:36:39PMunchNo problem, after all I'm using it myself :P
21:36:46dadadavideofile: also use play.nim-lang.org
21:36:48PMunchNorthstrider, the first C compiler?
21:37:04videofileis there a nim-offtopic? Id like to ask some q's about hwo you went about writing the lsp
21:37:12NorthstriderPMunch: Oh, was nim not bootstrapped in C?
21:37:17videofilethanks dadada!
21:37:37PMunchvideofile, yes there is
21:37:51PMunchNorthstrider, I think the first compiler was written in Pascal IIRC
21:37:59PMunchBut you'd have to ask Araq about that
21:38:48Northstriderhttps://github.com/nim-lang/Nim/blob/a03d8ed4c20b3ee2ae40b1c547cfbdb8738c27b5/compiler/readme.txt#L2
21:39:05dadadaNorthstrider: it's written in Nim's sources that Nim was originally developed in Pascal and that code was rewritten to Nim
21:39:08Northstriderbootstrapped in pascal, you are right :)
21:40:07*blackbeard420 joined #nim
21:40:36*SenasOzys joined #nim
21:41:50PMunchIf you squint and tilt your head you can still see some Pascal in Nim
21:42:04*hpyc9 quit (Quit: ZNC 1.7.5 - https://znc.in)
21:42:04*blackbeard420 quit (Client Quit)
21:42:07videofileis pointer arithmetic totally not possible ?
21:42:24PMunchIt is?
21:42:30PMunchWhy would it be impossible?
21:42:35videofileidk :/ just asking
21:42:43PMunchJust cast the pointer to an int and you can do whatever with it
21:42:57videofileohh right
21:43:43*blackbeard420 joined #nim
21:44:12*hpyc9 joined #nim
21:44:28videofilesomeone throw me the discord invite pls
21:45:11NorthstriderThere's probably no simple answer to this, but why target c rather than llvm IR?
21:45:31PMunchBecause LLVM wasn't really stable or well known at the time
21:45:43FromDiscord<Recruit_main707> llvm was not looking so promising bacj then
21:45:48FromDiscord<Recruit_main707> how do you represent an Integrer as a NimNode?
21:45:55PMunchAnd in retrospect I'm glad Nim chose C, makes things like interacting with C and reusing libraries a breeze
21:46:05FromDiscord<Recruit_main707> "breeze"
21:46:06NorthstriderAh fair, thanks :)
21:46:09PMunchAnd it can run anywhere C can, even on microcontrollers
21:46:20FromDiscord<Recruit_main707> thats true
21:46:24PMunchRecruit_main707, IntLit?
21:46:26Northstridervideofile: https://discordapp.com/invite/ezDFDw2
21:46:27videofiletrue, and you can't really argue with the fact that it makes it really easy for systems stuff
21:46:29videofilety
21:46:44FromDiscord<MapleSyrup> eyy
21:47:57FromDiscord<Recruit_main707> PMuch: but thats a nimNodeKind
21:48:15FromDiscord<Recruit_main707> id need a NimNode
21:48:34dadadaNorthstrider: C is probably the most portable target currently in existence, there're C compilers for all platforms, also with C as a target Nim isn't depenend on llvm, it effectively can be compiled by clang (llvm) or gcc and many other c compilers, also the performance of C compilers is extremely good, I doubt there would be significant performance gains by switching to llvm-IR
21:49:13PMunchRecruit_main707, newLit(100)?
21:49:58dadadaNorthstrider: additional reason is that it's allowing for mixing C/C++ code with Nim code for better interop
21:51:20dadadaNorthstrider: one more thing that comes to mind is, that it's probably easier for developers to debug the generated C code (since so many devs are familiar with C) as opposed to debugging llvm-IR
21:52:23*pbb joined #nim
21:57:24FromDiscord<Asmodeus> Those are good points, thank you dadada
21:58:00videofileplease dont crucify me but are there any linters for nim that make it conform to a specific case sensitivity?
21:59:27dadadaZevv: very well written! keep doing that, cause I think it makes a huge difference to have such quality content! http://zevv.nl/nim-memory
22:00:53*tane quit (Quit: Leaving)
22:01:06FromDiscord<Recruit_main707> videofile, i dont thinkso
22:01:17videofilewow yall are single-handedly pumping out a lot of resources for nim literature
22:01:34*liblq-dev quit (Quit: WeeChat 2.7.1)
22:01:43PMunchWell there's this: https://github.com/FedericoCeratto/nimfmt
22:02:24PMunchvideofile, well, it's not single-handedly when we're multiple people is it?
22:02:34videofilethis irc
22:02:41PMunchThere's also nimpretty I think
22:06:17*SenasOzys quit (Quit: Leaving)
22:07:38Prestigenimfmt looks decent
22:08:03Prestigeinteresting to see ; as proc param separators though, thought , was the norm
22:08:23Yardanicoit still can be used
22:10:02PMunchYeah, you can do , or ;
22:10:07PMunchBut there are some differences
22:10:27PMunchproc (x, y: int) for example
22:10:54*inv2004 quit (Ping timeout: 256 seconds)
22:10:55Prestigeif you used a ; there it would fail to compile right?
22:11:00Yardanicoyes
22:11:06Yardanicobut ; actually has places where it's useful IIRC
22:11:15Yardanicoalthough that has to do with some pragmas and advanced features
22:11:33Yardanicodon't remember where though :P
22:11:58Prestigeonly thing I've seen so far is when you have extra parens and you need to use ; to separate statements
22:12:26Yardanicono, I mean ; in arg list
22:12:56Prestigeah
22:13:36Yardanicowell, I think I remember at least one such case - templates
22:13:50Yardanicotemplate test (something; data: string) = stuff
22:26:29videofileanyone willing to share nim hobby projects on github?
22:26:35videofilewanna see if I can 'read' it
22:29:46FromDiscord<Recruit_main707> I have a rocket league example bot made in Nim, sadly, since we don't have official support for Nim (working on it), it uses a python bridge that sends all the game data to nim and receives the game inputs.
22:30:12FromDiscord<Recruit_main707> It's outdated, and it won't work with arc though
22:30:28Yardanicovideofile: https://github.com/Yardanico/nim-mathexpr :P
22:31:02PrestigeAnyone have resources for learning xlib? I'm wanting to write a window manager in nim
22:31:08Yardanicoalso https://github.com/Yardanico/nim-adb
22:31:20YardanicoPrestige: don't know resources but a few people did some simple WMs in nim
22:31:31videofilewow impressive
22:31:38YardanicoPrestige: https://github.com/search?q=language%3Anim+wm
22:31:48PrestigeI've been looking at one, but am not sure what some of the imported types are
22:32:23PMunchhttps://peterme.net/tinywm-implementation-in-nim.html
22:33:09PMunchI'm working on a Nim WM as well
22:33:27PrestigeOh that's great
22:35:40PrestigeI haven't work with anything low-level before, not sure where to begin understanding xlib. Just reading through code trying to wrap my ahead around the variables, determining what they are
22:38:09*Hexeratops quit (Read error: Connection reset by peer)
22:39:13videofilejust curious, why is mixing tabs and spaces a big deal when compiler can replace tabs with spaces? asking as a layman
22:40:00PMunchBecause you have no idea how many spaces a tab is meant to be
22:40:28PMunchPrestige, abandon all hope ye who enters here
22:40:45Prestigeisn't that a line from xterm? Lol
22:41:03YardanicoPrestige: it's nuch older :P
22:41:18Yardanicohttps://en.wiktionary.org/wiki/abandon_hope_all_ye_who_enter_here
22:41:31PMunchSupposedly inscribed at the entrance to hell
22:41:35PrestigeYeah was just thinking in terms of applications
22:42:19PrestigeI found an overview for xlib.. going to be a lot more reading before writing code I support
22:42:21Prestigesuppose *
22:42:53videofileok
22:43:02videofileIt's going to be hard but vim's expandtab saves the day
22:43:33PMunchHaha, yeah no-one actually hits space twice
22:43:45videofile;)
22:43:49videofileunless youre a cat
22:43:50PMunchPrestige, it's not toohard
22:44:57PrestigeJust some info I'll need to know beforehand - I have a wm I've adapted written in c that I want to convert to nim, but I think it's overly complex for what I want anyway
22:45:49*pbb quit (Read error: Connection reset by peer)
22:47:04*pbb joined #nim
22:51:05*Trustable quit (Remote host closed the connection)
22:51:27*exelotl quit (Quit: Leaving)
22:56:23videofilehow nim handle unicode
22:56:42videofileoof got it
22:56:43videofilesorry
22:58:42FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2hN1
22:58:59FromDiscord<KingDarBoja> Careful with how Nim handles unicode and characters, this ain't Python :S
22:59:19FromDiscord<KingDarBoja> By the way, why initTable provides that ton of fields?
23:03:14videofileooh thanks
23:04:36FromDiscord<KingDarBoja> Are you newbie videofile?
23:04:46FromDiscord<KingDarBoja> Do you come from Python?
23:04:48videofileyeeeeees
23:04:54FromDiscord<KingDarBoja> Hold on,
23:04:55videofileyes ot both
23:05:00videofileyou have osmething for me
23:05:07videofilea sidequest perhaps?
23:07:11FromDiscord<KingDarBoja> I will share the npte I got from Variount explaining the difference
23:07:14FromDiscord<KingDarBoja> Note*
23:07:52FromDiscord<KingDarBoja> Oh right, you are on IRC
23:08:01FromDiscord<KingDarBoja> A character is an abstract representation of a piece of text, separate from encoding.
23:08:04FromDiscord<KingDarBoja> A char is a data type, usually composed of 8 bytes.
23:08:11FromDiscord<KingDarBoja> When you use stringVar[i] in Nim, you are saying, "give me the i'th char in the string"
23:08:18FromDiscord<KingDarBoja> When you use unicode.runAtPos(stringVar, i), you are saying, "give me the i'th utf-8 character in the string"
23:09:58FromDiscord<KingDarBoja> So be careful as Python pretty much handles all that by using unicode everywhere
23:10:07FromGitter<awr1> if you want to use string-to-string tables
23:10:16FromGitter<awr1> might i recommend https://nim-lang.org/docs/strtabs.html
23:10:31*PMunch quit (Quit: leaving)
23:11:09FromDiscord<KingDarBoja> Let me see
23:11:52videofileim on discord too
23:12:05FromDiscord<MapleSyrup> hey @KingDarBoja
23:12:13FromDiscord<MapleSyrup> tis me
23:12:16FromDiscord<KingDarBoja> Hey!
23:12:44FromDiscord<MapleSyrup> ah just aw your explanation
23:12:57FromDiscord<KingDarBoja> I sent the entire text block on DM
23:13:16FromDiscord<KingDarBoja> It was the explanation that @Varriount gave to me as I asked the same stuff
23:15:41*Hexeratops joined #nim
23:17:46FromDiscord<KingDarBoja> awr1: should I be worried of the repr table fields?
23:17:47FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2hNa
23:22:03*opal quit (Ping timeout: 240 seconds)
23:23:28*opal joined #nim
23:27:12leorize[m]Recruit_main707: that's not what ARC mean btw
23:27:18leorize[m]though the idea is similar
23:28:00FromDiscord<KingDarBoja> Hi there leorize, my comrade!
23:28:04leorize[m]the "official" name is Araq's Reference Counting lol
23:28:57leorize[m]o/ @KingDarBoja
23:29:12*dwdv quit (Ping timeout: 258 seconds)
23:30:56FromDiscord<KingDarBoja> Juts looking right now at the repr on Table
23:31:07FromDiscord<KingDarBoja> I see several Fields*
23:32:13FromDiscord<Gary M> I'm on Windows trying to use nimterop but in getHeader I'm getting a configure capable but bash executable missing error
23:33:18leorize[m]@KingDarBoja viewing a table with `repr` will spill all of it's internals out
23:33:38leorize[m]you should use `$` for them
23:33:48leorize[m]shashlick: see Gary M message
23:35:27FromDiscord<KingDarBoja> Thank you Leo, added to my notes πŸ˜„
23:52:22*inv2004 joined #nim