Movatterモバイル変換


[0]ホーム

URL:


<< 13-07-2025>>

01:06:19*GabrielJeff joined #nim
01:17:14*GabrielJeff quit (Quit: Leaving)
01:24:02*amadaluzia joined #nim
03:31:32FromDiscord<ajusa> Alright, I finally have an example of source code filters confusing with the escaping:↵↵https://play.nim-lang.org/#pasty=tuYAcnMW
03:32:04FromDiscord<ajusa> Can someone explain why toString doesn't seem to be doing anything? Is it because the input is already a string, so xmltree.escape isn't called?
03:32:15FromDiscord<ajusa> (edit) "confusing" => "not working" |removed "the"
03:33:59FromDiscord<ajusa> Oh I'm dumb
03:34:25FromDiscord<ajusa> It's an issue with the way the playground displays results in the browser, the first one is double escaped which is why it renders that way, the second one is rendered as is.
03:34:59FromDiscord<Elegantbeef> > Oh I'm dumb↵Using source code filter 😄
03:35:38FromDiscord<ajusa> I guess the followup question is if there's a way to get toString to run on everything but certain expressions that I've tagged in some way, usually you want to escape everything by default but provide an escape hatch
03:35:52FromDiscord<ajusa> What would you use instead Beef?
03:37:19FromDiscord<Elegantbeef> `%`
03:40:33FromDiscord<ajusa>In reply to @Elegantbeef "`%`": Not well typed (with the named parameters it's all string references) and no easy way to do if statements or loops
03:41:03FromDiscord<Elegantbeef> I don't even know what the template is for
03:41:16FromDiscord<ajusa> generating HTML
03:41:32FromDiscord<ajusa> a lahttps://github.com/dom96/nim-in-action-code/blob/master/Chapter7/Tweeter/src/views/user.nim
03:49:06FromDiscord<ajusa> oh you'll love this beef
03:49:09FromDiscord<Elegantbeef> Yea that doesn't say much
03:49:17FromDiscord<Elegantbeef> That's what i'd consider usable
03:49:25FromDiscord<ajusa>https://play.nim-lang.org/#pasty=bNlwlIWI
03:49:27FromDiscord<Elegantbeef> If I want to generate html I use karax
03:51:15FromDiscord<ajusa>In reply to @Elegantbeef "If I want to": yeah that's fair. I used that for a long time, but honestly converting from HTML to Karax can be a bit painful (when working with existing HTML snippets). I also don't remember if Karax does escaping correctly by default
03:52:24FromDiscord<ajusa> Looks like it doeshttps://github.com/karaxnim/karax/blob/a1eaaa87af756c21db4524c38cad4a004218f740/karax/vdom.nim#L460-L470
04:21:13*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
04:24:56*amadaluzia joined #nim
04:34:00*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
05:24:27*skippy8 joined #nim
06:44:23*thunder joined #nim
07:02:30*thunder quit (Quit: Leaving)
07:03:18*thunder joined #nim
09:52:20FromDiscord<coffeecat0330> do you know why there's so many russian developers in nim community?
09:55:59FromDiscord<0xfab_10> really?
10:10:02*xet7 quit (Remote host closed the connection)
10:18:49FromDiscord<coffeecat0330> nimx developer was russian and ↵i saw some nim developers with russian name and↵there is russian channel in nim
10:20:56FromDiscord<blackmius>In reply to @coffeecat0330 "do you know why": why?
10:22:23FromDiscord<coffeecat0330>In reply to @blackmius "why?": i don't know
10:22:30FromDiscord<coffeecat0330> I'm just asking
10:27:38*tokyovigilante quit (Read error: Connection reset by peer)
10:27:55*tokyovigilante joined #nim
10:31:31*strogon14 quit (Quit: Auf Wiese geh'n!)
10:32:41*strogon14 joined #nim
10:33:30FromDiscord<blackmius> it seems to you, the same as in other languages
10:35:44FromDiscord<0xfab_10> I've seen more germans around here ngl
10:35:54FromDiscord<0xfab_10> (edit) "I've seen more germans ... around"added "than other nationalities"
11:31:23FromDiscord<coffeecat0330> hey I I got an error
11:31:28FromDiscord<coffeecat0330> (edit)removed "I"
11:32:24FromDiscord<coffeecat0330>sent a code paste, seehttps://play.nim-lang.org/#pasty=dFxAXrGC
11:32:53FromDiscord<coffeecat0330> do you know make this error?
11:33:07FromDiscord<coffeecat0330> I checked tabs but there's no tabs
11:34:38FromDiscord<coffeecat0330> all parentheses are closed
11:35:02FromDiscord<0xfab_10> when you have a list of parameters with the same type `a, b, c, d: var uint32; ` use the semicolon
11:36:34FromDiscord<coffeecat0330> I correct that but
11:36:37FromDiscord<coffeecat0330> have same error
11:36:53FromDiscord<coffeecat0330> my nim version is 1.6.14 Linux, amd64
11:37:00FromDiscord<coffeecat0330> am i have to upgrade?
11:37:28FromDiscord<0xfab_10> that's a pretty old version
11:37:36FromDiscord<0xfab_10> we're at 2.20+
11:37:47FromDiscord<coffeecat0330> ow...
11:37:51FromDiscord<coffeecat0330> I have to upgrade it...
11:38:09FromDiscord<0xfab_10> (edit) "2.20+" => "2.2+"
11:38:17FromDiscord<0xfab_10> are you on debian based?
11:38:22FromDiscord<coffeecat0330> ubuntu based
11:38:28FromDiscord<0xfab_10> same thing
11:38:34FromDiscord<0xfab_10> yeah apt has very old stuff
11:38:40FromDiscord<coffeecat0330> oh...
11:38:50FromDiscord<coffeecat0330> apt...
11:39:13FromDiscord<0xfab_10> you can either use `choosenim` (which I haven't tried) or compile nim from source
11:39:33FromDiscord<0xfab_10> from source doesn't take that long even on low end hardware
11:39:44FromDiscord<coffeecat0330> and i want you to ask something that↵can't AArch64 users can't use nim?
11:40:05FromDiscord<coffeecat0330> i'm amd64 but
11:40:28FromDiscord<0xfab_10> last time I checked nim worked on armv7
11:40:29FromDiscord<coffeecat0330> do AArch64 users have to build themselves?
11:40:37*jjido joined #nim
11:43:08FromDiscord<0xfab_10> yeah doesn't seem like there's premade binaries for aarch64
11:43:44FromDiscord<0xfab_10> but compiling from source doesn't take that long and seems like choosenim can do that for youhttps://github.com/nim-lang/choosenim?tab=readme-ov-file
11:48:33FromDiscord<coffeecat0330> and does nim support ↵power, RISC-V, MIPS, PowerPC, and other arch?
11:48:38FromDiscord<coffeecat0330> (edit) "arch?" => "archs?"
11:50:06FromDiscord<0xfab_10>https://nim-lang.org/docs/packaging.html
11:55:32FromDiscord<rakgew> I built nim on raspi arm64 a couple of times - it is not too bad.↵(@coffeecat0330)
11:58:06FromDiscord<litlighilit> func
11:58:32FromDiscord<litlighilit> for `func: untyped`↵(@coffeecat0330)
11:59:21FromDiscord<litlighilit> for `func: untyped`, use another name like `function`.↵as `func` is a keyword in Nim
11:59:31FromDiscord<litlighilit> for `func: untyped`, use another name like `function`.↵as `func` is a reserved keyword in Nim
12:00:03FromDiscord<litlighilit> for `func: untyped`, use another name like `function`.↵as `func` is a reserved keyword in Nim↵@coffeecat0330
12:01:14FromDiscord<coffeecat0330> how i have to fix it...
12:01:18FromDiscord<coffeecat0330> tell me more about it
12:01:49FromDiscord<litlighilit> "use another name"
12:02:01FromDiscord<litlighilit> function\: untyped
12:02:16FromDiscord<litlighilit> or quoted it with \`\`\`
12:02:44FromDiscord<litlighilit> or quoted it with \` (Backquotation marks)
12:03:11FromDiscord<litlighilit>sent a code paste, seehttps://play.nim-lang.org/#pasty=rjLOVyfF
12:03:42FromDiscord<litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1393925379756134421): "use another name" for identifier
12:03:56FromDiscord<coffeecat0330> template round(a, b, c, d: var uint32;, k, s, i: int, func: untyped) =↵ a = b + leftRotate(a + func(b, c, d) + X[k] + T[i], s)
12:04:00FromDiscord<coffeecat0330> this is full code
12:04:38FromDiscord<litlighilit> template round(a, b, c, d\: var uint32;, k, s, i\: int, function\: untyped) =↵a = b + leftRotate(a + function(b, c, d) + X[k] + T[i], s)
12:04:49FromDiscord<coffeecat0330> okay
12:04:51FromDiscord<coffeecat0330> thanks
12:15:45FromDiscord<lainlaylie>In reply to @fabric.input_output "you can either use": cool kids use grabnim
12:19:43FromDiscord<griffith1deadly>In reply to @coffeecat0330 "nimx developer was russian": there's also ukrainian but no ukrainian channel
12:40:07*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
12:45:50*thunder quit (Quit: Leaving)
13:11:42*beholders_eye joined #nim
13:55:39*jjido joined #nim
13:55:51*beholders_eye quit (Ping timeout: 244 seconds)
13:56:47*skippy8 quit (Quit: WeeChat 4.6.3)
14:03:34*birle quit (Quit: birle)
14:03:43*skippy8 joined #nim
14:07:12*birle joined #nim
14:07:12*birle quit (Changing host)
14:07:12*birle joined #nim
14:09:16*skippy8 quit (Quit: WeeChat 4.6.3)
14:14:05*beholders_eye joined #nim
14:14:25*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
14:17:31*skippy8 joined #nim
14:26:41*birle quit (Quit: birle)
14:26:51*birle joined #nim
14:29:19*jjido joined #nim
14:33:46*pmp-p quit (Ping timeout: 252 seconds)
14:37:38*birle quit (Quit: birle)
14:37:52*birle joined #nim
14:39:06*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
15:03:57*xet7 joined #nim
15:39:18FromDiscord<janakali>In reply to @coffeecat0330 "do AArch64 users have": there are nightly builds for arm64:https://github.com/nim-lang/nightlies/releases↵grabnim can install it for you, (also has arm64 builds):https://codeberg.org/janAkali/grabnim
15:39:49*jjido joined #nim
15:55:26*xet7 quit (Remote host closed the connection)
15:56:43*xet7 joined #nim
15:57:20*xet7 quit (Remote host closed the connection)
15:58:17*xet7 joined #nim
16:14:44*beholders_eye quit (Ping timeout: 265 seconds)
16:22:57*amadaluzia joined #nim
16:45:52*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
16:51:44FromDiscord<Laylie> the features feature might help (your message didn't make it across the bridge)

[8]ページ先頭

©2009-2025 Movatter.jp