<< 06-07-2022 >>

00:07:20*CyberTailor quit (Remote host closed the connection)
00:08:39*CyberTailor joined #nim
00:14:10*noeontheend quit (Ping timeout: 240 seconds)
00:16:34FromDiscord<morgan> so it’s symlinked from the normal path to where it is, yes? if it’s not finding it would that mean that nim isn’t following symlinks?
00:38:22FromDiscord<luteva> In reply to @NotFlawffles "the problem tho that": just use an alias. if you use ni for nim then you maybe won't get into trouble. 🙂↵Or use "not_nim_use_neovim_now" as an alias for neovim 😉
00:46:48FromDiscord<tangonov> In reply to @MorganAlyssa "so it’s symlinked from": Maybe, haven't had a chance to make sure I've covered every build substitution. Failing that I will need to think of my next move
01:32:04*bigbyt joined #nim
01:32:14bigbythello all
01:34:06bigbyttrying to install nimble on ubuntu from prebuilt binaries on the website, the nimble binary is throwing an error: 'could not import: SSL_get_peer_certificate'
01:34:42bigbytany advice?
01:54:46FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41IZ
01:55:00FromDiscord<zhmtzhmt> languge server failed to start
02:00:52FromDiscord<xflywind> In reply to @bigbyt "trying to install nimble": What's your ubuntu version? Nim doesn't have SSL 3 support => https://github.com/nim-lang/Nim/pull/19814
02:05:26FromDiscord<deadmeme77> In reply to @deadmeme77 "if anyone is interested,": I was able to solve that issue by doing this
02:05:50FromDiscord<deadmeme77> in Pop_OS! 22_04
02:08:27bigbyt@xflywind I'm using Ubuntu 22.04 LTS
02:10:33bigbytalso is there a way to compartmentalize package installations a la python's virtual environments?
02:10:45bigbytor ocaml's notion of compiler switches?
02:13:41FromDiscord<Elegantbeef> The latest nimble has lock files
02:17:12FromDiscord<xflywind> In reply to @bigbyt "<@658563905425244160> I'm using Ubuntu": There some instructions to install openssl 1.1 in ubuntu 22.04 => https://github.com/dom96/choosenim/issues/297#issuecomment-1125707998
02:36:33FromDiscord<b1rdf00d> my PR got merged 🙂 first time contributing to OSS! Thanks for the help Elegantbeef
02:36:46FromDiscord<Elegantbeef> Congrats
02:37:08FromDiscord<b1rdf00d> and thanks xflywind too 🙂
02:55:47FromDiscord<xflywind> In reply to @b1rdf00d "my PR got merged": Nice work!
02:56:21*ehmry quit (Ping timeout: 246 seconds)
03:20:35*arkurious quit (Quit: Leaving)
03:27:01*CyberTailor quit (Remote host closed the connection)
03:28:08*CyberTailor joined #nim
03:41:02*xet7 quit (Remote host closed the connection)
04:12:20FromDiscord<tangonov> In reply to @MorganAlyssa "so it’s symlinked from": I have substituted all of the hard-code paths that I could, wherever I believe they make sense. I would think this weren't following symlinks except that I can still run `nim c koch` outside of the guix build environment
05:08:24*toluene quit (Ping timeout: 244 seconds)
05:09:27*toluene joined #nim
05:47:05*toluene quit (Quit: Ping timeout (120 seconds))
05:49:04*toluene joined #nim
05:50:20FromDiscord<ripluke> Does Nim have something like a map
05:50:49FromDiscord<ripluke> Nvm they're called tables
06:09:34*noeontheend joined #nim
06:11:32FromDiscord<ripluke> Why doesn't createfile exist?
06:12:05FromDiscord<Elegantbeef> Cause you dont ever need to create a file
06:12:20FromDiscord<Elegantbeef> You just write to a file in one of the multiple ways and it creates it
06:12:38FromDiscord<ripluke> Oh so writeFile creates it too?
06:12:50FromDiscord<Elegantbeef> Be pretty useless if it didnt
06:12:59FromDiscord<ripluke> Oh lol thx
06:16:56*rockcavera quit (Remote host closed the connection)
07:06:43*noeontheend quit (Ping timeout: 244 seconds)
07:50:56FromDiscord<Phil> In reply to @b1rdf00d "and thanks xflywind too": I secretly maintain the stance that half this community secretly sings in their heads a version of "I'll make a man out of you": "I'll get contribs out of you"↵😄
07:51:08FromDiscord<Phil> (edit) "In reply to @b1rdf00d "and thanks xflywind too": I secretly ... maintain" added "(well, now publicly)"
07:51:52FromDiscord<Phil> But congratz to your contribution!↵Know how that feels, was pretty much where I was at around 4-5 months ago
07:56:52FromDiscord<ripluke> In reply to @b1rdf00d "my PR got merged": Lol nice
08:21:55FromDiscord<Transparent> In reply to @b1rdf00d "my PR got merged": github?
09:05:16FromDiscord<Xzayler> if I have `proc doThis(a: int, b: string, c: float) =`↵is there a way to give arguments in a different order? like `doThis(c,a,b)`?
09:09:27FromDiscord<phargob> hi noob question, how do i clear a seq?
09:12:00FromDiscord<Xzayler> In reply to @phargob "hi noob question, how": assign an empty sequence to the sequence variable
09:12:40FromDiscord<Xzayler> like `s = @[]` or something like that.
09:12:58FromDiscord<Xzayler> or maybe `s.setLen(0)`?
09:13:05FromDiscord<Xzayler> not sure which is more efficient
09:13:33FromDiscord<phargob> like to avoid memory allocation, I'll try both. thanks.
09:14:18NimEventerNew thread by Enthus1ast: Test for static in macro, see https://forum.nim-lang.org/t/9283
09:14:42FromDiscord<Xzayler> In reply to @phargob "like to avoid memory": sequences are dynamic and nim has garbage collection so I don't think you need to manage memory either way.
09:15:41FromDiscord<Xzayler> If you know the size of the sequence ahead and it doesn't change you can use arrays.
09:16:35FromDiscord<planetis> In reply to @phargob "hi noob question, how": setLen avoids the deallocation
09:18:31FromDiscord<phargob> ok thanks. that was what I was looking for.
09:20:33FromDiscord<phargob> I am probably over thinking memory since porting c++ code.
09:23:54FromDiscord<Yardanico> In reply to @Xzayler "if I have `proc": Yes, you can supply them with names
09:24:43FromDiscord<Yardanico> doThis(c = 0.5, a = 1, b = "hello")
09:25:27FromDiscord<Xzayler> In reply to @Yardanico "doThis(c = 0.5, a": oh that makes total sense
09:25:30FromDiscord<Yardanico> Or you can have a wrapper proc/template that uses the arguments in the order given
09:25:40FromDiscord<Yardanico> changes the order
09:26:14FromDiscord<Xzayler> the naming solution is perfect. Thank you.
09:31:25FromDiscord<Geiseric> Is it only me or Defender suddenly decided to flag every Nim binary? I can't seem to print an hello world anymore..
09:34:19FromDiscord<Phil> I... I do not understand. Prologue's wiki somehow does not respect markdown lists. As in, the entries are not properly listed below one another, they just straight up miss the linebreaks
09:35:03FromDiscord<enthus1ast> no this unfortunately a known issue↵(@Geiseric)
09:35:39FromDiscord<Geiseric> In reply to @enthus1ast "no this unfortunately a": Oh so, unless some rewrite happens, Nim doesn't really apper to be usable
09:36:18FromDiscord<enthus1ast> do not blame nim for this, blame your anti virus vendor for their to broad signatures↵(@Geiseric)
09:37:10*jmdaemon quit (Ping timeout: 240 seconds)
09:37:50FromDiscord<enthus1ast> one step could be to submit samples to your vendor
09:37:57FromDiscord<enthus1ast> for false positives
09:38:31FromDiscord<enthus1ast> and/or add exceptions in your anti virus
09:40:09FromDiscord<Geiseric> Lol i'm not blaming Nim, i know AV vendors are the issue here
09:40:28FromDiscord<Geiseric> In reply to @enthus1ast "and/or add exceptions in": Unfortunately this can't happen in corporate envs
09:40:48FromDiscord<xflywind> We really need an article to denounce these av vendors.
09:41:23FromDiscord<enthus1ast> then i do not understand what you mean by this↵(@Geiseric)
09:41:35FromDiscord<enthus1ast> this↵(@Geiseric)
09:42:02FromDiscord<enthus1ast> but yeah you're right, this is an annoying issue
09:42:39FromDiscord<dom96> In reply to @flywind "We really need an": This
09:42:43FromDiscord<Geiseric> That if I want to develop something at work, I can't do it because the moment the compiled file will touch my disk my AV will erase it, triggering an alarm that will pop SOC's ears and i'll get a call from Sec department asking what was i doing
09:43:07FromDiscord<dom96> Can you use WSL?
09:43:25FromDiscord<Geiseric> Nope unfortunately
09:43:34FromDiscord<Geiseric> And anyway binaries should do things on Windows
09:44:35FromDiscord<d4rckh> In reply to @flywind "We really need an": im not sure if that will change much
09:44:59FromDiscord<dom96> In reply to @d4rckh "im not sure if": It’s better than doing nothing
09:45:03*vicecea quit (Remote host closed the connection)
09:45:22FromDiscord<enthus1ast> maybe we can get some other smaller langs into the boat
09:45:28FromDiscord<enthus1ast> they suffer the same issues i guess
09:45:42FromDiscord<dom96> In reply to @Geiseric "And anyway binaries should": Yeah, I understand. It really sucks this happens :/
09:45:59*vicecea joined #nim
09:46:10FromDiscord<enthus1ast> @Geiseric\: one thing to try is to use another compiler
09:46:17FromDiscord<d4rckh> i was surprised to see nim is 14 years old and so small at the same time 😅
09:46:20FromDiscord<enthus1ast> maybe visual c or zig or so
09:46:21FromDiscord<xflywind> In reply to @d4rckh "im not sure if": At least let their lives a bit harder when Nim suffers from their discrimination 🥳
09:46:48FromDiscord<Geiseric> In reply to @enthus1ast "maybe visual c or": Could be a thing, but at this point i guess imma go back to C++ or learn C#
09:47:30FromDiscord<d4rckh> i mean even go is newer
09:47:35FromDiscord<enthus1ast> this is unfortunate but understandable
09:47:44FromDiscord<ieltan> Zig get flagged or not?
09:47:55FromDiscord<enthus1ast> think the issue is with mingw
09:48:28FromDiscord<xflywind> Even C or Go get flagged from times to times.
09:48:36FromDiscord<xflywind> (edit) "get" => "gets"
09:49:26FromDiscord<enthus1ast> antivirus == snake oil == Shark Fin Soup
10:26:31FromDiscord<Phil> Btw xflywind, thanks for bearing with me through all the spammy pr's
10:26:53FromDiscord<bariali07> hi
10:28:43FromDiscord<aru-hackZ> In reply to @d4rckh "i was surprised to": and python is like 30y old
10:42:20FromDiscord<Phil> Heya bariali
10:47:10FromDiscord<xflywind> In reply to @Isofruit "Btw xflywind, thanks for": Not at all. I'm glad to merge them 😁
10:48:34FromDiscord<dain> are there benchmarks anywhere for nimscript
10:50:18FromDiscord<xflywind> I don't think there are.
10:52:04FromDiscord<dain> mayb I will do some .....
10:53:18FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=41KA
11:16:48*lumo_e joined #nim
11:24:01FromDiscord<b1rdf00d> In reply to @Isofruit "I secretly (well, now": 😄 this was 100% self motivated (I think)
11:24:08FromDiscord<b1rdf00d> In reply to @Transparent "github?": yep!
11:54:45FromDiscord<Josef> Is it possible to call CRT function `_controlfp` from Nim?
12:09:22*ehmry joined #nim
12:14:52FromDiscord<ezquerra> In reply to @flywind "Even C or Go": I occasionally get false positives for Python programs generated with pyinstaller. That being said it is much less frequent than with nim
12:41:29*dmichiels left #nim (#nim)
12:41:45FromDiscord<Josef> sent a code paste, see https://play.nim-lang.org/#ix=41KW
12:50:22*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
12:50:25*wallabra_ joined #nim
12:51:17FromDiscord<demotomohiro> How `byte` type is typedefed in your C code?
12:51:38*wallabra_ is now known as wallabra
12:51:38FromDiscord<Josef> uint8
12:53:21FromDiscord<Josef> (edit) "uint8" => "unsigned char"
12:53:23FromDiscord<fwsgonzo> is there a way to resize a string?
12:53:26FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=41KY
12:53:38FromDiscord<demotomohiro> `setLen` resizes string
12:54:59FromDiscord<demotomohiro> you can use `setLen` to resize both string and seq.
12:55:19FromDiscord<Rika> In reply to @Josef "How would you rewrite": Kinda strange to take in a pointer to an integer when you’re not doing anything to the pointer
12:56:57*noeontheend joined #nim
12:57:27FromDiscord<fwsgonzo> Many thanks! I was looking hard for resize, but setLen was it!
12:59:08FromDiscord<Josef> sent a code paste, see https://play.nim-lang.org/#ix=41L1
12:59:24FromDiscord<Rika> That’s not what your code does
12:59:32FromDiscord<Rika> It dereferences the parameter then adds five
12:59:54FromDiscord<phargob> the code is very likely to seg fault unless param is address into the stack or heap.
12:59:57FromDiscord<Josef> Yea, but it is casted to byte pointer right after.
13:00:09FromDiscord<Rika> That’s true
13:00:22FromDiscord<Rika> I missed that
13:00:36FromDiscord<Rika> So the integer is a pointer itself?
13:00:53FromDiscord<Rika> In that case it’s unsafe to use int
13:01:18FromDiscord<capocasa> sent a code paste, see https://play.nim-lang.org/#ix=41L3
13:02:20*hc0re joined #nim
13:04:14FromDiscord<demotomohiro> How about to use array? If it is static, sizeof that seq is determined at compile time.
13:05:19FromDiscord<Rika> Size is compile time but not value per se
13:05:26FromDiscord<Rika> I assume he wants values defined by CT
13:07:07FromDiscord<Josef> So like: `f(param: ptr array[5,byte]): byte = param[][5] and 2?`
13:08:39FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=41L5
13:10:12FromDiscord<capocasa> sent a long message, see http://ix.io/41L6
13:10:55FromDiscord<fwsgonzo> Assuming that I have a string that is an HTTP header like "X-Field: Value", how do I get the Value part?
13:12:33FromDiscord<aru-hackZ> you could use regex or a split
13:12:46FromDiscord<enthus1ast> https://nim-lang.org/docs/httpcore.html#parseHeader%2Cstring
13:13:10FromDiscord<aru-hackZ> that's even better
13:13:15FromDiscord<Rika> In reply to @capocasa "<@259277943275126785> yes exactly ": Josef was replying for his question, Tomohiro’s answer doesn’t have compile time values
13:13:27FromDiscord<Rika> Oh I misread
13:13:33FromDiscord<Rika> I missed the other static
13:13:37FromDiscord<Rika> Then yes that works
13:14:28FromDiscord<fwsgonzo> Thanks, that's very handy
13:15:20FromDiscord<aru-hackZ> yh, didn't know abt it
13:17:18FromDiscord<capocasa> @demotomohiro Hm disadvantage of the generic `static int` is that I need to explicitly specify it if there are additional generics. Might there be an option that does not require that?
13:18:42FromDiscord<capocasa> @demotomohiro This does not compile if there are additional generics: `foo[Foo](["bar"])` but this does `foo[Foo, static int](["bar"])` which works but makes the api a little baroque
13:19:21FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41L9
13:20:36FromDiscord<PyryTheBurger> how do i check if a property of an object is nil
13:20:41FromDiscord<PyryTheBurger> or havent set it
13:21:14FromDiscord<enthus1ast> .isNil
13:21:40FromDiscord<enthus1ast> then its the default value of the type↵(@PyryTheBurger)
13:22:15FromDiscord<PyryTheBurger> sent a long message, see http://ix.io/41La
13:22:24FromDiscord<enthus1ast> not all types in nim can be nil
13:22:37FromDiscord<enthus1ast> what is Texture?
13:22:39FromDiscord<PyryTheBurger> soooooo how do i check it
13:22:43FromDiscord<PyryTheBurger> its a raylib type
13:23:26FromDiscord<enthus1ast> maybe test for myobj.mytexture == Texture()
13:25:08FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=41Lb
13:25:22FromDiscord<zhmtzhmt> how to resize a seq? or how to preserve space?
13:25:29FromDiscord<aru-hackZ> .setLen
13:25:30*noeontheend quit (Ping timeout: 240 seconds)
13:25:39FromDiscord<zhmtzhmt> Thanks!!!
13:26:06FromDiscord<demotomohiro> In reply to @zhmtzhmt "how to resize a": Please read this section: https://nim-lang.github.io/Nim/system.html#system-module-seqs
13:26:09FromDiscord<capocasa> In reply to @demotomohiro "These works without explicitly": Thank you very much! The catch is I wanted to specify parameters directly, but only Foo.
13:26:13FromDiscord<capocasa> In reply to @demotomohiro "Please read this section:": I will!
13:27:41FromDiscord<enthus1ast> @PyryTheBurger\: but it might be better when you do not have to test in the first place
13:27:57FromDiscord<PyryTheBurger> what do you mean
13:28:19FromDiscord<enthus1ast> create the objects with the Texture
13:28:37FromDiscord<PyryTheBurger> if i didnt specify a texture in the object then i want to draw a rectangle else i draw the texture
13:28:40FromDiscord<capocasa> In reply to @demotomohiro "Please read this section:": I'd already tried `newSeq[string]().static` but same issue as with the `@[]`. Openarray would be fine too... but really great learning with the array length in the generic
13:29:14FromDiscord<demotomohiro> In reply to @capocasa "I will!": That is reply to @zhmtzhmt
13:29:20FromDiscord<Rika> Setting the length of a sequence does not reduce the memory allocated
13:29:40FromDiscord<Rika> Sequences never shrink as implemented now
13:30:27FromDiscord<zhmtzhmt> I see
13:30:41FromDiscord<zhmtzhmt> I want more space
13:31:00FromDiscord<enthus1ast> @PyryTheBurger\: in addition to == Texture() ; you could maybe test for mytexture.id == 0 but i do not know if it starts with 0 https://github.com/greenfork/nimraylib_now/blob/3207f457be0f3204df15a1367111159d3c888c4c/src/nimraylib_now/mangled/raylib.nim#L224
13:31:03FromDiscord<zhmtzhmt> Thank you for explanation.
13:32:35FromDiscord<Rika> In reply to @zhmtzhmt "I want more space": Do you need it
13:32:44FromDiscord<Rika> Are you in an embedded context
13:35:33FromDiscord<capocasa> sent a code paste, see https://play.nim-lang.org/#ix=41Lf
13:37:07FromDiscord<Transparent> Opinions on Nim? I am coming from C (noobish), PY, & V Dev. My goto lang is V then PY
13:37:32FromDiscord<PyryTheBurger> nim is cool but i am noob lol
13:38:21FromDiscord<Transparent> it looks cool. a bit of Python with type declaration (syntax wise)
13:38:56FromDiscord<PyryTheBurger> yeah and compiles to c and optional garbage collector (idk how that is good though)
13:43:21FromDiscord<zhmtzhmt> @Rika I am developing game, serializing and deserializing seq of objects. I need to preserve memory when deserializing seq.
13:43:30FromDiscord<xflywind> Nim doesn't need to use a gc collectors. It supports multiple memory management: Arc/Orc, boehm and so on.
13:43:41FromDiscord<Rika> If you’re not going to keep the sequence then it will be garbage collected
13:43:46FromDiscord<xflywind> (edit) "collectors." => "collector."
13:43:48FromDiscord<aru-hackZ> for game dev and embedded, GC is bad
13:43:52FromDiscord<PyryTheBurger> i thought nim has garbage collector 😦
13:44:01FromDiscord<Rika> In reply to @aru-hackZ "for game dev and": Only certain GCs are
13:44:04FromDiscord<PyryTheBurger> i love garbage collector
13:44:04FromDiscord<aru-hackZ> it has, but you can turn it off
13:44:14FromDiscord<Rika> In reply to @aru-hackZ "it has, but you": Which is never recommended
13:44:21FromDiscord<PyryTheBurger> i hate manual memory management
13:44:26FromDiscord<aru-hackZ> In reply to @Rika "Only certain GCs are": yh
13:44:37FromDiscord<zhmtzhmt> I thinking refc should be enough.
13:44:46FromDiscord<Rika> In reply to @aru-hackZ "yh": Nim’s default GC is okay for game development
13:44:48FromDiscord<xflywind> Arc/Orc is going to be the default memory management option in v2.
13:45:25FromDiscord<aru-hackZ> In reply to @Rika "Nim’s default GC is": dk much abt nim and the GCs it offers, still a noob learning
13:46:01FromDiscord<Rika> Just trust most of us with what we say, someone else is bound to correct the dumbass (<—) when they’re wrong
13:46:07FromDiscord<zhmtzhmt> thread-islolated should be ok., just like lua does.
13:46:58FromDiscord<enthus1ast> the GC debates are always entertaining; i would recommend to build your game first, and make it fun, then see if it uses to much memory \:)
13:47:08FromDiscord<zhmtzhmt> and struct in nim can be embed in gc'ed object, so gc'ed objets will much less.
13:47:27FromDiscord<aru-hackZ> In reply to @zhmtzhmt "thread-islolated should be ok.,": iirc if you create threads, one thread can not access other's memory, you should use a channel or global vars
13:47:33FromDiscord<PyryTheBurger> i love to put memory leaks in my games because idk how to prevent them
13:47:47FromDiscord<zhmtzhmt> game client is single threaded.
13:48:09FromDiscord<enthus1ast> ok its a simple game then ;)↵(@zhmtzhmt)
13:48:12FromDiscord<zhmtzhmt> server is multi-threaded, tunnel will used.
13:48:22FromDiscord<enthus1ast> even for audio you'll need a thread
13:48:45FromDiscord<aru-hackZ> and user input
13:49:09FromDiscord<zhmtzhmt> game client is working in unity( which is a popular game engine.)
13:50:00FromDiscord<zhmtzhmt> the game engine handled all multithreaded things, I just write game logic in one thread.
13:50:48FromDiscord<enthus1ast> i see and you write the server in nim?
13:50:58FromDiscord<zhmtzhmt> Yes
13:51:07FromDiscord<zhmtzhmt> client and server.
13:51:39FromDiscord<zhmtzhmt> I want to share code possibly
13:51:56FromDiscord<enthus1ast> so you rewrite the client from unity to nim?
13:52:49FromDiscord<zhmtzhmt> It is writen in c++ before. but I am tired of memory management,
13:52:55FromDiscord<enthus1ast> we also have a game development nim channel btw
13:53:06FromDiscord<zhmtzhmt> I burns my brain.
13:53:40FromDiscord<zhmtzhmt> So I want to wapp legacy c++ in nim.
13:53:52FromDiscord<xflywind> You can also try Orc.
13:54:26FromDiscord<zhmtzhmt> Can I swich gc freely?
13:54:55*hc0re quit (Remote host closed the connection)
13:55:03FromDiscord<xflywind> Yeah it should. Use --mm:orc if you are on 1.6.x/devel version.
13:55:15*hc0re joined #nim
13:55:25FromDiscord<zhmtzhmt> Great!
13:55:58FromDiscord<zhmtzhmt> I will try different gc if I find long gc pause.
13:56:31FromDiscord<enthus1ast> the arc/orc should not pause like the default one
13:56:47*derpydoo joined #nim
13:57:14FromDiscord<zhmtzhmt> if pause < 20 ms , it is acceptable for me.
13:57:16*arkurious joined #nim
13:57:33FromDiscord<zhmtzhmt> fps 60 is enough.
13:58:05FromDiscord<zhmtzhmt> I have read document, refc' gc pause < 1ms
13:58:45FromDiscord<xflywind> Yeah, this is the ;atest docs regarding memory management => https://nim-lang.org/docs/mm.html
13:58:49FromDiscord<xflywind> (edit) ";atest" => "latest"
13:59:19FromDiscord<zhmtzhmt> I have read it.
13:59:44FromDiscord<zhmtzhmt> I prefer thread-isoloated gc
14:00:57FromDiscord<zhmtzhmt> may be ORC ARC is a good choice for client.
14:01:02FromDiscord<Transparent> yo
14:01:48FromDiscord<zhmtzhmt> Thanks for your guys help.
14:01:51FromDiscord<Transparent> What language can you use with Nim?
14:02:11FromDiscord<zhmtzhmt> c c++
14:02:22FromDiscord<Transparent> c++ fr?
14:02:22FromDiscord<xflywind> lua, C, C++, Js, Go, objectC, Python
14:02:28FromDiscord<Transparent> no way?
14:02:46FromDiscord<Transparent> can i get docs to this ?
14:02:53FromDiscord<zhmtzhmt> ffi
14:03:01FromDiscord<xflywind> (edit) "Python" => "Python, julia"
14:03:13FromDiscord<zhmtzhmt> https://scripter.co/binding-nim-to-c-plus-plus-std-list/#test-c-plus-plus-code
14:03:51FromDiscord<zhmtzhmt> https://livebook.manning.com/book/nim-in-action/chapter-8/
14:04:19FromDiscord<xflywind> c2nim support generates C++ warpper => https://github.com/nim-lang/c2nim
14:04:30FromDiscord<xflywind> (edit) "support generates" => "supports generating"
14:04:35FromDiscord<xflywind> (edit) "warpper" => "wrapper"
14:04:48FromDiscord<zhmtzhmt> c2nim is pretty nice, it help me a lot.
14:04:57FromDiscord<xflywind> https://github.com/n0bra1n3r/cinterop => About↵A C/C++ interop library for the Nim programming language
14:05:24FromDiscord<xflywind> In reply to @zhmtzhmt "c2nim is pretty nice,": I used futark which supports "simply import C header files directly into Nim". It is greate too!
14:05:50FromDiscord<Phil> In reply to @Transparent "can i get docs": For python, look at GitHub for the nimpy package. Allows trivial usage of nim in python and vice versa
14:06:04FromDiscord<Phil> Oh wow my internet is crap
14:06:33FromDiscord<Transparent> hmmm
14:06:59FromDiscord<zhmtzhmt> @xflywind awsome!
14:07:16FromDiscord<xflywind> I have an excerpt for these interoperability => https://dev.to/xflywind/nim-a-modern-glue-language-like-python-3270
14:11:01FromDiscord<Phil> In reply to @Transparent "hmmm": Sidenote, if you want to spend the time, I can recommend giving 2 articles from demotomohiro a read about how nim relates to c/GCC. I'm on phone atm so I can't throw in the link, but I did get them linked to me in the offtopic channel recently so shouldn't be too hard to find
14:11:46FromDiscord<Phil> Helped me, but I had little to no understanding of c etc beforehand
14:15:31FromDiscord<Transparent> welp. im stuck on should i learn the lang or have time for it
14:18:24FromDiscord<Phil> I use it for webdev and have a lot of fun. It's become my general purpose lang if I'm not forced into any other ecosystem since it can be damn fast if you optimize a bit
14:18:42FromDiscord<Phil> That's all I can say regarding that
14:19:33FromDiscord<retkid> conconcatting arrays in arraymancer is a bit... slow
14:19:46FromDiscord<retkid> its a but o(n^2)
14:19:49FromDiscord<retkid> (edit) "but" => "bit"
14:21:15FromDiscord<retkid> especially when the arrays will be about 54,125,412 values
14:21:25FromDiscord<Transparent> LOL
14:21:46FromDiscord<Transparent> In reply to @Isofruit "I use it for": web dev? hmm
14:22:09FromDiscord<retkid> so is there anyway to add values to a tensor in an array mancer that wont take about 2000 years
14:22:16*derpydoo quit (Ping timeout: 244 seconds)
14:23:02FromDiscord<xflywind> You probably need to ask on science channel.
14:23:12FromDiscord<Transparent> procs are functions?
14:23:17FromDiscord<xflywind> (edit) "You probably need to ask on ... science" added "the"
14:24:58FromDiscord<retkid> nim has both
14:25:11FromDiscord<retkid> procedures and funcs are not the same in nim
14:25:38FromDiscord<retkid> funcs are sideaffectless functions
14:25:39FromDiscord<retkid> or well
14:25:42FromDiscord<retkid> functional functions
14:25:58FromDiscord<ieltan> procs have side effect and dont return values
14:26:15FromDiscord<xflywind> ?
14:26:26FromDiscord<ieltan> isnt it correct ?
14:26:32FromDiscord<retkid> procs return values
14:26:57FromDiscord<ieltan> doh
14:28:51FromDiscord<Phil> In reply to @ieltan "procs have side effect": Procs are allowed to have side effects. They don't have to, but can. Function enforced not having side effects
14:29:05FromDiscord<Phil> (edit) "enforced" => "enforces"
14:30:00FromDiscord<xflywind> In reply to @Transparent "welp. im stuck on": Nim is a small low level programming language compiling to C and has many optimizations, move semantics, return value optimizations and automatic memory management without gc.
14:30:37FromDiscord<xflywind> (edit) "gc." => "gc etc."
14:30:50FromDiscord<Phil> In reply to @Transparent "web dev? hmm": I do webdev for a living, that's why I chose that type of project. The fact I can use what amounts to a c equivalent for this and it is not painful is pretty bonkers so far
14:31:13FromDiscord<Phil> (edit) "In reply to @Transparent "web dev? hmm": I do webdev for a living, that's why I chose that type of project. The fact I can use what amounts to a c equivalent for this and it is not painful ... is" added ", fun even,"
14:34:50FromDiscord<Phil> In reply to @ieltan "doh": Basically, a proc can do everything a func can, be since funcs are more narrowly defined. But by being more narrowly defined you can get guarantees which are important for e.g functional programming
14:35:02*noeontheend joined #nim
14:35:07FromDiscord<Phil> (edit) removed "be"
14:36:54FromDiscord<PyryTheBurger> sent a long message, see http://ix.io/41Lw
14:37:18FromDiscord<PyryTheBurger> but the text and pressed methods are what i provide?
14:37:23*derpydoo joined #nim
14:38:25FromDiscord<xflywind> echo rect and result.rect?
14:42:32*rockcavera joined #nim
14:42:32*rockcavera quit (Changing host)
14:42:32*rockcavera joined #nim
14:46:06FromDiscord<PyryTheBurger> (0.0, 0.0, 0.0, 0.0
14:46:08FromDiscord<PyryTheBurger> )
14:46:55FromDiscord<PyryTheBurger> or in the methd theyre good but when i try to use them theyre 0
14:49:11FromDiscord<PyryTheBurger> when i remove 1 variable from the type the rect works??????
14:50:40*noeontheend quit (Ping timeout: 244 seconds)
14:55:43FromDiscord<PyryTheBurger> well, i suppose the rectangle works as a position as well, but i dont understand that... do objects have a limited amount of usable variables?
14:58:04FromDiscord<PyryTheBurger> so only 4 usable variables in an object damn
15:14:45FromDiscord<enthus1ast> no, as i also told you last time↵(@PyryTheBurger)
15:15:48FromDiscord<enthus1ast> can you find the position in your code, when the rect is all 0?
15:16:23FromDiscord<enthus1ast> this or please share example code
15:16:50FromDiscord<enthus1ast> you can put longer snippets on https://play.nim-lang.org/
15:18:54*kenran joined #nim
15:22:14*v9fk quit (Ping timeout: 268 seconds)
15:26:50FromDiscord<PyryTheBurger> sent a long message, see https://paste.rs/XC0
15:27:08FromDiscord<Geiseric> I've made a weird "discovery" and I'm quite unsure about it. So basically, my Kali produces nim binaries that gets flagged, my ubuntu binaries instead, dont' get flagg my AV. Moreover, size is different. Any possible ideas about it?
15:27:34FromDiscord<enthus1ast> please update your post so that it is properly formatted
15:27:58FromDiscord<Geiseric> (edit) "I've made a weird "discovery" and I'm quite unsure about it. So basically, my Kali produces nim binaries that gets flagged, my ubuntu binaries instead, dont' get flagg my AV. Moreover, size is different. Any possible ideas about it? ... " added "Ofc same exact nim version, source and compiler flags."
15:29:21FromDiscord<enthus1ast> different c compiler and version?↵(@Geiseric)
15:29:54FromDiscord<Geiseric> I reinstalled the C compiler in both, but my kali could still have something off
15:30:09FromDiscord<enthus1ast> clang vs gcc ?
15:30:17FromDiscord<Geiseric> mingw with both
15:30:21FromDiscord<Geiseric> and both gcc
15:31:25FromDiscord<enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/994263341029658634): @PyryTheBurger\: please update your post so that it is properly formatted
15:32:45FromDiscord<PyryTheBurger> What
15:33:39FromDiscord<enthus1ast> image.png https://media.discordapp.net/attachments/371759389889003532/994264875780022302/image.png
15:33:56FromDiscord<enthus1ast> put it on https://play.nim-lang.org/
15:38:24FromDiscord<Phil> In reply to @PyryTheBurger "What": Or copy paste it here, enclosed by 3 backticks on each side to keep spacing etc
15:39:05FromDiscord<PyryTheBurger> Sorry im on a phone now but i will when i get back to a computer
15:40:31NimEventerNew thread by Dom96: Choosenim 0.8.4 now available, see https://forum.nim-lang.org/t/9285
15:56:37*derpydoo quit (Quit: derpydoo)
16:02:41*v9fk joined #nim
16:59:05FromDiscord<jmgomez> When using Table in a static type for a Macro, it gives me an error. Is that expected?
16:59:32FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=41Md
16:59:38FromDiscord<jmgomez> If I commented it, the macro works just ine
16:59:45FromDiscord<jmgomez> (edit) "ine" => "fine"
17:03:58FromDiscord<PyryTheBurger> In reply to @Isofruit "Or copy paste it": my entire button module: https://play.nim-lang.org/#ix=41Mh why does it limit the working variables to 4
17:16:37FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=41Mi
17:18:37FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=41Mi" => "https://play.nim-lang.org/#ix=41Mj"
17:25:11FromDiscord<Rika> uds is below the layer of http
17:25:18FromDiscord<Rika> so you use raw sockets for those i believe
17:29:11CyberTailordo you know any threadpool alternatives?
17:32:11FromDiscord<aru-hackZ> In reply to @PyryTheBurger "my entire button module:": not sure but, iirc you can only change an object's attributes inside procs when it's a `ref object`, if that's what you mean
17:33:25FromDiscord<Yardanico> you can just use `var Type` to mutate a normal object in a proc
17:33:40FromDiscord<Yardanico> as the argument type
17:33:53FromDiscord<lantos> In reply to @Rika "so you use raw": yeah they are lower level but I've seen some things have now started to do this http://unix:/↵thing like insomnia/postman
17:34:16FromDiscord<Yardanico> In reply to @PyryTheBurger "my entire button module:": what exactly do you mean?
17:34:25FromDiscord<Yardanico> i mean what doesn't work
17:34:42FromDiscord<aru-hackZ> In reply to @Yardanico "you can just use": true, that's another way
17:41:51FromDiscord<PyryTheBurger> In reply to @Yardanico "what exactly do you": when i have over 5 variables in a type, only 4 of them are not 0 in my other code even though i make them to be something other and there is no errors though
17:42:23FromDiscord<Yardanico> i still can't quite understand you, but your code does have some logic errors
17:42:34FromDiscord<PyryTheBurger> no it doesnt for me
17:42:35FromDiscord<Yardanico> e.g. `buttonSelected = buttons[selectedButton]` in updateButtons will make a copy of a button
17:42:46FromDiscord<PyryTheBurger> yeah its purpose
17:42:50FromDiscord<Yardanico> so if you then modify buttonSelected it won't modify the button in `buttons`
17:42:58FromDiscord<Yardanico> In reply to @PyryTheBurger "yeah its purpose": when what's the problem? can you maybe show what you want with code?
17:42:59FromDiscord<PyryTheBurger> i dont need to modify it
17:44:46FromDiscord<enthus1ast> @PyryTheBurger\: i do not see an error in the code you send that could do this error
17:44:58FromDiscord<enthus1ast> Rect is all 0 error
17:46:24FromDiscord<PyryTheBurger> In reply to @Yardanico "when what's the problem?": problem: https://play.nim-lang.org/#ix=41Mt
17:46:34FromDiscord<enthus1ast> Where do you construct the buttons seq?
17:46:48FromDiscord<PyryTheBurger> menu.nim
17:47:08FromDiscord<PyryTheBurger> sent a long message, see http://ix.io/41Mu
17:48:19FromDiscord<enthus1ast> Then buttonSeq1 is empty?
17:48:32FromDiscord<PyryTheBurger> no
17:48:42FromDiscord<PyryTheBurger> later buttonSeq1.add(button1)↵buttonSeq1.add(button2)↵buttonSeq1.add(button3)
17:48:45FromDiscord<Josef> Does Nim have repl?
17:50:22*hc0re quit (Read error: Connection reset by peer)
17:50:25FromDiscord<enthus1ast> Not in the ipython sense↵(@Josef)
17:50:31FromDiscord<enthus1ast> inim
17:50:33*hc0re joined #nim
17:51:00FromDiscord<enthus1ast> Is a small repl, but it's not really needed since nim is so strongly typed
17:55:40FromDiscord<Phil> I use it regularly!
17:56:20FromDiscord<Phil> Typically to test out 3 line behaviour, after that I start copy pasting code into my playground project
17:56:49FromDiscord<Phil> There's also nim secret
17:59:25FromDiscord<Josef> In reply to @enthus1ast "Is a small repl,": That's not why you need a repl.
17:59:50FromDiscord<demotomohiro> If you use vim, it is easy to test a few line of code with this plugin. It works on termux on android.↵https://github.com/rhysd/wandbox-vim
18:06:05FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=41MA
18:07:32FromDiscord<Josef> How can I print bit representation of a number?
18:10:20FromDiscord<jan0809> inim works well in termux too https://media.discordapp.net/attachments/371759389889003532/994304305538539560/IMG_20220706_200953.jpg
18:14:25FromDiscord<Rika> In reply to @Josef "How can I print": representation in what
18:14:48FromDiscord<jan0809> in bits (?)
18:14:57FromDiscord<Josef> Found it.
18:17:27FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=41MG
18:17:51FromDiscord<jan0809> good to know ig
18:18:06FromDiscord<Yardanico> or use toBin from strutils
18:36:53*xigoi joined #nim
19:08:17*Jjp137 quit (Quit: Leaving)
19:11:05*Jjp137 joined #nim
19:12:33FromDiscord<ripluke> In reply to @Isofruit "I use it regularly!": Yup
19:13:04FromDiscord<ripluke> Very useful to test the output of some procs without making a whole new file and doing it that way
19:13:39*kenran quit (Quit: WeeChat info:version)
19:14:47*hc0re quit (Ping timeout: 256 seconds)
19:18:39*pro joined #nim
19:35:53FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=41N9
19:48:52*krux02 joined #nim
19:49:10*lumo_e quit (Ping timeout: 240 seconds)
19:57:56FromDiscord<jan0809> why would one use curl for sockets?↵isnt there some async implementation in std?
20:04:42FromDiscord<jan0809> in `std/net`
20:18:27*kenran joined #nim
20:20:22*kenran quit (Client Quit)
20:35:49*pro quit (Quit: pro)
20:42:13*CyberTailor left #nim (Konversation terminated!)
20:42:58*noeontheend joined #nim
20:53:59*tafa quit (Quit: ZNC - https://znc.in)
20:56:00*tafa joined #nim
21:08:40*lumo_e joined #nim
21:15:41*jmdaemon joined #nim
21:29:50*lumo_e quit (Ping timeout: 240 seconds)
21:31:06*noeontheend quit (Ping timeout: 244 seconds)
21:34:38FromDiscord<lantos> Thats what I'm trying to use the std/net but I'm getting ↵bad file descriptor with unix sockets so I was going to see if there is another way/how curl does it.
21:51:11*lumo_e joined #nim
21:55:51*lumo_e quit (Client Quit)
22:23:40FromDiscord<dom96> another option is implementing unix socket support for std/httpclient
22:40:01*krux02 quit (Remote host closed the connection)
22:50:43FromDiscord<bariali07> Is it possible to study two or more programming languages at the same time?
22:51:07FromDiscord<Elegantbeef> If you have twice the time of course
22:51:16*toulene joined #nim
22:51:51*toulene quit (Remote host closed the connection)
22:53:26FromDiscord<!Patitotective> twice the mind
22:55:06FromDiscord<Elegantbeef> Now whenever someone joins the matrix room i'm expecting crypto scam spam
22:55:50FromDiscord<!Patitotective> does matrix not have spam filter?
22:56:12FromDiscord<classj> Now is your Bitcoin wallet or coinbase 0.00000 I promise 0.80500 in less than 24 hours without sending money to anyone. Earn 0.764 in 7hours, No referrals, No Ads, No scams. Ask how(me)Or join https://t.me/+JdEg2rIn7E0wZDFk
22:56:15FromDiscord<classj> Join and ask how
22:56:18FromDiscord<Elegantbeef> Fuck
22:56:22FromDiscord<Elegantbeef> I summoned them
22:56:37FromDiscord<!Patitotective> hahahha
22:56:39FromDiscord<!Patitotective> @moddo
22:56:46FromDiscord<!Patitotective> In reply to @classj "Now is your Bitcoin": <@&371760044473319454>
22:57:42FromDiscord<Elegantbeef> I mean you probably can filter messages and ban/warn users with a bot but dont think there is any built in spam protection due to the openness of the platform↵(@!Patitotective)
22:58:17FromDiscord<dom96> ffs
23:05:39NimEventerNew Nimble package! urlon - URL Object Notation implemented in Nim, see https://github.com/Double-oxygeN/urlon-nim
23:07:57FromDiscord<Benjamin> Mjolnir does a good job of preventing spam in another room I'm in\: https://matrix.org/docs/guides/moderation#moderation-tooling
23:16:18FromDiscord<b1rdf00d> sent a code paste, see https://play.nim-lang.org/#ix=41NR
23:16:22FromDiscord<b1rdf00d> (edit)
23:16:44FromDiscord<b1rdf00d> (edit) "https://play.nim-lang.org/#ix=41NR" => "https://play.nim-lang.org/#ix=41NS"
23:19:27FromDiscord<!Patitotective> `peg""` is a raw string↵to escape double quotes in a raw string use double double quotes↵`peg""""`
23:20:18FromDiscord<!Patitotective> actually it doesnt compile
23:20:35FromDiscord<!Patitotective> https://media.discordapp.net/attachments/371759389889003532/994382379898650664/unknown.png
23:20:40FromDiscord<Elegantbeef> you probably want `peg "\""`
23:21:15FromDiscord<Elegantbeef> The strlit call syntax is very useful but has the downside that it's a raw string lit
23:23:41FromDiscord<b1rdf00d> perfect, thanks!
23:24:17FromDiscord<Elegantbeef> If you're using pegs you may want ot checkout NPEG
23:27:45FromDiscord<b1rdf00d> so what's the difference between `peg""` and `peg ""` ?↵↵I tend to prefer using stuff in a stdlib by default, but I'll take a look at NPEG since you recommended
23:28:15FromDiscord<Elegantbeef> `peg""` uses a raw string literal which means no escaping
23:28:27FromDiscord<Elegantbeef> `peg ""` uses a string literal which means escaping can be used
23:29:03FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#lexical-analysis-generalized-raw-string-literals
23:29:22FromDiscord<b1rdf00d> thanks for the explanation and link, I'll have a read 🙂
23:29:44FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals
23:41:23FromDiscord<treeform> In reply to @Elegantbeef "Now whenever someone joins": Do we even need matrix room?
23:42:08FromDiscord<Elegantbeef> Do we even need a discord channel?
23:43:03FromDiscord<j-james> Do we even need an IRC channel?
23:43:08FromDiscord<treeform> it appears most convo happens on discord
23:43:12FromDiscord<Elegantbeef> Do we even need a community
23:43:18FromDiscord<treeform> IRC and Discord i can get behind.
23:43:23FromDiscord<j-james> Simply shout very loud
23:43:41FromDiscord<treeform> But matrix? If only 1% of users use matrix and its 100% of the spam?
23:43:57FromDiscord<Elegantbeef> I mean we can just you know setup moderation bots
23:44:00FromDiscord<j-james> Matrix users are more like 10 or 15 percent
23:44:20FromDiscord<Elegantbeef> But you're right just shut down any client that ever has spam
23:44:34FromDiscord<Elegantbeef> Discord had a lot of spam there for a while
23:44:42FromDiscord<j-james> I would like to see something like Mjolnir set up though
23:44:43FromDiscord<Elegantbeef> Irc had a lot of spam when freenode's takeover happened
23:45:04FromDiscord<Elegantbeef> "We've tried nothing and it shut it down"
23:45:07FromDiscord<j-james> Discord has a lot of account takeover spam going on right now
23:45:54FromDiscord<j-james> because of their god damn broken qr code login system 😠
23:46:14FromDiscord<Yardanico> In reply to @treeform "But matrix? If only": fyi almost no one uses IRC for the Nim community now, Matrix is much more popular relative to IRC in here
23:50:46FromDiscord<treeform> ok
23:52:10*noeontheend joined #nim
23:55:26FromDiscord<retkid> how can i get the size of an object in memory
23:55:40FromDiscord<Elegantbeef> `sizeof(object)`
23:55:45FromDiscord<Elegantbeef> This doesnt work for nested heap allocations
23:55:51FromDiscord<retkid> that returns the size of a ttype
23:55:53FromDiscord<retkid> (edit) "ttype" => "type"
23:56:03FromDiscord<Elegantbeef> Which is the size of the type in memory
23:56:09FromDiscord<retkid> yes
23:56:11FromDiscord<retkid> i dontwant the typw
23:56:15FromDiscord<retkid> (edit) "dontwant" => "dont want" | "typw" => "type"
23:56:16FromDiscord<retkid> i want the object
23:56:32FromDiscord<Elegantbeef> You need to recurse the type then
23:56:45FromDiscord<Elegantbeef> You want the allocated memory of an object not the size of an object 😄
23:57:22FromDiscord<retkid> beef....
23:57:37FromDiscord<retkid> how do I see the total memory allocation of a variable
23:57:44FromDiscord<Elegantbeef> I told you
23:57:52FromDiscord<Elegantbeef> You have to recurse the type to find all of the allocations
23:57:53FromDiscord<retkid> but what do i iterate over
23:58:02FromDiscord<Elegantbeef> the object's fields
23:58:33FromDiscord<retkid> i shall resort to mth
23:58:36FromDiscord<retkid> (edit) "mth" => "math"