00:04:50 | * | nixfreak joined #nim |
00:13:54 | FromGitter | <ynfle> Why doesn't this (https://play.nim-lang.org/#ix=2FBJ) perform a copy to the iterator? |
00:23:42 | * | nixfreak quit (Ping timeout: 256 seconds) |
00:27:28 | FromDiscord | <Rika> because non-closure iterators are inlined? |
00:27:30 | FromDiscord | <Rika> oh |
00:27:40 | FromDiscord | <Rika> yeah nah i think thats right |
00:28:24 | * | apahl quit (Ping timeout: 240 seconds) |
00:28:46 | * | apahl joined #nim |
00:29:24 | FromGitter | <ynfle> Fails with `{.closure.}` |
00:30:19 | FromDiscord | <Rika> are you asking why x isnt copied into the iterator? |
00:31:07 | FromGitter | <ynfle> Yes. But also why it fails. Shouldn't it just copy and be done with it? |
00:38:56 | FromGitter | <ynfle> Is there a way to make "passing argument "variable name" to a sink parameter produces an implicit copy" an error as opposed to a Hint? |
00:46:24 | FromDiscord | <ElegantBeef> Why would it copy it? |
00:47:06 | FromDiscord | <ElegantBeef> It's an identical issue to adding to `x.items` |
00:47:45 | FromDiscord | <Quibono> sent a code paste, see https://play.nim-lang.org/#ix=2FBU |
00:47:46 | FromGitter | <ynfle> Right |
00:48:04 | FromDiscord | <Rika> that;s pretty idiomatic already quibono, whats wrong |
00:48:13 | FromDiscord | <ElegantBeef> iterating over newseq and adding to it |
00:48:24 | FromDiscord | <ElegantBeef> oh nvm |
00:48:27 | FromDiscord | <ElegantBeef> Yea that's idiomatic |
00:48:52 | FromDiscord | <ElegantBeef> Have i ever said i misread a lot? ๐ |
00:49:06 | FromDiscord | <Rika> well i dont remember if you did |
00:49:27 | FromDiscord | <Quibono> Lol for some reason I was convinced that wouldn't work in nim, thank you. |
00:50:11 | FromDiscord | <Rika> bruh, always try it before determining if it works or not smh |
00:51:55 | FromDiscord | <Quibono> I did, just stupidly in a way that made it fail. |
00:52:03 | FromDiscord | <Quibono> I appreciate the help. |
01:00:00 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:00:23 | * | xet7 joined #nim |
01:03:07 | FromDiscord | <tinygiant> No luck on the nimble directory with a search. Anyone know if there are any webhook listeners written in nim? |
01:11:49 | FromDiscord | <ElegantBeef> @tinygiant https://github.com/search?q=webhooks+language%3Anim |
01:12:05 | FromDiscord | <ElegantBeef> They're specific to github, but might help nonetheless |
01:12:25 | FromDiscord | <tinygiant> @ElegantBeef I'm looking for one for github anyone, so that works out. Thanks! |
01:12:33 | FromDiscord | <tinygiant> (edit) "anyone," => "anyway," |
01:19:29 | * | Tanger joined #nim |
01:19:41 | audiofile | so what language has the equivalent of specifying flags in .nims |
01:29:35 | FromDiscord | <ElegantBeef> I dont think any languages use their own language as a configuration language |
01:31:50 | FromDiscord | <JSGRANT> @ElegantBeef Well ... a lot of Lisps do; They're certianly at least somewhat 'the exception'. I've seen it in Smalltalks as well for a number of things. |
01:31:58 | FromDiscord | <ElegantBeef> Well jsgrant is typing, so lisp clearly does |
01:32:03 | FromDiscord | <JSGRANT> Ahahahahahah DYING |
01:37:02 | * | lritter joined #nim |
01:37:09 | * | filpAM quit (Quit: leaving) |
01:37:28 | FromDiscord | <JSGRANT> One word; Emacs. โตโตAnother two words; Stumpwm & Nyxt. (Window-Manager & Web-Browser respectively). |
01:37:37 | FromDiscord | <JSGRANT> But honestly https://www.youtube.com/watch?v=kY-pUxKQMUE |
01:38:36 | FromDiscord | <JSGRANT> I have a certain fondness for these enviroments (obviously) even though I'm one-removed from them at this point -- but there is a certain "purity" with everything being s-exps `all the way down` that you start to take for granted. |
01:39:33 | FromDiscord | <JSGRANT> Like I think about all the time if Javascript really did end up being a Lisp like intended and how nice it'd be to do web-programming in "one language" instead of having to manager HTML, CSS, and 'other' (ie: PROBABLY Javascript). |
01:41:22 | FromDiscord | <JSGRANT> You can sorta-kinda do this in Clojure from the little I've seen / messed around with -- but clearly that's an 'engineering around the problem' solution afaict and not a clean / from scratch like you would sorta-kinda have to of had to evolve from this direction to get there in 'one piece' lol |
01:44:56 | FromDiscord | <JSGRANT> And I mean the purity is nice; But (re: that clip) it can be taken a bit too-far -- S-expressions are AMAZING for a lot of data-rich content ... but I'm not convienced they are the `best` for paragraphs and paragraphs of markup. I've seen probably a dozen attempts at making a "markup language" with (((0))) and not much to show for it sadly. Even the Racket community was like 'Nah Dawg' and prefered @syntax instead. |
01:47:17 | FromDiscord | <JSGRANT> @ElegantBeef But honestly though; I compare Nim to Lisp a lot "spritually" and I think it's so common for me to go to this well -- because it's a language I really didn't expect to have this kind of "feel" and I'm really pleasantly surprised by it. |
01:52:17 | FromDiscord | <JSGRANT> For me, every comparison I've made technically is of very-high praise. lol And socially we've been lucky thusfar in not attracting some of the more 'abrasive characters' -- @disruptek doesn't count (lol); And is actually a sweetheart :^) |
01:56:59 | * | Tanger quit (Remote host closed the connection) |
02:00:15 | * | audiofile quit (Ping timeout: 256 seconds) |
02:14:53 | FromDiscord | <Rebel> I get worried when I am compiling my code and Nim tells me to do this.... |
02:15:17 | FromDiscord | <Rebel> `Error: 'task' is of type <lent Task> which cannot be captured as it would violate memory safety, declared here: file.nim(53, 8); using '-d:nimWorkaround14447' helps in some cases` |
02:15:46 | FromDiscord | <Rebel> task is coming from `for task in tasks` and is a custom object |
02:16:02 | FromDiscord | <Rebel> and the line it's complaining about |
02:16:05 | FromDiscord | <Rebel> `keepIf(jobSeq, proc(x: Job): bool = x.TaskId != task.parameters)` |
02:17:45 | * | audiofile joined #nim |
02:18:00 | FromDiscord | <Rebel> Should I just make a copy/deepcopy of it then? |
02:19:23 | audiofile | sounds like deep learning |
02:20:12 | * | apahl_ joined #nim |
02:21:33 | FromDiscord | <Rebel> Good guess! |
02:21:50 | FromDiscord | <Rebel> No not really lol this program has nothing to do with it ๐ |
02:23:29 | * | apahl quit (Ping timeout: 256 seconds) |
02:25:31 | FromDiscord | <Rebel> Am I missing something very obvious??? It worked before adding async to it |
02:25:32 | FromDiscord | <Rebel> https://play.nim-lang.org/#ix=2FCP |
02:26:34 | * | abm quit (Quit: Leaving) |
02:27:01 | FromDiscord | <Rebel> Maybe disruptek was right at the end of the day about async lol |
03:10:37 | * | junland quit (Quit: %ZNC Disconnected%) |
03:11:26 | * | junland joined #nim |
03:12:24 | * | rockcavera quit (Remote host closed the connection) |
03:12:45 | * | junland quit (Client Quit) |
03:13:33 | * | junland joined #nim |
03:14:14 | * | junland quit (Remote host closed the connection) |
03:15:01 | * | junland joined #nim |
03:19:49 | * | junland quit (Client Quit) |
03:20:09 | FromDiscord | <nikki> @JSGRANT can u accumulate to a global seq-like at compile time in common lisp |
03:20:18 | FromDiscord | <nikki> i mean you can just like at init time |
03:20:42 | * | junland joined #nim |
03:23:46 | * | junland quit (Client Quit) |
03:24:37 | * | junland joined #nim |
03:24:53 | * | junland quit (Remote host closed the connection) |
03:25:50 | FromDiscord | <nikki> i've written some CL and written macros and stuff, but yeah it's pretty different accumulating compile time constructs in a language with static types i guess |
03:28:41 | * | junland joined #nim |
03:29:37 | * | junland quit (Remote host closed the connection) |
03:29:39 | FromDiscord | <JSGRANT> Yeah, not aware of how you'd do this in Nim; Think you can get close leverging Nimscript probs ... but Common-Lisp in-general has a LOT more late-binding so really it's going to be hard if not impossible to get "to that level" without designing with that intent in the first-place |
03:32:32 | * | junland joined #nim |
03:41:42 | * | junland quit (Quit: %ZNC Disconnected%) |
03:42:39 | * | junland joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:37 | * | supakeen joined #nim |
04:28:59 | FromDiscord | <Quibono> sent a code paste, see https://play.nim-lang.org/#ix=2FDe |
04:36:48 | * | lritter quit (Ping timeout: 260 seconds) |
04:37:21 | * | lritter joined #nim |
04:45:43 | * | a_chou joined #nim |
04:46:06 | * | a_chou quit (Remote host closed the connection) |
04:51:06 | * | bung joined #nim |
04:54:07 | disruptek | okay, weirdo. |
04:54:19 | * | audiofile quit (Quit: Default Quit Message) |
04:57:05 | * | thomasross quit (Ping timeout: 240 seconds) |
05:02:02 | FromDiscord | <Rika> i dont see whats notable |
05:02:21 | FromDiscord | <Rika> cant python `print(aList[2:21])`? |
05:03:12 | disruptek | i fricken love that. |
05:03:33 | FromDiscord | <InventorMatt> python doesn't have slices like nim does |
05:04:01 | FromDiscord | <InventorMatt> you can only use slices when subscripting but they don't exist out of that |
05:04:42 | FromDiscord | <Rika> i mean yes but what quibono said didnt specifically mention what they meant |
05:05:03 | FromDiscord | <Rika> also i dont know any language that has slices like nim does... |
05:05:18 | disruptek | i think maybe it's the echo that's exciting. |
05:06:24 | disruptek | quibono likes echo'ing typedescs. |
05:06:51 | disruptek | fricken loves it, actually. |
05:08:51 | FromDiscord | <Rika> !eval echo seq[2..20] |
05:08:54 | NimBot | seq[range 2..20(int)] |
05:09:02 | FromDiscord | <Rika> ah i see |
05:09:12 | FromDiscord | <Rika> they mean that `seq[2..20]` is a thing |
05:09:28 | FromDiscord | <Rika> really odd to echo a typedesc... |
05:11:21 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:18:01 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2FDk |
05:19:17 | FromDiscord | <SirJosh> ๐ |
05:19:18 | FromDiscord | <Rika> yeah |
05:19:36 | FromDiscord | <Rika> looks nice |
05:20:19 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2FDn |
05:22:44 | FromDiscord | <SirJosh> converters? seems interesting |
05:22:56 | FromDiscord | <Rika> yeah but its not recommended |
05:23:02 | FromDiscord | <Rika> it might be what you want though |
05:23:15 | FromDiscord | <Rika> it enables implicit value conversion |
05:23:15 | FromDiscord | <SirJosh> kek i c what they do |
05:23:25 | FromDiscord | <SirJosh> nah that was just a little "minimal repro" if you will |
05:23:32 | FromDiscord | <SirJosh> just experimenting with concepts and ill probably do things bigger than that |
05:23:41 | FromDiscord | <Rika> okay, just sayin |
05:24:11 | FromDiscord | <SirJosh> nah yeah i appreciate the thought m8 ๐ |
05:38:43 | * | letto quit (Quit: Konversation terminated!) |
05:40:37 | * | letto joined #nim |
06:01:15 | * | narimiran joined #nim |
06:06:25 | FromDiscord | <Rebel> When Nim compiles just fine on your windows machine but yells on Linux and the errors it's giving are actually so wrong it's not even funny and if I attempt to fix those errors to make the compiler happy my code no longer works ๐ |
06:06:37 | FromDiscord | <Rebel> (edit) "When Nim compiles just fine on your windows machine but yells on Linux ... and" added "within docker container" |
06:08:00 | FromDiscord | <Rebel> Alexa play Danger Zone by Kenny Loggins `-d:danger` `--checks:off` here we go! |
06:10:25 | FromDiscord | <Rika> are you sure nothing went wrong when you copied the file into the docker container |
06:11:04 | FromDiscord | <Rebel> 75% unless docker is caching it because I make sure to edit the file then restart the docker container so it uses the new file in the build pipeline |
06:12:01 | FromDiscord | <Rebel> Rika did you see that person's question about hiding strings within their code? Did you have any alternative solutions? |
06:14:49 | FromDiscord | <Rika> not really, that was already stripped right? |
06:15:09 | FromDiscord | <Rika> maybe upx? |
06:31:26 | FromDiscord | <acek7> hows the nim community been |
06:31:37 | disruptek | horny. |
06:31:41 | FromDiscord | <Rika> its been |
06:31:42 | FromDiscord | <Rika> yeah |
06:31:43 | FromDiscord | <Rika> good enough |
06:31:53 | FromDiscord | <acek7> horny, got it |
06:34:50 | * | lritter quit (Quit: Leaving) |
06:46:38 | FromDiscord | <Rebel> Upx would get flagged big time lol he should use pezor or amber. Packing has so much entropy. Have you ever messed around with in tree llvm passes? |
07:20:06 | * | habamax joined #nim |
07:36:02 | disruptek | i have a bad feeling about this. |
07:42:40 | * | PMunch joined #nim |
07:49:33 | FromGitter | <matrixbot> `Benjamin` Hey guys, what are your thoughts on Fidget? Love it, hate it, or waiting for it to mature more before judging its potential? |
07:50:44 | FromDiscord | <ElegantBeef> I like it, it's a nice way to make a GUI |
07:51:37 | * | Torro joined #nim |
07:53:02 | FromDiscord | <warcrimecommiter1337> pezor looks nice |
07:56:19 | PMunch | ~matrix |
07:56:19 | disbot | matrix: 11Nim channels on Matrix can be found at +nim:asra.gr (https://matrix.to/#/+nim:asra.gr) |
08:15:28 | * | natrys joined #nim |
08:17:02 | FromDiscord | <Rika> @Rebel ~~amber gets minus points for being in go~~ (i am joking) |
08:37:53 | bung | in .cfg how to define x=y ? |
08:39:03 | bung | I only know define that flag name, dont know how to give it a value |
08:43:28 | * | natrys quit (Ping timeout: 246 seconds) |
08:44:13 | Clonkk[m] | If you want to define a compile time flag you can use ``-d:x=y``, if you want to overwrite a symbol at compile see https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-time-define-pragmas |
08:44:28 | Clonkk[m] | Not sure which you meant |
08:46:32 | * | natrys joined #nim |
08:46:32 | bung | that's from command line , how to write that in .cfg |
08:47:09 | FromDiscord | <Rika> I believe it's the same? |
08:49:52 | FromDiscord | <lqdev> disruptek: horny? my dude it's no nut november |
08:52:45 | bung | seems it only work for compiler known flag |
09:07:35 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:13:21 | FromDiscord | <Rika> Nonstop nut November, mind you |
09:33:35 | FromGitter | <sealmove> @PMunch hey buddy, you forgot me :3 |
09:33:44 | PMunch | Huh? |
09:33:50 | FromGitter | <sealmove> the binaryparse PR |
09:35:35 | PMunch | Ooh |
09:35:36 | PMunch | Shit |
09:35:49 | PMunch | "Expect this to be merged very soon." *facepalm* |
09:36:01 | FromDiscord | <ElegantBeef> Pmunch letting us down since i first met him |
09:36:13 | FromDiscord | <ElegantBeef> Be he still doesnt remember where i'm from, probably thinks i'm a finn |
09:36:27 | PMunch | I'm not even going to try to correct you.. |
09:36:48 | PMunch | I'm horrible at remember things like that, and I know it |
09:36:57 | PMunch | Just be glad everyone here has a name-tag |
09:37:12 | FromDiscord | <ElegantBeef> I dont have one, this is just my birthname |
09:39:57 | FromDiscord | <Rika> ok Mr. Beef |
09:40:21 | FromDiscord | <ElegantBeef> Hey you cant take my insincere joke as sincere |
09:41:24 | PMunch | There @sealmove, all merged and good :) |
09:41:32 | FromGitter | <sealmove> thanks :D |
09:41:40 | PMunch | Well you have a name-tag, your name is right next to your messages |
09:42:31 | FromGitter | <sealmove> name-tag... hum, I don't know how this works |
09:43:59 | FromGitter | <sealmove> btw would you like a small refactoring that allows for symbols in arbitrary order. For example `ul` === `lu`? I think it will help for future features. |
09:53:59 | FromDiscord | <flywind> !eval 1234567891234567891234'u64 div 1_000_000_000_000'u64 |
09:54:02 | NimBot | Compile failed: /usercode/in.nim(1, 28) Error: expression '17082782'u64' is of type 'uint64' and has to be used (or discarded) |
09:54:20 | FromDiscord | <flywind> !eval echo 1234567891234567891234'u64 div 1_000_000_000_000'u64 |
09:54:23 | NimBot | 17082782 |
09:54:47 | FromDiscord | <shad0w> !eval echo "lol" |
09:54:50 | NimBot | lol |
10:05:10 | FromDiscord | <flywind> It seems to be intended behaviour. |
10:10:51 | PMunch | @sealmove, that would be nice. It would totally ban multi-character things though |
10:10:57 | PMunch | But not sure if that is bad |
10:12:18 | FromGitter | <sealmove> Of course, I think this idea makes most sense if all symbols are single-char |
10:13:10 | FromGitter | <sealmove> Because then its implementation doesn't really add complexity to the code. |
10:14:15 | PMunch | Yeah I'm totally for it |
10:14:21 | FromGitter | <sealmove> It even subtracts complexity I think, because now we expect optional symbols in specific place. |
10:14:45 | FromGitter | <sealmove> now == current code |
10:14:59 | PMunch | Yeah, adding more optional symbols now would make the code quite messy |
10:15:43 | FromGitter | <sealmove> great, i'll work on a PR. not idea when it will be done though. couple of days? a week? two? :P |
10:17:40 | PMunch | Don't worry, I'll forget all about it and not merge it for almost two weeks anyways... |
10:18:32 | FromGitter | <sealmove> haha, nah, i can always ping you. didn't ping you sooner because i was busy with other stuff anyway, |
10:21:16 | FromDiscord | <inv> How to avoid compile-time error for tuple? https://play.nim-lang.org/#ix=2FEy |
10:22:11 | FromDiscord | <inv> I understand the reason, but not sure about workarond, maybe template would help ... |
10:26:36 | FromDiscord | <inv> yep, it works |
10:28:42 | ForumUpdaterBot | New thread by Matkuki: Ambiguous call?, see https://forum.nim-lang.org/t/7161 |
10:29:35 | FromDiscord | <InventorMatt> it's also possible to do it without the template with a few modifications https://play.nim-lang.org/#ix=2FEB |
10:32:16 | FromDiscord | <inv> thx! much better |
10:33:08 | * | lritter joined #nim |
10:33:58 | FromDiscord | <InventorMatt> no problem |
10:47:19 | FromGitter | <aivanov-atpco> oi |
10:47:30 | FromGitter | <aivanov-atpco> i am @alehander92 (work account :D) |
10:48:55 | Araq | sorry, but the last night's discussion was inappropriate |
10:49:17 | FromDiscord | <lqdev> @inv yeah tuple fields cannot be indexed at runtime because the fields' sizes aren't the same |
10:49:29 | FromDiscord | <lqdev> eg. an int is larger than a uint8 |
10:49:49 | FromDiscord | <inv> yep, I understand. Inventor made an easy solution |
10:50:08 | FromDiscord | <lqdev> yeah that works |
10:50:48 | Araq | I know I'm late with the 'mute', but please be more respectful. |
10:53:04 | Araq | (I muted disruptek.) |
10:53:56 | FromGitter | <aivanov-atpco> our chef discussion? |
10:59:52 | PMunch | I'm guessing the async anger |
11:00:43 | PMunch | But yeah, muting him now is a bit late :P |
11:02:04 | * | njoseph joined #nim |
11:17:31 | supakeen | #nim in general is quite a thing, it's the only channel I do *not* want to keep open at work in case someone looks at my screen :') |
11:19:55 | PMunch | Haha, really? |
11:20:12 | PMunch | I find it mostly friendly |
11:21:51 | supakeen | Well, as long as it isn't about fucking sheep, incest, or other such subjects yes! |
11:27:18 | PMunch | Well yeah, of course |
11:27:24 | PMunch | Wait, are you in the US? |
11:28:10 | supakeen | No! |
11:28:13 | PMunch | But how large text to you have in your IRC client for people reading over your shoulder to be an issue? |
11:28:16 | supakeen | So I think I'm safe. |
11:30:24 | FromDiscord | <inv> Is it possible to "case" several params at the same time ? |
11:30:47 | FromDiscord | <inv> case a,b of 1,2: true else: false |
11:30:55 | FromDiscord | <inv> (edit) |
11:33:22 | PMunch | Unfortunately not |
11:43:00 | FromDiscord | <haxscramper> It will be possible with pattern matching though: `case (a, b) of (1, 2): true else: false` |
11:47:15 | Araq | inv: iirc the manual shows how to do that |
11:48:34 | PMunch | Wait, is this possible? |
11:51:51 | * | rockcavera joined #nim |
11:56:47 | Araq | sure with case statement macros |
12:00:53 | ForumUpdaterBot | New thread by Miran: Advent of Nim 2020 megathread, see https://forum.nim-lang.org/t/7162 |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:37 | * | supakeen joined #nim |
12:35:24 | * | Vladar joined #nim |
12:57:47 | PMunch | Oh damn, an AoC leaderboard |
13:06:56 | Araq | narimiran, please backport https://github.com/nim-lang/Nim/pull/16161 |
13:06:56 | disbot | โฅ fixes #16154; underlying system.add for seq is the real cause; will bโฆ |
13:07:07 | narimiran | ok |
13:07:16 | Araq | once it's green of course |
13:07:19 | Araq | and merged into devel |
13:07:28 | narimiran | of course |
13:07:41 | Araq | but yeah, 4.2 is complete with this final patch |
13:10:24 | Araq | we need a better test for this though |
13:10:52 | * | hmmm joined #nim |
13:10:55 | Araq | all the previous tests were defeated with a trivial asynchttpserver test program |
13:10:58 | Araq | -.- |
13:11:00 | hmmm | hola |
13:11:16 | Araq | servus |
13:17:32 | PMunch | Got some errors trying --gc:arc on notifishower by the way |
13:17:35 | PMunch | From the C compiler |
13:17:44 | PMunch | Seems to come from the Kiwi module |
13:29:02 | planetis[m] | disruptek: sure go ahead and absorb it into jason, i'll allow it cause you're cool. |
13:29:35 | planetis[m] | and don't forget to give me compliments, you snitchel |
13:34:42 | PMunch | planetis[m], Ar4q muted disruptek earlier on today |
13:41:52 | FromDiscord | <Recruit_main707> what happened |
13:43:50 | Zevv | sigh. |
13:46:38 | FromDiscord | <shad0w> conduct voilations ? if i were to guess |
13:47:11 | FromDiscord | <shad0w> . |
13:47:40 | PMunch | Something like that |
13:47:53 | FromDiscord | <Recruit_main707> He said horny, was that it? |
13:48:22 | PMunch | This was all that Araq said: "sorry, but the last night's discussion was inappropriate" and "I know I'm late with the 'mute', but please be more respectful." |
13:48:42 | PMunch | So something from last night apparently |
13:51:41 | Zoom[m] | He attacked async brandishing his vitriolic humour and coarse invectives |
13:52:12 | FromDiscord | <aivanov> i need a vocabulary |
13:52:19 | FromDiscord | <Recruit_main707> Yeah, Iโve just scrolled up to that |
13:52:35 | FromDiscord | <Recruit_main707> ? |
13:52:39 | FromDiscord | <aivanov> is invective a word ๐ ๐ |
13:52:58 | FromDiscord | <Recruit_main707> lol XD |
13:53:12 | FromDiscord | <Rika> me with 200 iq brain: if convection is a word then invective must be a word too |
13:53:17 | FromDiscord | <Rika> (i am not serious) |
13:53:17 | Zoom[m] | @aivanov I use a pretty handy fish function to launch a local instance of `dicod` in the background and querying it with `dico` |
13:53:32 | FromDiscord | <Rika> cheater |
13:53:36 | FromGitter | <aivanov-atpco> <3 |
13:54:18 | FromGitter | <aivanov-atpco> https://packages.debian.org/stretch/le-dico-de-rene-cougnenc |
13:54:19 | FromGitter | <aivanov-atpco> wow |
13:55:07 | ForumUpdaterBot | New thread by HJarausch: Nim quiz? , see https://forum.nim-lang.org/t/7163 |
13:56:57 | Zoom[m] | My native language is neither Romance nor Germanic so I can't even imagine what not cheating would be for me. |
13:57:04 | * | waleee-cl joined #nim |
13:58:32 | Zoom[m] | Also, I probably need to use irony punctiation with my jokesยก |
14:00:16 | * | hmmm quit (Ping timeout: 256 seconds) |
14:00:53 | * | Vladar quit (Quit: Leaving) |
14:01:25 | Zoom[m] | @aivanov-atpco I think that's a wrong package. https://puszcza.gnu.org.ua/software/dico/ |
14:01:52 | FromGitter | <aivanov-atpco> yes but this name was funny :) |
14:01:54 | FromGitter | <aivanov-atpco> thanks |
14:02:28 | FromGitter | <aivanov-atpco> what about aspell: i used it for english once before year |
14:02:32 | FromGitter | <aivanov-atpco> years* |
14:02:42 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2FG8 |
14:02:56 | FromDiscord | <tomck> uh oh, backticks are hard |
14:04:12 | FromDiscord | <tomck> (edit) "https://play.nim-lang.org/#ix=2FG8" => "https://play.nim-lang.org/#ix=2FG9" |
14:04:22 | FromDiscord | <Recruit_main707> You will need the sew to be static afaik |
14:04:34 | FromDiscord | <Recruit_main707> Seq |
14:04:56 | FromDiscord | <Recruit_main707> And then you will be able to iterate over it at ct |
14:05:02 | FromDiscord | <tomck> i give up formatting, that post is a dumpster fire |
14:05:11 | FromDiscord | <tomck> so, to clarify, i'm in a macro |
14:05:13 | FromDiscord | <tomck> and i'm using `quote do` |
14:05:41 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2FGa |
14:06:06 | FromDiscord | <tomck> `bar` is a seq in my macro (it's already compile time, static, whatever) |
14:06:39 | FromDiscord | <tomck> how can i expand bar into the context, to get `foo(1, 2, 3)` rather than `foo(@[1, 2, 3])` |
14:06:53 | PMunch | TIL invective |
14:07:09 | ForumUpdaterBot | New thread by Hrm: How can I do 'fetch' or 'XMLrequest' thing in JS?, see https://forum.nim-lang.org/t/7164 |
14:08:50 | FromDiscord | <tomck> (edit) sent a code paste, see https://play.nim-lang.org/#ix=2FGb |
14:09:52 | FromDiscord | <Recruit_main707> I donโt think you can use quote do for this, you will have to manually create the ast |
14:10:45 | FromDiscord | <tomck> hmmm that's a shame, i always end up building the whole thing manually b/c i can't inject into quote do |
14:10:58 | FromDiscord | <tomck> alright, thanks, i'll build it all in code |
14:11:17 | * | hmmm joined #nim |
14:14:38 | FromDiscord | <Quibono> sent a code paste, see https://play.nim-lang.org/#ix=2FGe |
14:16:38 | FromDiscord | <Recruit_main707> we are happy you are happy |
14:16:52 | FromDiscord | <Quibono> Lol thank you. |
14:17:12 | FromDiscord | <Quibono> I'm still at the newbie stage where I'm like "THIS LANGUAGE CAN DO WHAT???" |
14:18:02 | FromGitter | <aivanov-atpco> so i talked |
14:18:08 | FromGitter | <aivanov-atpco> to my guys about nim (office friday) |
14:18:18 | FromGitter | <aivanov-atpco> i think i completely forgot some stuff |
14:19:23 | FromGitter | <aivanov-atpco> and misexplained other , but i think some got a bit interested .. |
14:19:38 | FromGitter | <aivanov-atpco> the lead guy thought not having a flagman project is the big `-` |
14:19:58 | FromGitter | <aivanov-atpco> they liked the concepts and z3 stuff iirc |
14:20:13 | FromGitter | <aivanov-atpco> and the syntax (and the interop stuff) |
14:25:54 | Zoom[m] | Did you talk about GC/ARC/ORC and recent developments in move semantics? |
14:27:23 | hmmm | hey I'm slogging thru the nim manual, what is the difference between array and openarray |
14:27:26 | Zoom[m] | In my experience a lot of people react pretty strongly on GC and don't want to hear anything after. This was one of the reasons I decided to not dive into Nim some 5-6 years ago. |
14:28:37 | Zoom[m] | hmmm: The section in the manual is pretty clear, what don't you understand? |
14:29:57 | hmmm | well I'm here: https://nim-lang.org/docs/manual.html#types-array-and-sequence-types and they just appear from nowhere, so what would I use them for |
14:30:16 | Zoom[m] | https://nim-lang.org/docs/manual.html#types-open-arrays |
14:30:55 | Zoom[m] | I suggest you Ctrl-F more |
14:31:26 | hmmm | ah ok now it's clear |
14:31:29 | Zoom[m] | Think of it as a type which allows for functions to take an array of any length as an argument. |
14:31:35 | hmmm | ty zoomie |
14:32:12 | Zoom[m] | `it can only be used for parameters` is the important bit |
14:34:45 | hmmm | it's kind of like a generic type for the arrays |
14:35:10 | * | Perkol joined #nim |
14:36:31 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2FGl |
14:37:36 | FromDiscord | <tomck> When i try the above, it can't find the `==` proc to compare typedesc, is there anythign i need to import here? |
14:39:13 | * | Vladar joined #nim |
14:42:19 | hmmm | oh the set type is interesting |
14:42:27 | FromDiscord | <Idefau> yeah |
14:42:45 | hmmm | is there a way to make a powerset? |
14:42:54 | hmmm | the list of all the subsets in a set |
14:43:24 | FromDiscord | <Idefau> should be possible |
14:43:53 | FromDiscord | <Idefau> https://rosettacode.org/wiki/Power_set#Nim |
14:44:44 | hmmm | wowowo this is pretty cool |
14:44:52 | hmmm | ty idefau |
14:45:22 | FromDiscord | <Idefau> np |
14:46:18 | FromDiscord | <Idefau> tho i find some rosseta code implementations less idiomatic and more of a direct C port |
14:46:32 | FromDiscord | <Idefau> (edit) "tho i find some rosseta code ... implementations" added "nim" |
14:48:41 | Zoom[m] | It's rather strange to use hashmap for this |
14:49:47 | Zoom[m] | It's just basic combinatoric. Don't we have an iterator for combinations? |
14:49:48 | FromDiscord | <Idefau> yea |
14:49:54 | Zoom[m] | * It's just basic combinatorics. Don't we have an iterator for combinations? |
14:50:09 | narimiran | ~itertools |
14:50:10 | disbot | no footnotes for `itertools`. ๐ |
14:50:15 | narimiran | !itertools |
14:50:31 | PMunch | !repo itertools |
14:50:32 | disbot | https://github.com/narimiran/itertools -- 9itertools: 11Nim rewrite of a very popular Python module of the same name. 15 70โญ 4๐ด |
14:50:43 | narimiran | i'll never learn how to use these bots |
14:50:50 | FromDiscord | <Idefau> it took me less amount of time to search it myself lmfao |
14:50:57 | narimiran | :P |
14:51:11 | FromDiscord | <SirJosh> the fact that nim has a GC lets me relax because you can be productive :))) |
14:51:25 | Zoom[m] | I'm not sure how to implement it for sets with holes, though. |
14:52:28 | * | Torro quit (Quit: bye) |
14:53:24 | ForumUpdaterBot | New post on r/nim by miran1: Advent of Nim 2020, see https://nim-lang.org/blog/2020/11/27/advent-of-nim-2020.html |
14:54:52 | FromDiscord | <Idefau> man i suck at aoc |
14:59:36 | * | lritter quit (Ping timeout: 240 seconds) |
15:03:19 | narimiran | 3 days to practice |
15:07:41 | Zevv | I'm skipping this year I guess |
15:07:43 | Zevv | it was fun |
15:07:48 | Zevv | while it lasted |
15:08:06 | FromDiscord | <Idefau> i might practice on the 2018 one |
15:08:50 | FromDiscord | <haxscramper> Are all tasks formulated with two-page essays, or there are some kind of 'given input, produce this output'? |
15:09:07 | Zevv | the former |
15:09:15 | Zevv | which is actually the charm of it |
15:09:29 | Zevv | it's a silly story unfolding over the month |
15:09:40 | FromDiscord | <Idefau> yea |
15:09:45 | Zevv | and you spend half your time extracting unambigious instructions from the prose |
15:09:51 | FromDiscord | <haxscramper> ah, so each task is related to previous one& |
15:10:02 | FromDiscord | <haxscramper> from story perspective |
15:10:06 | narimiran | nope |
15:10:12 | narimiran | ok, story kinda |
15:10:22 | FromDiscord | <Idefau> some tasks are related iirc |
15:10:23 | Zevv | if you want to prepare, make sure you can quickly whip up a sparse 2d grid system for all kind of cellular automata |
15:10:36 | FromDiscord | <Idefau> lol |
15:10:37 | Zevv | prepare search algorithms to find your way through maps |
15:10:43 | narimiran | Zevv: you know that i won't let you just quit like that? |
15:10:43 | FromDiscord | <Idefau> yrah |
15:10:46 | Zevv | and make sure you can create a kind of VM |
15:11:05 | FromDiscord | <Idefau> i remember i stopped after doing that int machine thing last year |
15:11:10 | Zevv | narimiran: it's getting too repetative. I'll take a peek where it's going, but not sure if I find motivation |
15:11:25 | Zevv | the fun is switching languages each year, but I have nothing on my whish list |
15:11:25 | narimiran | just first 5 task. come on |
15:11:33 | FromDiscord | <Idefau> yeah |
15:11:52 | FromDiscord | <Idefau> im not the brightest individual |
15:11:59 | FromDiscord | <haxscramper> I'm thinking about this, but I'm not good with this kind of fast-small-problem solving. Although when I do I usually use `find -name ".nim" | entr -rc nim r solution.nim` to instantly build & run solution on each save |
15:12:03 | FromDiscord | <haxscramper> Might be useful for someone |
15:12:10 | * | PMunch quit (Quit: leaving) |
15:14:11 | FromDiscord | <Idefau> last year i stopped early because i didnt really knew Nim then and i started doing it in c++ which didnt really motivate me |
15:20:16 | * | habamax quit (Ping timeout: 240 seconds) |
15:33:44 | FromGitter | <HJarausch_gitlab> Is there a means to invoke an iterator in a *while* loop instead of a *for* loop? |
15:37:32 | FromDiscord | <Rika> why? |
15:38:34 | FromDiscord | <haxscramper> You can call closure iterators like regular closure functions using `iter()` AFAIK |
15:56:21 | * | hmmmmm joined #nim |
15:56:47 | bung | Error: cannot open file: exitprocs |
15:56:51 | bung | where it is ? |
15:59:20 | FromDiscord | <haxscramper> !eval import std/exitprocs |
15:59:23 | NimBot | <no output> |
15:59:53 | FromDiscord | <haxscramper> Use `std/` prefix for importing this (and all other) libraries |
16:00:15 | FromDiscord | <haxscramper> all other libraries from nim stdlib |
16:00:42 | bung | hmm , why this module need prefix, others dont |
16:01:25 | FromDiscord | <haxscramper> Most new std modules require this prefix, and AFAIC it is recommended now use `std/` now for everything. |
16:01:38 | FromDiscord | <haxscramper> (edit) removed "now" |
16:02:29 | bung | ok, sounds good to me |
16:03:24 | ForumUpdaterBot | New thread by JPLRouge: Help C to nim conversion just precision, see https://forum.nim-lang.org/t/7165 |
16:06:46 | Zoom[m] | I practiced AOC the first year in Rust (in my tempo) and got to day 22 or so, but then it started to take too much time. I remember it being lots of fun, though. |
16:17:04 | narimiran | Zoom[m]: and imagine how much fun would you have if you didn't use rust :P |
16:29:16 | FromGitter | <sealmove> @PMunch are you still here? I had 2 questions written down about binaryparse. |
16:30:32 | Prestige | He's gone |
16:30:50 | FromGitter | <sealmove> Forever or for the day? :3 |
16:35:24 | Prestige | ๐คทโโ๏ธ |
16:47:41 | * | disruptek left #nim (#nim) |
16:54:40 | * | narimiran quit (Quit: leaving) |
17:09:56 | * | hmmm quit (Ping timeout: 240 seconds) |
17:20:52 | * | hmmm joined #nim |
17:27:04 | * | hmmm quit (Ping timeout: 246 seconds) |
17:34:51 | Zoom[m] | narimiran: I very much doubt it. Algorithmic problems are a wonderful fit for a language with an extensive type system and FP facilities. It's real world stuff which hits you with the borrow checker complaints. |
17:35:13 | * | Perkol quit (Quit: Leaving) |
17:38:44 | FromDiscord | <lqdev> ime rust's extra safety also seems like a good fit for compilers |
17:46:55 | * | abm joined #nim |
17:47:39 | ForumUpdaterBot | New thread by Geohuz: Is there any nim based 2d collision detection lib?, see https://forum.nim-lang.org/t/7166 |
17:51:30 | * | hnOsmium0001 joined #nim |
17:55:46 | * | natrys quit (Ping timeout: 246 seconds) |
17:56:09 | * | natrys joined #nim |
18:06:38 | FromDiscord | <zetashift> @Zoom[Matrix] I think miran ment it a bit more in jest than serious haha |
18:06:59 | FromDiscord | <zetashift> iirc he even used OCaml previous AoC |
18:09:32 | FromDiscord | <Idefau> i kinda want to do aoc in lisp |
18:09:35 | Zoom[m] | Yeah, of course. Just sharing my POV. |
18:10:34 | FromDiscord | <Quibono> AOC in brainfuck? |
18:11:11 | FromDiscord | <Idefau> make a brainfuck implementation in nim and do aoc in that |
18:11:18 | Zoom[m] | I wish I spent the time I spent reading Nix manuals to learn Guile... |
18:11:25 | FromDiscord | <Idefau> same |
18:12:17 | Zoom[m] | At least Guix is making steady progress, so I hope I'll switch one day. |
18:13:25 | FromDiscord | <Idefau> i used guix for a while i really like it |
18:13:27 | Zoom[m] | Better braifuck>Nim transpiler |
18:13:53 | Zoom[m] | Or the one working both ways |
18:15:35 | Zoom[m] | That could be our "flagman" project which would attract aivanov's colleagues! |
18:21:46 | FromDiscord | <For Your Health> I have this problem that has been bugging me for a while in multiple languages. I was hoping to get some thoughts on it. https://play.nim-lang.org/#ix=2FHT |
18:24:54 | FromDiscord | <haxscramper> @For Your Health I don't have enough brainpower now to fully think it through, but maybe https://nim-lang.org/docs/manual_experimental.html#term-rewriting-macros-examplecolon-hoisting might be useful for you, as well as `{.global.}` pragma for variable declaration. You can just avoid re-running expensive computations and use results |
18:25:16 | FromDiscord | <haxscramper> Without introducing any global variables to keep things |
18:25:24 | * | Vladar quit (Quit: Leaving) |
18:25:41 | FromDiscord | <haxscramper> E.g. some kind of memoization to avoid rerunning expensive parts |
18:26:44 | FromDiscord | <For Your Health> In my case as well, the calculation doesn't necessarily need to be extremely expensive. It could just be a small calculation, but maybe the procedure that depends on it is called quite frequently |
18:28:16 | FromDiscord | <For Your Health> I can take a look at that link, although I was hoping there exists a solution that doesn't involve crazy macro stuff |
18:28:52 | FromDiscord | <haxscramper> hoising is probably overkill |
18:29:18 | FromDiscord | <haxscramper> Actually you might just use `var memoTable {.global.}: Table[float32, float32]` |
18:30:02 | FromDiscord | <For Your Health> I would have to figure out what that does. Currently I have no idea |
18:30:32 | FromDiscord | <haxscramper> Similar to `static` variable declaration in C |
18:30:58 | FromDiscord | <haxscramper> `memoTable` is not destroyed between function calls, and you can put new values to it |
18:31:40 | FromDiscord | <For Your Health> What if there are multiple objects calling it? |
18:32:31 | FromDiscord | <For Your Health> In my example imagine there are multiple `Thing` instances |
18:33:17 | * | Vladar joined #nim |
18:37:10 | FromDiscord | <For Your Health> This problem has bugged me in every language I've tried. It's not a huge deal since in my case the calculations aren't that expensive usually, but it still bothers me. |
18:37:28 | * | lritter joined #nim |
18:42:48 | FromDiscord | <haxscramper> Well, I would go with memoization if computations are more expensive than table lookup. |
18:43:11 | FromDiscord | <haxscramper> and if this a performance issue |
18:45:50 | FromDiscord | <For Your Health> It's more of an academic problem for me than a serious issue. You can pass in the result of the expensive calculation as an argument to the procedure, and avoid a table lookup while using memoization. It's just that this increases the cognitive load the programmer experiences. |
18:46:10 | * | hmmmmm quit (Remote host closed the connection) |
18:47:32 | FromDiscord | <For Your Health> It puts the responsibility of memoization in the hands of the caller of the procedure I guess. |
18:47:49 | ForumUpdaterBot | New thread by Moigagoo: Automatically generated JS library wrappers?, see https://forum.nim-lang.org/t/7167 |
18:49:04 | * | thomasross joined #nim |
18:49:31 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2FI5 |
18:49:39 | FromDiscord | <haxscramper> Or something similar to this, and memoization is just implementation detail |
18:50:17 | FromDiscord | <haxscramper> Or I might've misunderstood you about 'responsibility of memoization' |
18:51:08 | FromDiscord | <For Your Health> I was referring to if you decide to pass the expensive calculation as a parameter to the procedure when I said 'responsibility of memoization' |
18:51:35 | FromDiscord | <For Your Health> I like your idea, but it is only worth it if the calculation is decently expensive right? |
18:52:08 | FromDiscord | <haxscramper> Yes, it is always tradeoff |
18:52:12 | FromDiscord | <lqdev> @haxscramper adding `threadvar` to `memoTable`'s pragmas would probably be a good idea |
18:52:25 | FromDiscord | <For Your Health> The thing is, it doesn't have to be a tradeoff, if you pass the calculation as an argument |
18:52:34 | FromDiscord | <For Your Health> I can write an example |
18:53:08 | FromDiscord | <haxscramper> I don't quite understand what do you mean when you say "calculation as an argument" (result of maybe?) so yeah, example would be quite nice. |
18:55:39 | FromDiscord | <For Your Health> Here is the example https://play.nim-lang.org/#ix=2FI8 |
18:57:51 | FromDiscord | <For Your Health> Although it doesn't have the benefit of remembering the result for other member0 values I suppose |
18:58:20 | FromDiscord | <For Your Health> Not automatically at least, the caller could do it |
19:00:49 | FromDiscord | <For Your Health> The problem I guess boils down to: abstracting cognitive burden away from the caller results in less efficient code, when maybe there is a way around it. |
19:01:52 | FromDiscord | <haxscramper> What I mean is - https://play.nim-lang.org/#ix=2FIe and yes, most abstractions are not zero-cost |
19:02:41 | FromDiscord | <haxscramper> And actually making computational expenses disappear in the thin air requires quite a lot of consideration and familiarity with concrete problem |
19:03:04 | FromDiscord | <haxscramper> Which of course is not applicable for this general example |
19:03:51 | ForumUpdaterBot | New thread by Treeform: Urlly - a new library for URL parsing for C/JS backends. , see https://forum.nim-lang.org/t/7168 |
19:08:54 | FromDiscord | <For Your Health> It seems like that may be the case unfortunately. That is a really cool example though, thanks for sharing. I'll have to save that somewhere for reference |
19:09:22 | * | nixfreak joined #nim |
19:14:16 | * | bung quit (Ping timeout: 240 seconds) |
19:15:24 | FromDiscord | <alehander42> zoom yes a bit |
19:15:35 | FromDiscord | <alehander42> but i am not good enough at it ๐ |
19:15:57 | FromDiscord | <alehander42> Araq forgive us for yesterday |
19:20:52 | * | bung joined #nim |
19:22:26 | * | hmmm joined #nim |
19:22:30 | hmmm | halo! |
19:24:01 | FromDiscord | <Rebel> Sorry for starting the great debate yesterday lol |
19:24:22 | hmmm | I missed a great debate? :o |
19:24:25 | FromDiscord | <Rebel> Ya boi just wants sleek efficient code and will do whatever works to obtain it ๐ even if it means entering the danger zone |
19:24:36 | FromDiscord | <Rebel> scroll up to 2:09 PM EST yesterday |
19:24:42 | hmmm | let's see |
19:24:56 | * | bung quit (Ping timeout: 240 seconds) |
19:26:08 | hmmm | I think my 2:09 is different from yours but I suspect disruptek was involved :p |
19:26:42 | FromDiscord | <Rebel> well I put EST so you could trivially convert it to your time zone |
19:26:51 | hmmm | not trivial for me :D |
19:27:05 | FromDiscord | <Rebel> I hope you're joking |
19:27:11 | hmmm | nop |
19:27:17 | FromDiscord | <Rebel> google 2:09 EST to my time zone..... |
19:27:24 | hmmm | hmm |
19:27:42 | FromDiscord | <Rebel> Have you seriously never converted timezones lol if you are in UK it would be 7:09 EST |
19:27:45 | FromDiscord | <Rebel> (edit) "EST" => "UTC" |
19:28:15 | hmmm | ok if 7:09 uk it's 8:09 in rome |
19:28:21 | hmmm | that makes it easier |
19:28:46 | * | bung joined #nim |
19:30:23 | hmmm | ye someone was horny I see |
19:33:47 | FromDiscord | <Idefau> i am perpetum horny |
19:38:02 | hmmm | well well well, it seems my nigui input is getting me "value + newline" how should I discard the new line without writing complex stuff |
19:39:08 | FromDiscord | <Quibono> @dom96 +1 In support of a nim-beginners channel, I'd appreciate a safer space for me to be an idiot. |
19:39:14 | hmmm | YES |
19:39:25 | hmmm | as the representative of the idiots I concur |
19:39:49 | FromDiscord | <Quibono> We have a representative? ๐ฎ |
19:39:59 | hmmm | yes the biggest one should represent :3 |
19:40:15 | FromDiscord | <Quibono> Lol those rules seem fair, but how do we determine who is the biggest? |
19:40:53 | hmmm | we read all the questions in the lasts 30 days and the most stupid questions make the biggest idiot :> |
19:41:03 | FromDiscord | <Quibono> Hahaha. ๐ |
19:41:37 | * | bung quit (Ping timeout: 264 seconds) |
19:42:13 | * | bung joined #nim |
19:42:16 | FromDiscord | <alehander42> ugh |
19:42:23 | FromDiscord | <Quibono> Okay, newbie but maybe not stupid question: What's the decision process on using something like threads/async vs Weave? |
19:46:22 | * | bung quit (Ping timeout: 246 seconds) |
19:48:10 | Zoom[m] | The funny thing is, the whole discussion about #nim-newbies started as someone suggested more should be brought to forum "for posterity", but the whole point of beginner-channels is to not log them! ๐คฃ |
19:48:54 | FromDiscord | <Quibono> Yeah, I'm much more comfortable asking stupid questions on chat than in a forum. |
19:49:06 | hmmm | oh yes I might become an historical figure in the near future, wouldn't want to be exposed by my early nim missteps |
19:49:08 | Zoom[m] | This channel logs, y'know |
19:49:15 | FromDiscord | <Quibono> Yeah |
19:49:24 | FromDiscord | <Quibono> But it's different? |
19:49:46 | FromDiscord | <Quibono> Forums feel more judgy lol. |
19:50:45 | Zoom[m] | Answering your question and trying to channel my inner disruptek: if you need to ask, just use threads over async. |
19:51:37 | FromDiscord | <Quibono> Lol, so when does one use Weave? |
19:51:40 | Zoom[m] | Read the part about async in Dom's book, better the whole book |
19:51:53 | FromDiscord | <Quibono> Lol okay rtfm |
19:52:23 | Zoom[m] | And than read "What Color is Your Function?" for balance |
19:53:10 | * | bung joined #nim |
19:53:45 | hmmm | I'm trying to use a new tech to solve my nim problems, I googled "python how to strip newline", apparently they use: "str2 = str.replace("\n", "")" now I just need to find the nim equivalent |
19:53:49 | FromDiscord | <dom96> To be honest I would hope this would be considered a safe space for newbie questions too |
19:54:15 | FromDiscord | <dom96> if we're getting 10 questions a minute, like the Python IRC channel seems to get, then we may wish to consider a separate channel ๐ |
19:54:29 | FromDiscord | <dom96> But I don't really have strong opinions here |
19:55:01 | FromDiscord | <Quibono> Lol yeah but tbh if the answer to my question is read a 300 page book, no offense to anyone, I'm just not going to learn the answer. |
19:56:06 | FromDiscord | <dom96> That's a very good question. Haven't used Weave myself so I'm also curious ๐ |
19:56:13 | Zoom[m] | 300 pages is not a lot, considering it's not some specific knowledge applicable once in a blue moon |
19:56:49 | FromDiscord | <Quibono> No it's not, but programming is a field that is really abrasive about acquiring knowledge in 'bad' ways/ |
19:57:16 | * | bung quit (Ping timeout: 240 seconds) |
19:57:44 | Zoom[m] | My extremely limited experience with coding tells me the main skill required is being comfortable and proficient in reading and navigating tech literature and documentation. |
19:58:59 | FromDiscord | <Quibono> Yeah I agree. |
20:01:33 | FromDiscord | <Quibono> I kinda want to start working on a monte carlo project/maybe library, so parallelism in Nim is kind of an interesting topic for me at the moment. |
20:01:38 | Zoom[m] | I can't speak of Weave - never used it, and the description on GH looks a bit intimidating, but I used Rayon in Rust previously and it provided a much more user-friendly way of utilizing available mulithreading capacities of the CPU than basic primitives. |
20:01:54 | Zoom[m] | If it's anything like it, it's a must |
20:01:58 | hmmm | hmm it seems I have two options, either strutils and splitlines or re and replace |
20:02:41 | Zoom[m] | What are you stripping newline from? And what for? |
20:03:21 | Zoom[m] | You need to join lines? |
20:03:27 | hmmm | the line I need to split is from my nigui input textbox, what for is basically a small exercise app :> |
20:04:02 | hmmm | I get something like "55 \n" and I don't want the \n |
20:04:48 | * | bung joined #nim |
20:05:09 | Zoom[m] | You probably want to iterate the input line by line and grow your string/sequence/whatever progressively |
20:05:40 | hmmm | nunu it's a small calculator so I process one number at a time :o |
20:07:17 | Zoom[m] | https://nim-lang.org/docs/strutils.html#stripLineEnd%2Cstring |
20:07:33 | hmmm | :O |
20:07:37 | hmmm | this is magic |
20:07:41 | hmmm | ty zoomie |
20:09:18 | * | bung quit (Ping timeout: 260 seconds) |
20:12:18 | * | bung joined #nim |
20:18:31 | * | hmmm quit (Ping timeout: 265 seconds) |
20:20:10 | * | hmmm joined #nim |
20:24:56 | * | bung quit (Ping timeout: 240 seconds) |
20:25:06 | * | avass joined #nim |
20:25:40 | avass | does nim not build binaries for musl? I happened to noticed that using choosenim on alpine didn't work very well :) |
20:28:08 | Zoom[m] | @haxscramper that example with memoTable is pretty nifty. Do we have a nim cookbook or some wiki? |
20:28:45 | FromDiscord | <dom96> avass: choosenim statically links with libc nowadays AFAIK, it should work fine on Alpine |
20:29:28 | avass | dom96: hmm maybe I need to take a closer look at that then. |
20:31:12 | FromDiscord | <haxscramper> Zoom: there are "nim by example" and "nim days" (link on the 'learn' page https://nim-lang.org/learn.html , along with some others) |
20:32:19 | * | bung joined #nim |
20:32:20 | FromDiscord | <dom96> avass: relevant issue https://github.com/dom96/choosenim/issues/216 |
20:32:21 | disbot | โฅ choosenim does not work on Linux with musl ; snippet at 12https://play.nim-lang.org/#ix=2zpU |
20:32:29 | avass | dom96: oh actually choosenim works fine, it was nimble that didn't work |
20:32:34 | FromDiscord | <haxscramper> But this specific case is more about how to get something like C's `static` (`{.global.}` pragma ) in nim, and so it probably falls under category of 'general programming stuff' |
20:32:42 | FromDiscord | <haxscramper> E.g. not really nim-specific |
20:33:00 | FromDiscord | <dom96> avass: ahh, when doesn't it work? |
20:33:09 | mipri | it's probably nimble's networking that doesn't work, and probably due to an old OpenSSL |
20:33:13 | FromDiscord | <dom96> when building something? |
20:33:54 | hmmm | oh interesting, var.stripLineEnd modifies the var in place. Why it works like that instead of something classic like var = stripLineEnd(var) |
20:34:03 | avass | yeah I get the usual 'file not found' error when trying to use nimble as if it was trying to load libc instead of musl |
20:34:03 | * | nixfreak quit (Ping timeout: 260 seconds) |
20:34:18 | avass | if that makes sense |
20:34:27 | mipri | ah, not openssl then. |
20:35:14 | FromDiscord | <dom96> Does Nim work? |
20:35:30 | avass | let me check, I don't think I installed openssl so that could also be it |
20:37:06 | * | nixfreak joined #nim |
20:38:39 | avass | checking ldd both nim and nimble tries to load libc |
20:38:55 | avass | so installing openssl didnรคt work and neither nim or nimble works |
20:39:55 | * | bung quit (Ping timeout: 246 seconds) |
20:42:01 | * | bung joined #nim |
20:42:34 | FromDiscord | <dom96> Yeah, I would call that a choosenim bug. Please report it. As a workaround you should be able to force choosenim to build you a Nim compiler + tools via `choosenim \#v1.4.0` |
20:43:09 | avass | dom96: great, thanks! |
20:44:05 | avass | I'll create and issue of github for it later so it doesn't get lost :) |
20:44:19 | FromDiscord | <dom96> thanks ๐ |
20:46:47 | * | bung quit (Ping timeout: 256 seconds) |
20:47:48 | hmmm | zoomie we makin big progress, my seq is populating very nicely |
20:50:59 | * | Vladar quit (Quit: Leaving) |
20:51:14 | Zoom[m] | <hmmm "oh interesting, var.stripLineEnd"> As Nim is not move-by-default yet, it makes sense to modify a collection in place, if you're changing/removing just the last elemnent, and not making a copy of the whole thing |
20:52:48 | * | bung joined #nim |
20:53:16 | hmmm | python makes a copy? :o |
20:57:24 | * | bung quit (Ping timeout: 256 seconds) |
21:01:18 | * | bung joined #nim |
21:05:50 | * | bung quit (Ping timeout: 256 seconds) |
21:12:21 | * | bung joined #nim |
21:16:58 | * | bung quit (Ping timeout: 260 seconds) |
21:18:19 | * | bung joined #nim |
21:19:54 | * | NimBot joined #nim |
21:20:52 | * | nickster6 joined #nim |
21:21:56 | * | nickster quit (Ping timeout: 256 seconds) |
21:21:56 | * | nickster6 is now known as nickster |
21:23:03 | * | bung quit (Ping timeout: 256 seconds) |
21:23:04 | * | supakeen quit (Ping timeout: 256 seconds) |
21:23:23 | * | bung joined #nim |
21:25:04 | * | supakeen joined #nim |
21:25:54 | * | avass quit (Ping timeout: 256 seconds) |
21:27:02 | * | nisstyre quit (Ping timeout: 256 seconds) |
21:27:49 | * | avass joined #nim |
21:29:42 | * | bung quit (Ping timeout: 256 seconds) |
21:29:51 | * | hmmm quit (Ping timeout: 256 seconds) |
21:36:06 | * | dddddd quit (Ping timeout: 256 seconds) |
21:36:46 | * | bung joined #nim |
21:39:49 | * | dddddd joined #nim |
21:40:42 | * | vsantana joined #nim |
21:40:53 | * | nisstyre joined #nim |
21:41:14 | * | Jesin quit (Quit: Leaving) |
21:41:43 | * | bung quit (Ping timeout: 260 seconds) |
21:43:25 | * | nixfreak quit (Ping timeout: 240 seconds) |
21:46:19 | * | bung joined #nim |
21:51:13 | * | bung quit (Ping timeout: 264 seconds) |
21:54:37 | FromDiscord | <haxscramper> @For Your Health On topic of avoiding computation - I also remembered that in some cases you can resort to compile-time evaluation for different things. I have macro for that case - https://play.nim-lang.org/#ix=2FJ7 - mostly I use it for `AST -> string`conversion where I need to constantly compute indentation for strings. So this macro unrolls function call and converts it into case statement |
21:55:31 | * | mbomba joined #nim |
21:55:35 | FromDiscord | <haxscramper> This is of course quite specific use case, but if you can (and with nim you have a lot of capabilities for things like that) move things to compile-time evaluation you basically have zero runtime cost |
21:56:05 | FromDiscord | <haxscramper> At the expense of longer computation and increased binary size though, but that is a tadeoff as usual |
21:56:46 | * | hmmm joined #nim |
21:57:16 | * | natrys quit (Ping timeout: 246 seconds) |
21:57:39 | FromDiscord | <haxscramper> Maybe it is worth having something similar on wiki, though examples like this tend to be relatively big (10+ lines at least) so it would be easy to get lost in them, especially if more will be added. |
21:59:22 | * | Jesin joined #nim |
22:00:30 | FromDiscord | <For Your Health> @haxscramper That's way over my head but looks cool. I'll study it when I get the chance. |
22:00:43 | * | krux02 joined #nim |
22:01:15 | * | tiorock joined #nim |
22:01:15 | * | tiorock quit (Changing host) |
22:01:16 | * | tiorock joined #nim |
22:01:16 | * | rockcavera quit (Killed (kornbluth.freenode.net (Nickname regained by services))) |
22:01:16 | * | tiorock is now known as rockcavera |
22:02:37 | * | suchasurge3 joined #nim |
22:02:48 | * | suchasurge quit (Read error: Connection reset by peer) |
22:02:48 | * | suchasurge3 is now known as suchasurge |
22:03:19 | * | ldlework quit (Remote host closed the connection) |
22:04:13 | * | ldlework joined #nim |
22:07:42 | * | vsantana quit (Quit: Leaving) |
22:10:06 | * | natrys joined #nim |
22:27:08 | * | krux02_ joined #nim |
22:27:50 | * | natrys quit (Quit: natrys) |
22:28:57 | * | krux02 quit (Ping timeout: 260 seconds) |
22:30:15 | * | bung joined #nim |
22:30:31 | ForumUpdaterBot | New thread by R3c: How to evaluate string in Nim's VM at runtime?, see https://forum.nim-lang.org/t/7169 |
22:30:58 | * | mbomba quit (Quit: WeeChat 3.0) |
22:51:49 | * | lritter quit (Ping timeout: 264 seconds) |
23:23:01 | FromDiscord | <Daniel> is there a way to connect code with gui, like pascal lazarus? |
23:23:15 | FromDiscord | <Daniel> where you can drag and drop gui, rad |
23:24:19 | FromDiscord | <Daniel> (edit) "lazarus?" => "lazarus alternative for nim?" |
23:24:27 | FromDiscord | <Daniel> (edit) "is" => "Is" |
23:24:31 | FromDiscord | <Daniel> (edit) "where" => "Where" |
23:26:11 | FromDiscord | <Quibono> Is there a reason SHA1 is in the Stdlib when it seems like SHA2 is the default now? |
23:27:43 | FromDiscord | <Rika> because sha1 is still useful? |
23:33:48 | * | bung quit (Ping timeout: 256 seconds) |
23:37:42 | FromDiscord | <Quibono> Gotcha. |
23:44:53 | * | krux02_ quit (Quit: Leaving) |
23:45:04 | FromDiscord | <Quibono> https://play.nim-lang.org/#ix=2FJx This is giving two errors and I understand neither. |
23:46:07 | FromDiscord | <Rika> ill check it out |
23:46:29 | FromDiscord | <Rika> digest doesnt return a string |
23:47:27 | FromDiscord | <Quibono> What does digest return? |
23:51:16 | FromDiscord | <Rika> a "MDigest[256]" whatever that is |
23:51:55 | Zevv | !last disruptek |
23:51:55 | disbot | disruptek left 12#nim-news 7 hours ago and last spoke 716 hours ago |