<< 13-05-2021 >>

00:00:11ForumUpdaterBotNew thread by Alexeypetrushin: How to deal with <var Obj> cannot be captured as it would violate memory safety?, see https://forum.nim-lang.org/t/7972
00:14:02FromDiscord<timotheecour> hello... is there a way to `{.compile: "foo.cpp".}` from a `main.nim` file compiled with `nim c main` ? (besides doing it "manually" via `gorgeEx`)
00:25:36*imran joined #nim
00:27:13*imran quit (Client Quit)
00:44:27*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:44:49*njoseph joined #nim
01:00:33FromDiscord<ElegantBeef> In reply to @Esther "Q on that topic": Yes let variables have addresses but you have to use `unsafeAddr` to access them, though that is subject to change
01:01:04FromDiscord<ElegantBeef> Seeing timothee use discord scares me, is the end nigh?
01:15:16*krux02 quit (Remote host closed the connection)
01:16:36FromDiscord<timotheecour> lol why? gitter seems both dead and a memory hog
01:22:46FromDiscord<demotomohiro> Here is example that let variable doesn't have address as it is assigned to register:↵https://godbolt.org/z/zddW1Pr4e↵But you can use unsafeAddr to that variable.↵https://godbolt.org/z/bMnd3YGqK
01:29:11FromDiscord<ElegantBeef> now if only ii had the braincells to even know what that means, i'd be in business
01:40:52*azed quit (Quit: WeeChat 3.1)
01:46:06ForumUpdaterBotNew post on r/nim by frosthunter: Looking for more example of nim's coroutines, see https://reddit.com/r/nim/comments/nb5e4v/looking_for_more_example_of_nims_coroutines/
01:56:25FromDiscord<arun> https://adsharma.github.io/py2many0.2.1/ - transpiles python3 to nim among other languages. A new version with many improvements is out on pypi.
03:01:42*thomasross quit (Ping timeout: 260 seconds)
03:11:30FromDiscord<Esther> In reply to @zetashift "Like https://nim-lang.org/docs/system.html#addr,T y": I mean that gets the address if it exists and fails to compile if it doesn’t — how do I know whether using addr is legal without actually trying to compile?
03:25:55FromDiscord<ElegantBeef> If it's a `var` `addr` and `unsafeaddr` will work, if it's a `let` only unsafe will, if it's a const neither will
03:37:28*spiderstew joined #nim
03:38:55*spiderstew_ quit (Ping timeout: 260 seconds)
04:02:19*rockcavera quit (Remote host closed the connection)
04:40:42*narimiran joined #nim
04:48:18*Tlangir quit (Ping timeout: 268 seconds)
04:49:36FromDiscord<impbox [ftsf]> aww you can't get the address of a const? that's no fun
04:49:47FromDiscord<Rika> how would that work?
04:49:57FromDiscord<Rika> how do you get the address of a literal
04:50:08FromDiscord<impbox [ftsf]> well it's stored in memory somewhere right?
04:50:29FromDiscord<ElegantBeef> There is an RFC which would let you store values in the rom so they'd be addressable
04:50:55FromDiscord<ElegantBeef> Remember impbox consts are copied into the code where they're used
04:51:01FromDiscord<Rika> its just kind of strange; the usual use case for getting the address is to mutate it
04:51:04FromDiscord<impbox [ftsf]> (didn't know this)
04:51:14FromDiscord<impbox [ftsf]> sometimes you just want to read it
04:51:21FromDiscord<Rika> In reply to @ElegantBeef "Remember impbox consts are": still; the value is found somewhere
04:51:40FromDiscord<ElegantBeef> Anywho, rom based `let`s 😄
04:52:07FromDiscord<impbox [ftsf]> i'd assumed const just puts it in the data section of the executable where you can reference it, but that's probably a silly assumption
04:52:22FromDiscord<impbox [ftsf]> sounds like that's what the RFC is for
04:52:32FromDiscord<ElegantBeef> https://github.com/nim-lang/RFCs/issues/257
04:52:36FromDiscord<ElegantBeef> If you care to check it out
05:06:21*leorize quit (Ping timeout: 240 seconds)
05:15:01*NimBot joined #nim
05:25:55FromDiscord<her0me> Can anyone help me install nim?
05:34:35FromDiscord<ElegantBeef> I suggest using choosenim to install it
05:35:13FromDiscord<ElegantBeef> If you're on windows your anti virus will most likely think it's a virus and remove it
05:35:33FromDiscord<ElegantBeef> It's a false positive and in no way actually a virus 😄
05:36:26FromDiscord<her0me> Okay, yeah
05:37:04FromDiscord<her0me> I got it to work with the zip file and such, but my friend couldn't
05:37:25FromDiscord<her0me> ill let u know more in a bit if we end up needing it, we might be able to bypass it
05:39:44FromDiscord<ElegantBeef> It's a shame we have to basically say "We promise it's not malicious" 😄
05:39:56FromDiscord<her0me> yeah lol i got scared at first
05:40:01FromDiscord<her0me> looked up some forum posts tho
05:41:41*johannes_ joined #nim
05:42:23*johannes_ is now known as kenran
05:44:32*Tlangir joined #nim
05:48:38*Tlangir quit (Ping timeout: 246 seconds)
05:53:09FromDiscord<her0me> he got it with choosenim ty
06:03:25FromDiscord<hamidb80> hey beef
06:03:29FromDiscord<ElegantBeef> Hey me
06:03:35FromDiscord<hamidb80> what's newRuntime ?
06:04:21FromDiscord<hamidb80> i had chat with haxscramer
06:04:32FromDiscord<ElegantBeef> It's changes under the hood to support orc/arc afaik
06:04:54FromDiscord<hamidb80> that openArray behaves diffrently with `seq`
06:05:01FromDiscord<hamidb80> let me find that chat
06:05:24FromDiscord<hamidb80> In reply to @haxscramper "it looks like `seq`": here
06:06:31FromDiscord<hamidb80> In reply to @ElegantBeef "It's changes under the": but i used default GC in that issue
06:07:00FromDiscord<hamidb80> https://github.com/nim-lang/Nim/issues/18005
06:07:14FromDiscord<ElegantBeef> I was just profiling and seeing what sticks, you can enable the newruntime manually, adding important information
06:08:58FromDiscord<ElegantBeef> But yea with either `orc/arc` or `--newRuntime` you get https://media.discordapp.net/attachments/371759389889003532/842282250128457738/unknown.png
06:09:32FromDiscord<ElegantBeef> And it optimized away again using arc/orc 😄
06:11:48FromDiscord<hamidb80> question
06:12:06FromDiscord<hamidb80> if i find that my issue is duplicated
06:12:18FromDiscord<hamidb80> should i close my issue?
06:12:27FromDiscord<hamidb80> or something else
06:12:40FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/842283180690243634/unknown.png
06:12:53FromDiscord<ElegantBeef> You can close it with a comment of "Yep it's a duplicate" or w/e you want
06:13:11FromDiscord<hamidb80> ok tnks
06:16:35ForumUpdaterBotNew thread by Alexeypetrushin: Make `std/asynchttpserver` more robust?, see https://forum.nim-lang.org/t/7973
06:20:05FromDiscord<hamidb80> In reply to @ElegantBeef "But yea with either": why do even GCs behave differently in that situation?
06:20:23FromDiscord<ElegantBeef> What do you mean?
06:21:05FromDiscord<hamidb80> i mean isn't the job of GCs only collect garbages?
06:21:27FromDiscord<ElegantBeef> Well remember that Arc/Orc introduced destructors and a shitload of other things
06:22:07FromDiscord<hamidb80> shitload? 😄
06:22:43FromDiscord<ElegantBeef> Move semantic optimizations
06:23:06FromDiscord<ElegantBeef> https://nim-lang.org/docs/destructors.html#move-semantics
06:23:38*Vladar joined #nim
06:24:26FromDiscord<hamidb80> thanks for being here
06:27:22*kenran quit (Quit: Lost terminal)
06:27:58*johannes_ joined #nim
06:28:08*johannes_ is now known as kenran
06:36:08FromDiscord<PressF> Does anyone know anything like tonejs for nim?
06:38:24FromDiscord<ElegantBeef> For the web or native?
06:39:41FromDiscord<PressF> Ideally both
06:39:54FromDiscord<PressF> 😂
06:40:22FromDiscord<PressF> A tonejs wrapper would do the job
06:40:36FromDiscord<ElegantBeef> Well pitter patter
06:41:11FromDiscord<Rika> Get on it, beef
06:41:21FromDiscord<ElegantBeef> it's get at er
06:41:57FromDiscord<ElegantBeef> i'd just support it natively and make people do wasm calls for using it
06:42:46FromDiscord<ElegantBeef> Hey i didnt say i'd do it 😛
06:44:21FromDiscord<Rika> Do it
06:44:32FromDiscord<PressF> I guess I'll do it one day hahahaha
06:44:44FromDiscord<Rika> And that one day is today
06:44:47FromDiscord<ElegantBeef> Wrapping tonejs doesnt look like too much work, so yea
06:44:47FromDiscord<Rika> Now get to it
06:44:54FromDiscord<Rika> Lol
06:45:05FromDiscord<ElegantBeef> It's all just function calls with primitives it seems for the most part
06:45:07FromDiscord<Rika> In reply to @ElegantBeef "Wrapping tonejs doesnt look": famous last words
06:45:23FromDiscord<PressF> In reply to @Rika "And that one day": I can't today lol. I have a test tomorrow 😅. Maybe I can start on the weekend
06:45:31FromDiscord<Rika> Fuck tests do it today
06:45:53FromDiscord<ElegantBeef> But this channel is here so we can help where you need
06:46:39FromDiscord<ElegantBeef> So when you get your hand stuck we can laugh, then tell you put your other hand in
06:46:56FromDiscord<Rika> That’s gotta be painful
06:47:09FromDiscord<ElegantBeef> How would I know, it's not my hand(s)
06:47:38FromDiscord<PressF> 😂😂😂
06:47:41FromDiscord<Rika> Oh I assumed it was stuck up your ass
06:47:57FromDiscord<ElegantBeef> Not much room, considering how big my head is
06:48:12FromDiscord<Rika> God damn
06:48:31FromDiscord<PressF> In reply to @Rika "Fuck tests do it": It's a physics test about waves so it technically is pre-work study about audio
06:48:49FromDiscord<Rika> Waves? That sounds like high school stuff though
06:49:16FromDiscord<PressF> In reply to @Rika "Waves? That sounds like": Yup 12th grade (last year of highschool)
06:49:36FromDiscord<Rika> What no way that’s fuckin 10th grade shit when I took physics
06:49:41FromDiscord<Rika> Man fuck okay
06:49:55FromDiscord<PressF> It's a global test from 10th to 12th
06:50:05FromDiscord<PressF> Yup my teacher is crazy
06:50:27FromDiscord<Rika> Okay
06:50:36FromDiscord<Rika> Just go study then I guess
06:53:52ForumUpdaterBotNew post on r/nim by cuffia_azzurra_2: The Most Popular Programming Languages - 1965/2021 - New Update, see https://reddit.com/r/nim/comments/nbagxw/the_most_popular_programming_languages_19652021/
07:02:50*narimiran quit (Ping timeout: 246 seconds)
07:03:47*narimiran joined #nim
07:17:08FromDiscord<madman> sent a code paste, see https://play.nim-lang.org/#ix=3mE0
07:26:47FromDiscord<madman> i guess its safe to use the os module from nimscript for `relativePath` proc
07:35:31*ehmry quit (Ping timeout: 260 seconds)
07:38:34FromDiscord<madman> `commandLineParams()` was the answer
07:43:49*ehmry joined #nim
07:48:54FromDiscord<madman> how can i force a nimscript to exit/halt execution
08:15:08*narimiran quit (Ping timeout: 252 seconds)
08:24:22*garFF joined #nim
08:27:09FromDiscord<demotomohiro> quit proc in system module does not work in nimscript?↵https://nim-lang.org/docs/system.html#quit%2Cint
08:36:26FromDiscord<madman> i tried it it didnt work
08:41:03*mindhunter0x joined #nim
08:42:56*mindhunt1r0x quit (Ping timeout: 246 seconds)
08:46:31*krux02 joined #nim
09:12:18*laincat quit (Quit: leaving)
09:13:38*garFF left #nim ("Leaving")
09:18:37*laincat joined #nim
09:28:01*arecaceae quit (Remote host closed the connection)
09:28:20*arecaceae joined #nim
09:56:13*narimiran joined #nim
10:15:49*Tlangir joined #nim
10:27:52*kenran quit (Quit: leaving)
10:34:59FromDiscord<Esther> In reply to @impbox "well it's stored in": I thought they were sort of equivalent to constexpr in c++
10:39:08FromDiscord<Esther> Do consts in nim actually make it to the emitted c code at all?
10:40:55FromDiscord<Rika> im pretty sure its essentially equivalent to a define in c
10:42:05FromDiscord<Esther> Equivalent sure but do consts result in #defines in the c code?
10:42:13FromDiscord<Esther> I guess I could test but I’m away from my computer ahah
10:43:30FromDiscord<Rika> not defines, but i think they just get substituted
10:51:49*Vladar quit (Remote host closed the connection)
10:59:03FromDiscord<exelotl> it depends on the const and how it's used. E.g. if you `echo MyConstInt` that'll be substituted, but if you do like `echo MyConstArray[i]` it'll generate a const array in the C code once and index it
11:01:35*Vladar joined #nim
11:05:38*hyiltiz quit (Ping timeout: 252 seconds)
11:05:50*hyiltiz joined #nim
11:05:51*hyiltiz quit (Changing host)
11:05:51*hyiltiz joined #nim
11:14:19*krux02 quit (Remote host closed the connection)
11:29:53*PMunch joined #nim
11:34:58FromDiscord<🍍phylum🍍> hey I'm trying to compile a nim program on an exotic system, setting --gcc.exe and --gcc.linkerexe it looks like everything should be ok. I think NIM_INTBITS is being set to 64 due to the host system, but I need it to be 32
11:35:38FromDiscord<🍍phylum🍍> trying to pass this through with `--passC:-DNIM_INTBITS=32` but it isn't having any impact, is this the right idea?
11:37:47PMunchYou probably need to set the architecture
11:38:14PMunch--cpu:i386 for example
11:38:22FromDiscord<🍍phylum🍍> i did --cpu:mips
11:38:25FromDiscord<🍍phylum🍍> it's a mips cpu
11:38:30FromDiscord<🍍phylum🍍> but that overrode the --gcc.exe
11:38:43FromDiscord<🍍phylum🍍> does order matter?\
11:38:45PMunchAh yes, you need --gcc.mips.exe or something like that
11:38:45FromDiscord<🍍phylum🍍> (edit) "matter?\" => "matter?"
11:39:18PMunchThose are designed so you can put them all in your system wide configuration and then just switch by doing --cpu:mips for example
11:45:21FromDiscord<🍍phylum🍍> ah sweet
11:45:25FromDiscord<🍍phylum🍍> thanks
11:57:45PMunchDid you get it working?
12:00:19FromDiscord<🍍phylum🍍> got called away for a min
12:01:19*laincat left #nim (#nim)
12:01:27*laincat joined #nim
12:07:41FromDiscord<madman> In reply to @demotomohiro "quit proc in system": i guess i could just `exec "nim c -r BUILDFAILED.nim"` since quit doesnt work to crash the nimscript xD
12:09:27*Gustavo6046 quit (Ping timeout: 260 seconds)
12:22:32FromDiscord<🍍phylum🍍> my thing is still failing but i've got new stuff to look into tomorrow for it now
12:22:34FromDiscord<🍍phylum🍍> cheers for the help
12:23:01PMunchNo problem, don't hesitate to ask further questions
12:23:35*lritter joined #nim
12:24:05PMunchHere's someone else who have managed to build Nim on MIPS by the way: https://github.com/ponyatov/nims/blob/260926-884b/mips/src/nim.cfg
12:29:26*rockcavera joined #nim
12:30:20*beshr quit (Remote host closed the connection)
12:44:26*wasted_youth2 quit (Quit: Leaving)
13:00:00*Gustavo6046 joined #nim
13:05:38PMunch"Hint: ***SLOW, DEBUG BUILD***; -d:release makes code run faster. [BuildMode]"
13:05:48PMunchI see we have started trying to warn benchmark people :P
13:09:56*clyybber joined #nim
13:22:19*leorize joined #nim
13:28:20FromDiscord<madman> benchmark people always get it wrong xD
13:28:45FromDiscord<madman> `var target = commandLineParams()[3]`↵`Error: index 3 not in 0 .. 2`↵how can i catch this error and print something else instead, it doesnt look like an exception
13:29:12FromDiscord<madman> i wanna print something if no command line arg is supplied
13:29:30FromDiscord<Rika> check the length if its >= 4?
13:29:49FromDiscord<madman> lol brain dead X_X
13:29:51FromDiscord<madman> thank you
13:29:55FromDiscord<Rika> lmao
13:29:58FromDiscord<Rika> 👌
13:36:21*leorize quit (Ping timeout: 240 seconds)
13:50:12*Gustavo6046 quit (Remote host closed the connection)
13:50:27*Gustavo6046 joined #nim
14:03:23*nerthus joined #nim
14:15:03*leorize joined #nim
14:47:19*xet7 quit (Ping timeout: 265 seconds)
15:00:10*xet7 joined #nim
15:07:19*PMunch quit (Quit: leaving)
15:46:27*rockcavera quit (Read error: Connection reset by peer)
15:47:18*rockcavera joined #nim
16:46:16*xet7 quit (Ping timeout: 252 seconds)
16:47:27*whitefly3 quit (Quit: Something in the way I say your name, sends blood rushing to my face.)
16:47:48*whitefly joined #nim
16:58:02*Vladar quit (Remote host closed the connection)
17:00:46*xet7 joined #nim
17:35:38FromDiscord<TurtleP> sent a long message, see https://paste.rs/REv
17:56:11*jess quit ()
18:02:26*vicfred joined #nim
18:08:15*rockcavera quit (Remote host closed the connection)
18:14:23*Prestige quit (Quit: Prestige)
18:15:53FromDiscord<treeform> In reply to @TurtleP "Hey, so I'm working": You can use the `{.gcsafe.}: ...` block to make the compiler get off your back.
18:16:14FromDiscord<TurtleP> on threadFunc?
18:16:15FromDiscord<treeform> But you probably would want to use locks to guard the code in the block.
18:16:27FromDiscord<TurtleP> hmm yeah
18:16:41FromDiscord<treeform> you use it as a block mostly: https://github.com/nim-lang/RFCs/issues/142
18:17:29*Prestige joined #nim
18:18:22FromDiscord<treeform> I recommend using channels though. And pass stuff between threads instead (rather then locks).
18:18:42FromDiscord<TurtleP> yeah I looked into that, but it's hard to wrap my head around how those work in nim
18:18:58FromDiscord<TurtleP> especially when I'm used to non-typing channels
18:19:17FromDiscord<treeform> I would create kind of a message object to pass around
18:19:30FromDiscord<treeform> that has everything you want on it and probably an enum type
18:29:40*adeohluwa joined #nim
18:35:59ForumUpdaterBotNew thread by Fengkehh: Nimble Disallow Version, see https://forum.nim-lang.org/t/7974
18:44:52*letto quit (Quit: Konversation terminated!)
18:45:17*letto joined #nim
18:47:40*adeohluwa quit (Remote host closed the connection)
18:59:33*Arrrrrrrr joined #nim
19:22:14*NimBot joined #nim
19:25:02*wasted_youth2 joined #nim
20:00:37*Arrrrrrrr quit (Quit: Arrrrrrrr)
20:09:24*surma quit (*.net *.split)
20:09:24*koltrast quit (*.net *.split)
20:09:24*qwr quit (*.net *.split)
20:09:30*qwr joined #nim
20:09:39*surma joined #nim
20:28:32*narimiran quit (Ping timeout: 246 seconds)
20:44:58*lritter quit (Quit: Leaving)
20:57:41*azed joined #nim
21:09:34*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
21:09:37FromGitter<bung87> is there any thoery for correcting string of specific format? I ve implemented validator, not sure if there’s way better than implement corrector one by one manually
21:11:13*joast quit (Ping timeout: 252 seconds)
21:27:25FromDiscord<matkuki> sent a code paste, see https://play.nim-lang.org/#ix=3mHT
21:34:33FromDiscord<zetashift> Seems to be marked as OS/Specific for Arch? https://github.com/nim-lang/Nim/issues/17907
21:35:30FromDiscord<zetashift> In reply to @matkuki "Hi. Building from source": Can you try it out with choosenim https://github.com/dom96/choosenim?
21:35:34FromDiscord<zetashift> (edit) "https://github.com/dom96/choosenim?" => "https://github.com/dom96/choosenim"
21:37:38*rockcavera joined #nim
21:38:09*rockcavera quit (Remote host closed the connection)
21:40:41*Gustavo6046 quit (Ping timeout: 250 seconds)
21:41:12*krux02 joined #nim
21:43:31*Gustavo6046 joined #nim
21:47:05*Gustavo6046 quit (Excess Flood)
21:47:22*Gustavo6046 joined #nim
22:05:33*leorize quit (Ping timeout: 240 seconds)
22:15:46*Lord_Nightmare joined #nim
22:22:59*leorize joined #nim
22:34:13*pbb quit (Remote host closed the connection)
22:35:29*pbb joined #nim
22:38:11*rockcavera joined #nim
22:39:56*tiorock joined #nim
22:39:56*rockcavera is now known as Guest84563
22:39:57*tiorock quit (Changing host)
22:39:57*tiorock joined #nim
22:39:57*Guest84563 quit (Killed (verne.freenode.net (Nickname regained by services)))
22:39:57*tiorock is now known as rockcavera
22:44:22*rockcavera quit (Ping timeout: 265 seconds)
23:02:44*clyybber quit (Quit: WeeChat 3.1)
23:03:09*rockcavera joined #nim
23:03:32*rockcavera quit (Remote host closed the connection)
23:32:32*rockcavera joined #nim
23:37:05*joast joined #nim