<< 14-04-2019 >>

00:01:53*rnrwashere joined #nim
00:16:00*I_Right_I quit (Remote host closed the connection)
01:30:06*Sonderblade joined #nim
01:33:00*ng0_ joined #nim
01:35:23*ng0 quit (Ping timeout: 256 seconds)
02:07:04*banc quit (Quit: Bye)
02:28:06*banc joined #nim
02:33:13*rnrwashere quit (Remote host closed the connection)
02:34:33*rnrwashere joined #nim
02:37:55*rnrwashere quit (Client Quit)
02:48:51*rayman22201 quit (Ping timeout: 268 seconds)
02:49:03*rayman22201 joined #nim
02:49:28*dashed quit (Ping timeout: 268 seconds)
02:50:01*dashed joined #nim
02:50:08*fredrik92 joined #nim
02:53:30*couven92 quit (Ping timeout: 246 seconds)
02:56:52*zielmicha__ quit (Ping timeout: 268 seconds)
02:57:30*zielmicha__ joined #nim
03:53:56*rnrwashere joined #nim
04:00:32*rnrwashere quit (Remote host closed the connection)
04:01:11*rnrwashere joined #nim
04:01:11*rnrwashere quit (Remote host closed the connection)
04:01:27*rnrwashere joined #nim
04:09:58*rnrwashere quit ()
04:21:58*cyraxjoe quit (Ping timeout: 268 seconds)
04:28:17*cyraxjoe joined #nim
04:28:20*Sonderblade quit (Read error: Connection reset by peer)
04:45:19*rnrwashere joined #nim
04:49:15*rnrwashere quit (Remote host closed the connection)
05:49:37*rnrwashere joined #nim
05:49:50FromDiscord<Richard Anaya> hey all
05:50:18FromDiscord<Richard Anaya> Curious what's the simplest way to make non-emscripten web assembly with nim
05:52:16Araqhttps://forum.nim-lang.org/t/4779
05:52:59FromDiscord<Richard Anaya> thanks
05:53:19FromDiscord<Richard Anaya> I created a dom access library for Rust, i'm curious how hard would be to port for Nim
05:56:34FromDiscord<Richard Anaya> is the `nlvm` an official supported project under nim?
06:00:10FromDiscord<Richard Anaya> i'm familiar with compiling C -> llvm -> wasm
06:00:15FromDiscord<Richard Anaya> I'm wondering if there's a route that way too
06:05:58*rnrwashe_ joined #nim
06:09:09*rnrwashere quit (Ping timeout: 250 seconds)
06:09:28Araqdefine "officially supported", not really; but I would assimilate it into Nim's core if it comes to it
06:13:42*solitudesf joined #nim
06:33:12FromDiscord<Richard Anaya> is it possible to compile nim without the standard lib?
06:34:35Araqsure, --os:standalone and --gc:none and similar
06:34:49FromDiscord<Richard Anaya> thanks Araq
06:39:25FromDiscord<Richard Anaya> is there any equivalant of `__attribute__((visibility("default")))` in nim
06:39:26FromDiscord<Richard Anaya> ?
06:40:36leorizeit's always the default... but if you wanted to export stuff, just use {.exportc.}
06:40:52*solitudesf quit (Ping timeout: 264 seconds)
06:41:09FromDiscord<Richard Anaya> 🙏 thanks
06:55:17*narimiran joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:40*gmpreussner joined #nim
07:08:41*nsf joined #nim
07:15:12*dddddd quit (Remote host closed the connection)
07:28:43*Minimisthupper joined #nim
07:37:42*Minimisthupper quit (Quit: Mutter: www.mutterirc.com)
07:38:00*Minimisthupper joined #nim
07:39:06*ng0_ is now known as ng0
07:40:48*Minimisthupper quit (Client Quit)
07:41:32*dddddd joined #nim
07:53:06*shomodj joined #nim
08:01:04*rnrwashe_ quit (Remote host closed the connection)
08:11:02*chickendan joined #nim
08:12:19*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:23:50*stefanos82 joined #nim
08:52:18*couven92 joined #nim
09:15:18*bozaloshtsh quit (Ping timeout: 255 seconds)
09:23:18*luis_ joined #nim
09:51:49*narimiran quit (Ping timeout: 252 seconds)
09:53:39*luis_ quit (Ping timeout: 252 seconds)
10:02:22*rnrwashere joined #nim
10:07:07*rnrwashere quit (Ping timeout: 264 seconds)
10:12:53*Vladar joined #nim
10:47:21*luis_ joined #nim
11:08:58*kapil____ joined #nim
11:09:34*Minimisthupper joined #nim
11:13:23*Minimisthupper quit (Remote host closed the connection)
11:13:42*luis_ quit (Read error: Connection reset by peer)
11:14:04*luis_ joined #nim
11:15:14*shomodj joined #nim
11:18:29*vlad1777d joined #nim
11:18:59*vlad1777d quit (Read error: Connection reset by peer)
11:25:16*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:31:14*al_ joined #nim
11:31:38*al_ quit (Client Quit)
11:31:47*luis_ quit (Ping timeout: 240 seconds)
11:47:56*clyybber joined #nim
11:55:50*Minimisthupper joined #nim
11:56:07*Minimisthupper quit (Client Quit)
12:25:33clyybberAraq: Curious, why is it owned(SomeRefType) and not owned[SomeRefType] ?
12:51:55*abm joined #nim
12:54:16FromDiscord<Richard Anaya> hmm, super confused, no matter what I do, I have a simple function that doesn't get exposed on web assembly
12:54:30FromDiscord<Richard Anaya> proc fib * (): int {.stdcall,exportc,dynlib.} = 42
12:54:48FromDiscord<Richard Anaya> nim c -c --cc:clang -d:release --cpu:i386 --os:standalone --app:lib --gc:none greetings.nim
12:55:08FromDiscord<Richard Anaya> ; Function Attrs: noinline nounwind optnone
12:55:08FromDiscord<Richard Anaya> define hidden i32 @fib() #0 {
12:55:08FromDiscord<Richard Anaya> in llvm
12:55:41FromDiscord<Richard Anaya> I feel I must be missing something 😛
12:59:54FromDiscord<Richard Anaya> not sure why its hidden
13:02:10clyybbergotta ask @arnetheduck
13:17:56*kapil____ quit (Quit: Connection closed for inactivity)
13:22:36*vlad1777d joined #nim
13:29:39*al_ joined #nim
13:33:16*solitudesf joined #nim
13:50:09*Trustable joined #nim
13:53:25*xet7 quit (Quit: Leaving)
13:58:14*crem joined #nim
14:01:49*narimiran joined #nim
14:03:31*solitudesf quit (Ping timeout: 246 seconds)
14:03:46*Minimisthupper joined #nim
14:04:09*Minimisthupper_ joined #nim
14:07:36*Minimisthupper_ quit (Client Quit)
14:07:37*solitudesf joined #nim
14:08:28*Minimisthupper quit (Ping timeout: 264 seconds)
14:10:00*Minimisthupper joined #nim
14:13:26*Minimisthupper quit (Client Quit)
14:24:17*a_b_m joined #nim
14:27:24*abm quit (Ping timeout: 252 seconds)
14:30:20*shomodj joined #nim
14:44:29*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:27:23*a_b_m quit (Quit: Leaving)
15:34:17*kapil____ joined #nim
15:47:45*rnrwashere joined #nim
16:41:00clyybberAraq: I think I got a proper fix now.
16:41:09clyybberJust have to push it...
16:41:21*[rg] joined #nim
16:43:24[rg]nim is what I've been search for, thank you :)
16:44:37FromGitter<deech> Araq: In a `const` expression why are variant types disallowed from object fields? On the whole I don't understand why this check exists: https://github.com/nim-lang/Nim/blob/devel/compiler/semstmts.nim#L615
16:49:41*luis_ joined #nim
16:50:56FromGitter<deech> Also is this the best forum to ask about Nim internals?
16:51:13federico3https://forum.nim-lang.org/ or here
16:52:06clyybberdeech Yeah probably.
16:52:23clyybberIRC is quick
16:52:36clyybberand direct.
16:53:06FromGitter<deech> Since the forums are bridged asking here is the same as asking from IRC right?
16:54:25clyybberyeah
16:54:51FromGitter<deech> Thanks!
16:55:08clyybberthough I'd recommend IRC over gitter if you can, since gitter sucks considerably IMO
16:55:29clyybberit sometimes fucks up the order of messages when
16:55:47clyybberyou were away for some time.
16:56:35clyybberAnd its process of marking unread messages as read is also somehow complete bollocks.
16:57:28clyybberAlso when people write code on irc, gitter often reinterprets that code as some formatting stuff and doesn't display it correctly.
16:58:02FromGitter<liquid600pgm> I'd consider this ^ a bug in the bridge bot, it should escape those characters properly imo
16:58:43clyybberIt can't really detect the code on irc, since we can just write it how we want
16:59:12clyybberproc some[T](test: int) = discard
16:59:22FromGitter<liquid600pgm> oh yes
16:59:26FromGitter<liquid600pgm> proc someT = discard
16:59:26clyybberhow should the bridge detect that?
16:59:47FromGitter<liquid600pgm> it could have a markdown parser and escape any markdown it detects
16:59:51clyybberyeah but I actually wrote `proc some[T](test: int) = discard`
17:00:00clyybberits just that gitter swallowed the rest
17:00:13clyybberinterpreting `[T](test: int)` as a link
17:00:32clyybberliquid600pgm Huh, that could work, yeah
17:04:31FromGitter<liquid600pgm> I'm not sure if rod (my interpreted programming language) should be fully statically typed, or allow for dynamic typing
17:04:38FromGitter<liquid600pgm> any suggestions?
17:05:11FromGitter<liquid600pgm> for those who don't know, it's meant to be embedded into Nim applications
17:05:57*narimiran quit (Ping timeout: 252 seconds)
17:07:13clyybberliquid600pgm What advantages does dynamic typing actually bring?
17:07:53FromGitter<liquid600pgm> the language might be easier to pick up for beginners, but I wouldn't say static typing is that hard
17:08:00clyybberI would go for statically typed, but with very good type inference
17:08:18FromGitter<liquid600pgm> what do you mean by 'very good'?
17:08:25clyybberHindley-Milner?
17:08:54clyybberAlgorithm W
17:10:27clyybberor even better Algorithm J
17:10:32clyybberits a bit simpler
17:17:43FromGitter<liquid600pgm> I wouldn't say the type inference would go *that* far, I was thinking about something more resemblent of what Nim does
17:17:53FromGitter<liquid600pgm> I don't want to make the implementation very complex
17:19:09luis_As it is, you think Nim is not friendly enough to be used within programs written in Nim?
17:19:34luis_I guess my question is whether a new language is needed?
17:20:24*narimiran joined #nim
17:21:44FromGitter<liquid600pgm> I think Nim lacks an *easily embeddable*, powerful scripting language
17:22:53federico3uh?
17:23:45FromGitter<liquid600pgm> well, we have bindings to Lua, but I find writing Lua scripts rather cumbersome
17:24:16FromGitter<liquid600pgm> I'd rather write in a type-safe language that has all the features I need
17:24:34clyybberMost users wont need a scripting language embedded in Nim, but I imagine it's pretty useful for gamedev
17:24:53clyybberfor example for allowing users to create their own levels and behaviours
17:25:05FromGitter<liquid600pgm> that's exactly what I need the scripting language for
17:25:16clyybberI thought so :)
17:25:30clyybberI'm served fine with HCR
17:25:39luis_Well, me too. But can' t Nim itself be used in a scripting environment? I am testing it in a REPL, so I think it can. But I am playing with it for some days, and I may be mistaken.
17:25:44*rnrwashere quit (Remote host closed the connection)
17:25:55clyybberluis_ Yeah it can.
17:26:12luis_What is HCR?
17:26:13clyybberbut I imagine designing a language by yourself is also a great way to learn
17:26:20clyybberHot Code Reloading
17:26:22luis_yeah, definetly
17:26:34FromGitter<liquid600pgm> oh really? I couldn't find any docs on using the Nim VM in your own programs
17:27:11federico3https://nim-lang.org/docs/nims.html
17:27:49luis_Does nim script have HCR abilities?
17:27:54clyybberliquid600pgm The docs don't tell you how to do it.
17:28:02clyybberluis_ Nim itself has that ability
17:28:04FromGitter<liquid600pgm> yeah I noticed
17:28:18federico3clyybber: HCR? it does? Any link handy?
17:29:29narimiranfederico3: https://nim-lang.github.io/Nim/nimc.html#additional-features-hot-code-reloading
17:30:13federico3Nim never fails to impress me
17:30:53narimiranit's been merged into devel a month or so ago
17:31:16clyybbernarimiran was faster with the link :D
17:31:29*rnrwashere joined #nim
17:33:30FromGitter<deech> Why is the following is allowed by the compiler: ⏎ ⏎ ```proc f():int {.compileTime.} = 999 ⏎ const ff = f``` [https://gitter.im/nim-lang/Nim?at=5cb36eeaa84e0c501a2ef44e]
17:33:41luis_narimiran: Thank you for the link
17:35:18narimiran@deech both examples work on the latest devel
17:35:25luis_Did anyone implemented statistics GLM with Nim?
17:35:47luis_*implement
17:36:35*al_ quit (Quit: al_)
17:36:56narimiranbtw, does it work if you call the proc? (`const ff = f()`)
17:37:16FromGitter<deech> narimiran: I'm on that branch and I pull about an hour ago.
17:38:42FromGitter<deech> narimiran: Yes.
17:39:03*[rg] left #nim (#nim)
17:40:52*rnrwashere quit (Remote host closed the connection)
17:56:02*shomodj joined #nim
17:56:39*Jesin quit (Quit: Leaving)
17:57:21*xet7 joined #nim
18:03:07*kapil____ quit (Quit: Connection closed for inactivity)
18:06:47*chickendan quit (Quit: Quit)
18:11:57*vqrs_ quit (Ping timeout: 252 seconds)
18:14:26*vqrs joined #nim
18:24:14*rnrwashere joined #nim
18:29:28luis_<liquid600pgm> Have you seen min language? https://min-lang.org/
18:31:49*Jesin joined #nim
18:34:09*rnrwashere quit (Remote host closed the connection)
18:35:46*rnrwashere joined #nim
18:39:35*Perkol joined #nim
18:41:19*luis_ quit (Ping timeout: 264 seconds)
18:45:42Perkolhttpclient will fetch https websites even without ssl enabled as long as I put http at start intead of https?
18:46:16*luis_ joined #nim
18:48:28*krux02 joined #nim
18:51:21*krux02_ joined #nim
18:59:17*krux02 quit (Remote host closed the connection)
18:59:33*krux02_ quit (Quit: Leaving)
18:59:54*krux02 joined #nim
19:00:36*krux02 quit (Remote host closed the connection)
19:00:52*krux02 joined #nim
19:01:30*krux02 quit (Remote host closed the connection)
19:01:42*krux02 joined #nim
19:05:48*luis_ quit (Ping timeout: 246 seconds)
19:23:46*I_Right_I joined #nim
19:24:52*rnrwashere quit (Remote host closed the connection)
19:25:32*Trustable quit (Remote host closed the connection)
19:25:34*rnrwashere joined #nim
19:51:36clyybbernarimiran: What is the difference between fillWith vs newSeqWith in your PR?
19:52:35narimirannewSeqWith creates a new seq, which is then filled and returned; fillWith fills the existing container, which is more memory-efficient
19:53:13narimiranbut as already said in the comments, i need to explain it better :)
19:53:37clyybberWhy not replace newSeqWith then?
19:53:46clyybberoh,
19:53:48clyybberI see
19:53:50clyybbernvrmind.
19:54:10clyybberBut there is still a subtle difference between those two, isn't there?
19:54:26clyybbernewSeqWith evaluates the untyped parameter for each element
19:54:46clyybberwhile fillWith doesn't, even though it is using an untyped parameter?
19:54:49narimiransee the runnable example
19:56:01clyybbernarimiran: I'm looking at it rn.
19:56:31clyybberSo does rand(10) get called n times?
19:56:38clyybberor does it only get called a single time?
19:57:02*[rg] joined #nim
19:58:32narimiranthe result is something like this: `@[3, 89, 18, 2, 95, 20, 9, 54, 37, 80, 51]`, similarly to the example for `newSeqWith`
19:59:09clyybberHuh, how does that work?
19:59:23clyybberit is calling fillImpl right?
19:59:56clyybberAnd that should call evaluate f to a concrete value right?
20:00:06*rnrwashere quit (Remote host closed the connection)
20:00:13clyybberOh, nevermind...
20:00:20clyybberfillImpl is a template
20:01:53clyybbernarimiran: Why does fillWith have an untyped parameter then? Shouldn't T work too?
20:02:30narimiransee just a few rows above where you have `fill`
20:02:46*rnrwashere joined #nim
20:02:51clyybberyeah, but thats a proc?
20:03:12clyybberand fillImpl also has : T in its parameters instead of : untyped
20:03:44narimiranyes, you're right
20:05:20clyybbernarimiran: Shouldn't it be possible to replace the : untyped in newSeqWith with a generic : T too?
20:06:33*bozaloshtsh joined #nim
20:06:33*bozaloshtsh quit (Changing host)
20:06:33*bozaloshtsh joined #nim
20:09:54disrupteki feel like i've read some stuff about possibly deprecated multi-methods. what's bad about them?
20:10:02disruptek^deprecating, that is.
20:12:55*luis_ joined #nim
20:13:39clyybberdisruptek: Their implementation is relatively complex
20:13:50clyybberAnd they are rarely useful in practice.
20:15:14*rnrwashere quit (Remote host closed the connection)
20:15:47*rnrwashere joined #nim
20:16:11disruptekso they should be avoided, right?
20:19:58clyybberYeah.
20:20:06*rnrwashere quit (Ping timeout: 252 seconds)
20:20:51disruptekokie, thanks. :-)
20:21:21narimiranN.B. (single) methods aren't going anywhere and you don't need to avoid them
20:22:32*abm joined #nim
20:23:01disruptekright.
20:25:26clyybbernarimiran: So the untyped is just there so we can use that special code block syntax?\
20:30:30*narimiran quit (Ping timeout: 246 seconds)
20:31:23*sealmove joined #nim
20:34:06*ng0 quit (Quit: Alexa, when is the end of world?)
20:45:56*Perkol quit (Remote host closed the connection)
20:52:29*Jesin quit (Quit: Leaving)
20:55:50*Jesin joined #nim
20:59:07*luis_ quit (Ping timeout: 268 seconds)
20:59:57*nsf quit (Quit: WeeChat 2.4)
21:03:14*Vladar quit (Remote host closed the connection)
21:03:19*sealmove quit (Quit: WeeChat 2.4)
21:08:39disruptekso i have a runnable example that relies upon an import where implemented, but the import is unavailable when the runnable example is actually run as part of the docs build. is there an idiom for this? trying to use algorithm exports in tables runnables...
21:12:45*[rg] left #nim (#nim)
21:16:55Araqthe runnable example is supposed to have the import statement
21:19:34disruptekoh, i thought it'd end up inside a block: thanks.
21:21:42*solitudesf quit (Ping timeout: 252 seconds)
21:23:18clyybberAraq: Hey, https://github.com/nim-lang/Nim/pull/11019 is ready now I suppose.
21:30:28*rnrwashere joined #nim
21:33:29disruptekrunnableExamples seems like a great system, kudos!
21:33:44disruptekany reason not to example upon it?
21:34:02disruptekexpand, too.
21:34:28Araqclyybber: merged, thanks
21:34:45*rnrwashere quit (Ping timeout: 250 seconds)
21:35:21I_Right_Iclyybber: "I suppose"...lol is that a disclaimer?
21:36:23*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:38:08I_Right_II only say that because I cross my fingers every commit.
21:46:28*shomodj joined #nim
21:46:39clyybberI_Right_I: :D It's because I cast an adress of a (what C interprets to be a) scalar type to a struct.
21:51:04clyybberand that doesn't sound too good on paper.
21:52:38I_Right_Iyeah its sounds like something that might work now but be a bug in 3 years
21:54:41clyybberI hope not.
21:59:29*krux02 quit (Remote host closed the connection)
22:18:31*xet7 quit (Quit: Leaving)
22:26:22*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:28:10*[rg] joined #nim
22:33:38*shomodj joined #nim
22:39:47*vivus joined #nim
22:52:37*couven92 quit (Quit: Client Disconnecting)
22:55:40*vivus quit (Remote host closed the connection)
23:02:32*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:03:30*vivus joined #nim
23:07:57*shashlick quit (Remote host closed the connection)
23:15:54*vivus quit (Remote host closed the connection)
23:16:53*shashlick joined #nim
23:23:18*clyybber quit (Quit: WeeChat 2.4)
23:26:52FromDiscord<Richard Anaya> I just read the Nim Basics page https://narimiran.github.io/nim-basics ... so good !
23:27:23FromDiscord<Richard Anaya> I created a good handful of issues I think could improve it, but wow, it helped me get up to speed on Nim the fastest of all things i've encountered
23:28:57*dddddd quit (Read error: Connection reset by peer)
23:39:51*stefanos82 quit (Remote host closed the connection)