<< 27-01-2025 >>

00:03:56*fallback quit (Read error: Connection reset by peer)
00:10:58FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=iacTvzQm
00:11:17*fallback joined #nim
00:12:13FromDiscord<demotomohiro> In reply to @carrocho "i dont know why,": You can paste code here with syntax highlights: https://internet-of-tomohiro.pages.dev/nim/faq.en#community-how-to-post-nim-code-with-syntax-highlight-on-discordqmark
00:12:47FromDiscord<demotomohiro> As long as your code is not long.
00:13:49FromDiscord<demotomohiro> When you want to share long code, you can use github, gist or etc.
00:22:28FromDiscord<carrocho> So, I am brazilian and Im with my friend trying to translate a code from JAVA to NIM, can you help us? Its almost finished
00:22:33FromDiscord<carrocho> @demotomohiro
00:24:30FromDiscord<demotomohiro> I used JAVA long time ago but I don't remember much about it.
00:25:44FromDiscord<carrocho> Its ok, just have to follow OOP
00:25:55FromDiscord<carrocho> and its not that complicated
00:26:16*ensyde joined #nim
00:26:56FromDiscord<carrocho> can I share my screen with you? or with liveshare on vscode
00:28:53FromDiscord<leelikesfries> i love reinventing the wheel
00:30:50FromDiscord<demotomohiro> In reply to @carrocho "Its ok, just have": I don't use vscode. You cannot use github?
00:31:40FromDiscord<carrocho> In reply to @demotomohiro "I don't use vscode.": I'll upload the files there, just a minute
00:41:18FromDiscord<carrocho> In reply to @demotomohiro "I don't use vscode.": https://github.com/Carrocho/HELPPLZ.git
00:43:32FromDiscord<carrocho> getInstance in DAOProduto.nim is not working 😢
00:51:03FromDiscord<demotomohiro> How do you compile it?↵`nim c DAOProduto.nim`?
00:51:30FromDiscord<Robyn [She/Her]> the fact you chose to do a project in a language you aren't comfortable with, aatounds me
00:51:36FromDiscord<Robyn [She/Her]> (edit) "aatounds" => "astounds"
00:52:52FromDiscord<carrocho> In reply to @demotomohiro "How do you compile": nim c --debugger:native DAOProduto.nim
00:53:15FromDiscord<Robyn [She/Her]> In reply to @carrocho "nim c --debugger:native DAOProduto.nim": are you using gdb or lldb?
00:54:00FromDiscord<carrocho> In reply to @battery.acid.bubblegum "the fact you chose": its for college 😦
00:54:10FromDiscord<carrocho> In reply to @battery.acid.bubblegum "are you using gdb": what is that?
00:54:22FromDiscord<haniel.> In reply to @haniel. "college work, i have": .
00:54:28FromDiscord<haniel.> its hard
00:54:54FromDiscord<carrocho> In reply to @haniel. ".": you too? 😮
00:55:09FromDiscord<Robyn [She/Her]> In reply to @carrocho "what is that?": A native code debugger, but if you're not using either, then `--debugger:native` is useless to you
00:55:24FromDiscord<that_dude.> It's cool, but very unexpected that there are classes requiring Nim
00:56:25FromDiscord<haniel.> doesn't requires, but we chose because no more languages was available for us
00:57:18FromDiscord<carrocho> In reply to @that_dude. "It's cool, but very": we have to choose a language that its not so popular, and my group choosed NIM
00:57:50FromDiscord<haniel.> In reply to @carrocho "you too? 😮": gaslighting
00:57:51FromDiscord<Robyn [She/Her]> In reply to @carrocho "we have to choose": aaah that makes sense
00:58:11FromDiscord<Robyn [She/Her]> should've done it in brainfuck though smh
00:59:11FromDiscord<carrocho> In reply to @battery.acid.bubblegum "should've done it in": that`s a language?
00:59:15FromDiscord<Robyn [She/Her]> also it's 'Nim', not 'NIM', NIM is a different thing
00:59:35FromDiscord<haniel.> toma gap do veio
01:00:06FromDiscord<Robyn [She/Her]> In reply to @carrocho "that`s a language?": An esolang yeah, not practical for actual development though
01:00:21FromDiscord<carrocho> In reply to @battery.acid.bubblegum "also it's 'Nim', not": sorry
01:00:57FromDiscord<Robyn [She/Her]> don't be sorry, just letting ya know for future reference
01:01:13FromDiscord<Robyn [She/Her]> no harm done
01:01:15FromDiscord<haniel.> ohh thats nice↵noted
01:01:52FromDiscord<that_dude.> In reply to @carrocho "getInstance in DAOProduto.nim is": Btw when asking for help, add some details for what you're asking because otherwise people can't even offer advice if they can't even begin to guess what the issue could be
01:02:10FromDiscord<that_dude.> For example, what did you expect vs what is currently happening
01:04:08FromDiscord<carrocho> In reply to @that_dude. "Btw when asking for": I gave my github link, and in the file "DAOProduto.nim" the proc named "getInstance" is not working, it says Error : invalid type: 'void'
01:05:31FromDiscord<carrocho> @demotomohiro did you manage to fix this?
01:06:35FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=prMQDRkt
01:07:19FromDiscord<Robyn [She/Her]> that looks messy
01:08:48FromDiscord<that_dude.> Reminder that ref objects are references to objects. That means that their default value is null/nil
01:09:51*ensyde quit (Ping timeout: 265 seconds)
01:10:43FromDiscord<demotomohiro> `Container[T: Base]` Inheritance doesn't work like type class and it produces confusing compile error.
01:11:03FromDiscord<Robyn [She/Her]> In reply to @that_dude. "Reminder that ref objects": this shouldn't cause issues, though
01:11:33FromDiscord<Robyn [She/Her]> `Foo` is initialised and printing out something that's a reference just returns `...` in the stringified code
01:11:45FromDiscord<that_dude.> In reply to @battery.acid.bubblegum "this shouldn't cause issues,": Yeah you're probably right, I was thinking of the wrong thing. I nede to sleep lol
01:11:51FromDiscord<Robyn [She/Her]> In reply to @battery.acid.bubblegum "`Foo` is initialised and": that contains a reference field
01:11:53FromDiscord<Robyn [She/Her]> eh dw
01:21:07FromDiscord<demotomohiro> In reply to @carrocho "https://github.com/Carrocho/HELPPLZ.git": Your code produces `Warning: generic methods are deprecated`.↵That might causing the compile error.↵You better to rewrite code without using methods and inheritance, or don't use generics with methods.
01:25:31FromDiscord<carrocho> In reply to @demotomohiro "Your code produces `Warning:": 😭
01:25:38FromDiscord<carrocho> ill try, ty
01:53:13FromDiscord<carrocho> someone have a Nim project? just to see how it works
01:58:49FromDiscord<demotomohiro> In reply to @carrocho "😭": It seems using the same file name to the type name causing the error.
02:00:29FromDiscord<demotomohiro> Chaining file name different from the type name and changing `DAO[e : Entidade] ` to `DAO[e]` fixes one compile error.
02:03:15FromDiscord<demotomohiro> Most of people uses module names starts with lower case latter and uses type names starts with upper case latter.↵So module names and type names don't overlap.
02:10:31FromDiscord<carrocho> it didnt work for me, i think it will be better to just not use generics
02:21:12FromDiscord<leelikesfries> invalid indentation..........
02:26:41FromDiscord<leelikesfries> do they randomly throw that error out when the actual error is different? i'm approximately 90% sure it's not an indentation error
02:39:15FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=nnYXvCqQ
02:43:11FromDiscord<mjsdev> Silly question... if a proc receives a ref object as immutable and I do `var param = param` -- is that creating a copy that is mutable?
02:52:58FromDiscord<demotomohiro> It create a copy of the ref. It doesn't copy a what the ref points to.
02:55:51FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=YNnTMrDo
03:04:10*rockcavera quit (Remote host closed the connection)
03:23:29FromDiscord<carrocho> In reply to @demotomohiro "Following changes fixed the": You're an angel, it worked but I think now I`m not initializing the objects correctly. Can you try running the Main and choosing 1 or 2 in the options. I am getting this error. I update the repository on gitHub https://media.discordapp.net/attachments/371759389889003532/1333276165896536154/image.png?ex=67984db1&is=6796fc31&hm=b3196b87def4a070fbc82aaf561bc4f13b2a66e79b78a6d12be7a2
03:35:37FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=igpbXicm
03:36:11FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=DVsqCUiR
04:09:50FromDiscord<carrocho> In reply to @demotomohiro "You can intialize fields": thanks again bro, I'll finnish tomorrow, do you know how to make a try/except?
04:12:17FromDiscord<haniel.> ty @demotomohiro ↵you are "pika" in portuguese that means "a legend", its a expression
04:23:11FromDiscord<demotomohiro> In reply to @carrocho "thanks again bro, I'll": https://nim-lang.org/docs/manual.html#exception-handling
04:23:53FromDiscord<carrocho> In reply to @demotomohiro "https://nim-lang.org/docs/manual.html#exception-han": i love u
04:24:06FromDiscord<demotomohiro> no problem.
04:45:47*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
04:50:10*SchweinDeBurg joined #nim
05:36:45FromDiscord<xtrayambak> In reply to @battery.acid.bubblegum "also it's 'Nim', not": Isn't that an IBM thing? :P
05:38:03FromDiscord<xtrayambak> In reply to @elegantbeef "Interesting Nim in educational": I've never seen any college teach Nim before, this is interesting :P
05:41:10FromDiscord<xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=ymWqYldk
05:41:50FromDiscord<Elegantbeef> You can annotate them but they're not tracked so it doesn't matter
05:41:51FromDiscord<xtrayambak> `{.raises: [XYZDefect].}` creates a compiler warning (XCannotRaiseY) but I'd like to let people know which defects a procedure can raise
05:42:03FromDiscord<xtrayambak> (edit) "`{.raises: [XYZDefect].}` creates a compiler warning (XCannotRaiseY) but I'd like to let people know which defects a procedure can raise ... " added "without a compile time warning"
05:44:47FromDiscord<xtrayambak> In reply to @aintea "Anyone know when I": I use `arg.func` if I want to treat it like a property getter, `arg.func()` if I want to treat it like a function that is being called. I barely use `func(arg)`.
05:45:35FromDiscord<Elegantbeef> `echo` is one of the few I always use in C style
07:39:11FromDiscord<janakali> I usually use `func(arg)` for procedural style, where argument is treated as option/config, `arg.func()` for functions that operate on argument data and `arg.func` for property-like values.↵E.g. `doWork(fast=true)`, `deck.shuffle()`, `board.len`
07:43:18FromDiscord<janakali> ElegantBeef, `echo "I like command style more"`
08:33:12FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=MdyEtWBD
08:41:27*hohlerde joined #nim
08:42:28*beholders_eye joined #nim
08:55:52FromDiscord<albassort> is there a way for nim to detect and recompile c files
08:56:21FromDiscord<albassort> using {.compile.}
09:00:15FromDiscord<albassort> hmm
09:00:32FromDiscord<albassort> it calculates a sha1 apparently. Its working now, make its intermediate
09:05:21*SchweinDeBurg quit (Ping timeout: 244 seconds)
09:08:31*SchweinDeBurg joined #nim
09:15:29FromDiscord<vindaar> sent a long message, see https://pasty.ee/zogXGMNb
09:18:04FromDiscord<xtrayambak> In reply to @vindaar "there are many Nims:": there's also a plant called nim where I live, but it's pronounced niim, not nim
09:24:18*SchweinDeBurg quit (Ping timeout: 265 seconds)
09:24:34FromDiscord<demotomohiro> In reply to @vindaar "there are many Nims:": https://developer.nvidia.com/nim↵> NVIDIA NIM for Developers
09:25:47*SchweinDeBurg joined #nim
10:18:20FromDiscord<albassort> are sockets safe to be global gc?
10:50:58*hohlerde quit (Quit: Connection closed for inactivity)
10:52:12*Jjp137 quit (Ping timeout: 272 seconds)
10:52:31*Jjp137 joined #nim
11:08:10FromDiscord<albassort> eh doing a channel + thread is faster
11:26:13ehmryis mips being tested? I'm getting what looks like memory corruption with tagged unions
11:50:06ehmryor memory corruption in general
13:10:32FromDiscord<michael.lenz.> In reply to @demotomohiro "https://developer.nvidia.com/nim > NVIDIA NIM": Is it really related to nim? I can’t find any reference to nimlang
13:12:59FromDiscord<nnsee> In reply to @michael.lenz. "Is it really related": no, it's just named the same
13:23:42FromDiscord<zumi.dxy> what if there's a nim interface to NIM 🤔
13:24:21Amun-Rayo dawg […]
15:55:58FromDiscord<xtrayambak> In reply to @ehmry "is mips being tested?": I don't think so.
15:56:23FromDiscord<xtrayambak> It shouldn't really matter as long as you have a proper MIPS C compiler if I'm not wrong
15:56:37FromDiscord<xtrayambak> there's a few CPU specific things but tagged unions are probably not one of them
17:23:22*om3ga quit (Ping timeout: 252 seconds)
17:44:39*nyeaa49284230101 joined #nim
18:40:53*beholders_eye quit (Ping timeout: 248 seconds)
20:12:46FromDiscord<System64 ~ Flandre Scarlet> Nim has a real problem↵Why do I have many instances of Nim vampirizing all my RAM?
20:20:04FromDiscord<bosinski2023> In reply to @sys64 "Nim has a real": is it `nimsuggest` ?
20:29:10FromDiscord<Phil> In reply to @sys64 "Nim has a real": 99% chance you have multiple nimsuggest instances running, its infamous for this stuff
20:30:13FromDiscord<nervecenter> In reply to @sys64 "Nim has a real": It's nimsuggest, in your LSP config you have to tell nimsuggest what the root file of your project is plus a regex for matching any other sources. Then it'll try to use one instance. But it's wonky.
20:32:30FromDiscord<demotomohiro> Pull request to update Nim version on termux has been merged.↵https://github.com/termux/termux-packages/pull/23009↵It probably available on termux soon.
20:42:55FromDiscord<threefour> Is `std/paths` meant to be used only for file paths, or can it be used for URL path parsing?
20:51:30FromDiscord<Elegantbeef> You want `std/uri`
20:52:11FromDiscord<threefour> Yes, but once I pull the path string out of the `Uri` object, what's the best way to parse that?
20:55:01FromDiscord<Elegantbeef> What
20:55:01FromDiscord<Elegantbeef> That is how you parse it
20:55:01FromDiscord<Elegantbeef> https://nim-lang.org/docs/uri.html#parseUri%2Cstring
20:57:07FromDiscord<threefour> I'm not talking about the full URI. I'm already using `parseUri`. The `Uri.path` string is what I'm trying to parse now. There is the simple `/` operator defined in the `std/uri` module, but that's not enough path handling for my needs.
21:01:02FromDiscord<Elegantbeef> There are more complete URL parsers in the Nimble registry
21:16:05*rockcavera joined #nim
21:54:45*om3ga joined #nim
22:03:51FromDiscord<nnsee> In reply to @threefour "Is `std/paths` meant to": what exactly do you want to parse out of the path? parsing the path should be fairly simple - split by / and you're pretty much golden
22:47:31*beholders_eye joined #nim