00:00:50 | * | ftsf joined #nim |
00:06:18 | disruptek | !repo marsh |
00:06:19 | disbot | https://github.com/disruptek/marsh -- 9marsh: 11marshal native Nim objects via streams 15 0⭐ 0🍴 |
00:06:54 | disruptek | 78mb in 0.2 (write), 0.25 (read) |
00:07:00 | disruptek | bbl |
00:07:56 | * | hpyc9 joined #nim |
00:09:42 | disruptek | .22 write and .22 read with arc. |
00:12:07 | * | BehrangDadsetan quit () |
00:18:19 | FromDiscord | <willyboar> "or if you're still using Nimble like it's 2012" 🤣 🤣 🤣 |
00:28:30 | * | Jesin quit (Quit: Leaving) |
00:39:48 | * | Jesin joined #nim |
00:41:36 | * | NimBot joined #nim |
00:50:02 | * | Avatarfighter quit (Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in) |
00:50:13 | * | Avatarfighter joined #nim |
01:10:54 | * | konvertex quit (Ping timeout: 240 seconds) |
01:11:52 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:12:16 | * | Tlongir joined #nim |
01:12:33 | * | pbb joined #nim |
01:13:47 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:15:55 | * | chemist69 joined #nim |
01:46:49 | Avatarfighter | When you open a file and start writing to it, is that file stored in memory until you close it or is it writing as you call write? |
01:48:48 | disruptek | ask your os. |
01:49:52 | Avatarfighter | .-. ok |
01:51:10 | Avatarfighter | https://bit.ly/2zRs7gQ this is me rn trying to figure out how I caused my program to eat 16gb of memory |
01:56:56 | * | lritter joined #nim |
01:59:51 | Avatarfighter | disruptek are you working on anything fun/unfun atm? |
02:04:32 | * | monok quit (Remote host closed the connection) |
02:06:39 | disruptek | never. |
02:09:31 | Avatarfighter | never working on anything!? |
02:10:36 | disruptek | i'm working on this marshal code. |
02:10:43 | FromDiscord | <Elegant Beef> He's just indifferent to the fun-ness |
02:10:52 | Avatarfighter | Disruptek is the king of fun |
02:11:14 | disruptek | it turns out that a prostate massager makes any code fun. |
02:11:16 | Avatarfighter | he is working on marshaling stuff its so fun some people would die to do it :D |
02:12:18 | disruptek | it's pretty stupid stuff, honestly, but it started with araq parsing 2mb of C in 0.6s. |
02:12:26 | Avatarfighter | lmfao |
02:12:34 | Avatarfighter | that's wildly fast |
02:12:37 | disruptek | now i'm doing >500mb in 1.5s, so i think it was worth hacking at. |
02:12:52 | Avatarfighter | why were you two parsing C? |
02:13:04 | disruptek | don't loop me into his shenanigans. |
02:13:21 | Avatarfighter | I would like to hear more about these parsing shenanigans :P |
02:13:55 | disruptek | i thought it was stupid, then i thought it was iffy, then lua proved twice as fast, now nim is like, i dunno, 160x faster. |
02:14:16 | Avatarfighter | wym you were parsing C btw |
02:14:23 | Avatarfighter | im curious about that aspect |
02:14:38 | Avatarfighter | this is the first time I've heard of competitive parsing :P |
02:14:48 | disruptek | araq's idea was to use the C code we generate as a database for the purposes of incremental compilation. |
02:15:14 | disruptek | that part makes some sense, since in theory it holds an image of the important bits. |
02:15:47 | Avatarfighter | that's a neat thing to do ngl |
02:15:53 | disruptek | it was only competitive because i happened to have worked out lua parsing and i had a benchmark to throw in his face. |
02:16:01 | Avatarfighter | lmao |
02:20:05 | disruptek | i'm sure araq could take what i've written and make it 4x faster. |
02:20:48 | disruptek | the point is that the speed of the backend is not a bottleneck, and neither is any reliance on status code or sqlite or lmdb. |
02:21:11 | disruptek | we have a native nim implementation that is xplatform and all that. |
02:22:00 | disruptek | and it's like 50-100 lines before comments and tests and stuff. |
02:22:04 | bung | python's range func has too much hidden rules.. |
02:22:24 | Avatarfighter | whats the issue with the range func lol |
02:22:31 | disruptek | i think it improved in 3, though. |
02:22:47 | Avatarfighter | bung wym by hidden rules |
02:23:53 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:24:01 | bung | You cant simplely using nim's countup countdown replace it |
02:24:45 | Avatarfighter | what do you mean? You should easily be able to emulate countup/countdown with range() in py |
02:25:34 | * | muffindrake joined #nim |
02:26:24 | bung | i guess I should using reversed |
02:27:07 | bung | when you using countup/countdown you shold know start end which is bigger |
02:31:36 | * | couven92 joined #nim |
02:33:10 | * | zacharycarter quit (Ping timeout: 258 seconds) |
02:43:35 | FromDiscord | <Zed> How do pointers work? |
02:43:50 | FromDiscord | <Elegant Beef> They point |
02:44:14 | FromDiscord | <Zed> lol, but how do you create a pointer? or pass a pointer to a function? |
02:44:38 | FromDiscord | <Elegant Beef> `var a = b.addr` |
02:46:28 | FromDiscord | <Zed> ah |
02:46:52 | FromDiscord | <Zed> well that's semi simple |
02:55:11 | * | justsomeguy joined #nim |
03:02:07 | FromDiscord | <Yardanico> @Zed you don't need to use raw pointers though |
03:02:39 | FromDiscord | <Yardanico> Nim has "ref" - managed pointers, you create them when a type is "ref something" |
03:02:52 | FromDiscord | <Yardanico> Raw pointers are mostly needed for FFI and low level stuff |
03:03:05 | FromDiscord | <Zed> so `ref variableName`? |
03:03:23 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#types-reference-and-pointer-types |
03:05:23 | FromDiscord | <Yardanico> you rarely need to create references to value types like ints or strings though |
03:08:57 | FromDiscord | <Yardanico> Most of the time you want ref object if some object is mutated a lot of if it's big enough |
03:11:57 | * | Tongir joined #nim |
03:14:25 | * | Tlongir quit (Ping timeout: 246 seconds) |
03:19:42 | * | justsomeguy left #nim (#nim) |
03:20:16 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:32:22 | FromDiscord | <Elegant Beef> I find C# funny in that regard, most things are classes and structs rarely get used |
03:32:30 | FromDiscord | <Elegant Beef> Atleast by novices |
03:49:11 | FromDiscord | <Yardanico> That's common in all OOP languages |
03:53:18 | * | endragor joined #nim |
03:55:41 | * | rockcavera quit (Remote host closed the connection) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:36 | * | supakeen joined #nim |
04:09:47 | * | B4s1l3 joined #nim |
04:10:47 | * | B4s1l3 is now known as opDispatch |
04:12:56 | * | NimBot joined #nim |
04:17:25 | * | couven92 quit (Ping timeout: 246 seconds) |
04:24:43 | * | dddddd quit (Ping timeout: 258 seconds) |
04:47:49 | * | narimiran joined #nim |
05:02:54 | * | kungtotte quit (Read error: Connection reset by peer) |
05:03:16 | * | kungtotte joined #nim |
05:43:10 | bung | good afternoon |
05:45:04 | FromDiscord | <willyboar> good morning 🙂 |
05:46:45 | bung | ok, morning time there |
06:02:17 | leorize[m] | can someone on mac run this and give me the output? `openssl s_client -showcerts -connect incomplete-chain.badssl.com:443` |
06:03:38 | Avatarfighter | Do you think that the output of that on ios will suffice? |
06:04:00 | Zevv | oi disruptek, still awake? |
06:06:35 | bung | https://pastebin.com/1Fsvp8md here you go |
06:07:32 | Yardanico | leorize[m]: https://bpa.st/WPRA |
06:08:58 | leorize[m] | thanks, but guess I'll have to wait for federico3 to return to figure out why that error doesn't happen in the nim code |
06:09:59 | leorize[m] | context: https://github.com/nim-lang/Nim/pull/14542/checks?check_run_id=729434995#step:12:69 |
06:10:00 | disbot | ➥ asyncnet, net: call SSL_shutdown only when connection established [backport] |
06:10:00 | leorize[m] | this should error but it didn't |
06:38:01 | * | dadada joined #nim |
06:38:25 | * | dadada is now known as Guest41040 |
06:45:11 | Zevv | 1st world problems you got there. With me it's always stuff that errors when it shouldn't |
06:45:28 | Yardanico | lol |
06:45:32 | Yardanico | isn't your case easier |
06:45:47 | Yardanico | i think it's easier to debug when it errors but it shouldn't instead when it doesn't error but it should |
06:50:50 | * | Froggster joined #nim |
06:54:10 | * | PMunch joined #nim |
06:54:26 | bung | !eval for x in (2.. -2) : echo x |
06:54:29 | NimBot | <no output> |
06:54:40 | Yardanico | bung: .. doesn't work as countdown |
06:54:49 | Yardanico | !eval for x in countdown(2, -2): echo x |
06:54:51 | NimBot | 2↵1↵0↵-1↵-2 |
06:55:10 | bung | should design for misused ? |
06:55:52 | bung | if start and end is a param comming from somewhere |
06:55:57 | Yardanico | bung: ? |
06:56:04 | Yardanico | do checks |
06:56:52 | bung | it I know to do check I wouldn't write code like that. |
06:56:55 | bung | if |
06:57:46 | Yardanico | !eval let start = 2; let end = -2; for x in (if end > start: start .. end else: end .. start): echo x |
06:57:47 | NimBot | Compile failed: /usercode/in.nim(1, 20) Error: identifier expected, but got 'keyword end' |
06:58:05 | Yardanico | !eval let start = 2; let stop = -2; for x in (if stop> start: start .. stop else: stop .. start): echo x |
06:58:08 | NimBot | -2↵-1↵0↵1↵2 |
06:58:11 | Yardanico | see |
06:59:10 | bung | oh no, I just wondering kind of this could classify as a language design problem ? |
07:00:32 | bung | for avoiding misused ? |
07:03:57 | * | Guest83 joined #nim |
07:04:57 | * | Guest83 is now known as WeLitAndWeOut |
07:05:15 | leorize[m] | it's usually a problem on "how to interpret the developer intentions" and "how to avoid suprises" |
07:07:14 | * | WeLitAndWeOut is now known as Egg |
07:07:51 | bung | ok I just throw it out, I found this when I porting python lib , it use `range` function |
07:08:54 | * | Egg is now known as david-ike-was-ri |
07:09:37 | * | david-ike-was-ri is now known as Buy-My-ICO |
07:12:28 | * | Tlanger joined #nim |
07:14:54 | * | Tongir quit (Ping timeout: 260 seconds) |
07:15:10 | PMunch | bung, yeah it's certainly one of those gotchas when coming from Python |
07:15:23 | PMunch | You could of course write your own `range` iterator |
07:16:05 | * | Buy-My-ICO quit (Quit: Connection closed) |
07:17:33 | bung | PMunch yeah, I wrote a iterator named as pyRange for this. |
07:19:57 | Zevv | I still wonder why people keep refusing to allow .. to downcount |
07:20:24 | Zevv | are they really concerned about the overhead of one single "if" in the top of the iterator? |
07:20:45 | PMunch | I think it's more about being explicit vs. implicit |
07:20:54 | Zevv | how's that different. |
07:21:10 | Zevv | it's just semantics |
07:21:55 | PMunch | Well as it is now .. is just an alias for countup, and we also have countdown. So using .. is explicitly only increasing, and it will throw an error if you by accident pass in indexes that doesn't make sense. |
07:22:08 | PMunch | It's a weak bit of protection in a way |
07:23:33 | PMunch | Zevv, how do you fetch the IRC logs by the way? For your graphs |
07:25:46 | Zevv | for l in lines("/home/ico/irc/2020/06/01"): |
07:26:01 | Zevv | Zevv, proudly logging since 1993! |
07:26:03 | PMunch | https://github.com/nim-lang/nimbot <- is this the actual live NimBot that does the logging? Hasn't it had a single change since 2017? |
07:26:13 | PMunch | Zevv, oh so you're logging yourself.. |
07:26:49 | Zevv | right |
07:29:34 | * | opal quit (Remote host closed the connection) |
07:29:50 | bung | Yardanico what project you working on ? |
07:30:10 | * | filcuc joined #nim |
07:30:58 | * | opal joined #nim |
07:40:48 | * | NimBot joined #nim |
07:53:37 | PMunch | Hmm, I have a "new result" in some old code and I get: "Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]" errors |
07:58:18 | * | Guest41040 quit (Ping timeout: 260 seconds) |
08:02:00 | * | endragor quit (Remote host closed the connection) |
08:02:04 | * | letto_ quit (Quit: Konversation terminated!) |
08:04:03 | * | letto joined #nim |
08:05:33 | * | dadada joined #nim |
08:05:57 | * | dadada is now known as Guest44614 |
08:09:29 | * | NimBotNg joined #nim |
08:11:28 | PMunch | Hello NimBotNg :) |
08:12:02 | PMunch | Just trying to build the nimbot code, surprisingly few edits required |
08:13:58 | * | endragor joined #nim |
08:14:03 | * | kenran joined #nim |
08:14:46 | * | NimBotNg quit (Remote host closed the connection) |
08:29:38 | * | Guest44614 quit (Ping timeout: 256 seconds) |
08:30:45 | * | dadada__ joined #nim |
08:32:28 | * | Senketsu joined #nim |
08:33:17 | * | kenran quit (Quit: leaving) |
08:34:04 | * | Senketsu quit (Client Quit) |
08:41:56 | FromDiscord | <Varriount> Ok, are all PRs currently failing due to valid reasons, or has the CI/CD pipeline sprung a leak? |
08:44:51 | Araq | the CIs are in a bad shape |
08:47:42 | Araq | but mighty Timothee is saving us :-) https://github.com/nim-lang/Nim/pull/14547 |
08:47:43 | disbot | ➥ fix common source of flaky tests (503 github errors) by retrying with backoff |
08:48:55 | * | zacharycarter joined #nim |
08:53:29 | FromDiscord | <Elegant Beef> Who'd have thought that `if(failing):dont()` would be so difficult 😄 |
08:59:27 | alehander92 | oi |
08:59:30 | alehander92 | morning |
09:01:57 | * | Tongir joined #nim |
09:03:38 | alehander92 | i dont know, parsing C sounds exhausting |
09:04:43 | * | Tlanger quit (Ping timeout: 260 seconds) |
09:21:42 | * | NimBotNg joined #nim |
09:22:10 | PMunch | Still just testing some stuff with NimBot |
09:22:13 | * | NimBotNg quit (Remote host closed the connection) |
09:37:52 | * | konvertex joined #nim |
09:41:30 | * | NimBotNg joined #nim |
09:41:45 | PMunch | Just another test |
09:41:47 | * | NimBotNg quit (Remote host closed the connection) |
09:42:01 | * | couven92 joined #nim |
09:42:25 | * | couven92 is now known as fredrikhr |
09:44:14 | * | dadada__ quit (Ping timeout: 260 seconds) |
09:44:43 | * | opal quit (Ping timeout: 240 seconds) |
09:45:48 | * | rokups joined #nim |
09:50:39 | * | dadada joined #nim |
09:51:02 | * | dadada is now known as Guest57749 |
09:52:22 | * | NimBotNg joined #nim |
09:52:34 | * | NimBotNg quit (Remote host closed the connection) |
09:53:16 | * | NimBotNg joined #nim |
09:53:18 | * | NimBotNg quit (Remote host closed the connection) |
09:53:56 | * | NimBotNg joined #nim |
09:54:20 | * | NimBotNg quit (Remote host closed the connection) |
09:55:55 | * | letto quit (Ping timeout: 256 seconds) |
09:56:27 | * | NimBotNg joined #nim |
09:56:33 | * | NimBotNg quit (Remote host closed the connection) |
09:56:48 | * | NimBotNg joined #nim |
09:56:51 | * | NimBotNg quit (Remote host closed the connection) |
09:56:54 | FromDiscord | <Synth> Does anyone know how I can parse a procedure that returns a generic type `T` into an if statement? |
09:57:01 | * | letto joined #nim |
09:57:30 | FromDiscord | <Synth> For example, I would have a generic procedure return type string or false and I want to check if the procedure return false or a string |
09:57:47 | FromDiscord | <Synth> Please ping me when someone is able to assist me, thank you! |
09:58:00 | alehander92 | you can use `when` |
09:58:11 | alehander92 | but i dont think it works the way you think |
09:58:25 | alehander92 | a generic procedure would still return the same type in the same context |
09:58:49 | alehander92 | because it just "generates" many procedures, some of them returning bool, some string etc |
09:59:18 | PMunch | @Synth ^ |
09:59:35 | alehander92 | what are you trying to di |
09:59:43 | * | opal joined #nim |
09:59:56 | PMunch | @willyboar, are you on? |
10:02:26 | FromDiscord | <Synth> Ahh I see |
10:02:49 | FromDiscord | <Synth> Well, I have a procedure that returns the contents of the file if it exists and returns false if it doesn't |
10:03:27 | alehander92 | :) |
10:03:49 | alehander92 | interesting |
10:03:59 | alehander92 | one can use a tuple `(string, bool)` |
10:04:02 | alehander92 | or Option |
10:04:10 | alehander92 | `Option[string]` (from `options`) |
10:04:41 | alehander92 | or an exception: usually those are the ways you can deal with optional values in typed languages (or a custom param for result, but no need for that imho) |
10:05:26 | FromDiscord | <Synth> Ahh I see |
10:05:35 | alehander92 | so use whatever you want: i think option is the best |
10:05:35 | FromDiscord | <Synth> Could you give me a example in a codeblock? |
10:05:38 | FromDiscord | <Synth> I'm sorry ;-; |
10:05:42 | alehander92 | but you can choiose other |
10:05:55 | FromDiscord | <Synth> How would I use the tuple method? |
10:05:59 | FromDiscord | <Synth> If tuple? |
10:06:03 | alehander92 | no problem |
10:06:05 | alehander92 | https://nim-lang.org/docs/options.html |
10:06:11 | alehander92 | here they show a good example |
10:06:20 | FromDiscord | <Synth> Thank you very much! |
10:07:41 | alehander92 | a tuple would be e.g. (string, bool) => (value, false) for normal and ("", true) or (string, SomeErrorType) => (value, nil) for normal and ("", SomeErrorValue) for error |
10:07:45 | alehander92 | but i'd use options |
10:08:26 | alehander92 | because looking at the api tells me in an obvious way |
10:08:34 | alehander92 | "this is an optional value" |
10:09:04 | PMunch | Yeah "Option" is definitely your best bet here |
10:09:07 | alehander92 | however tuples might be also a good choice, if one doesnt want to unpack with `.get` really down to what you want |
10:09:25 | FromDiscord | <Synth> Ahh okay, thank you! |
10:09:27 | PMunch | But you'd still have to unpack the tuple.. |
10:09:29 | FromDiscord | <Technisha Circuit> How do i make it do removePrefix returns the value of the text? |
10:09:36 | FromDiscord | <Technisha Circuit> (edit) 'How do i make it do removePrefix returns the value of the ... text?' => 'How do i make it do removePrefix returns the value of thenee' |
10:09:37 | FromDiscord | <Synth> What do you mean? |
10:09:39 | FromDiscord | <Technisha Circuit> New* |
10:09:49 | FromDiscord | <Technisha Circuit> Is it sugar.dup? |
10:10:12 | PMunch | I'm guessing removePrefix takes a var string and it's in-place? |
10:10:19 | alehander92 | synth , so option is better, but if you really like it, you can use the other things |
10:10:21 | PMunch | In that case you'd need to wrap it |
10:11:38 | * | Jesin quit (Quit: Leaving) |
10:12:22 | FromDiscord | <Rika> if its inplace use sugar.dup |
10:13:29 | * | adnan338 quit (Ping timeout: 256 seconds) |
10:13:58 | * | Jesin joined #nim |
10:14:05 | FromDiscord | <Technisha Circuit> Thanks! So would it be like `sugar.dup("string". removePrefix("prefix"))`? |
10:14:27 | FromDiscord | <Rika> ufcs where smh |
10:14:33 | FromDiscord | <Rika> comma too lmao |
10:14:34 | FromDiscord | <Rika> not period |
10:14:51 | FromDiscord | <Technisha Circuit> Wut? |
10:15:21 | FromDiscord | <Rika> `g". rem` |
10:16:37 | PMunch | @Technisha Circuit: https://play.nim-lang.org/#ix=2o5U |
10:16:45 | PMunch | Not sure what Rika is on about :P |
10:17:21 | PMunch | Or depending on your preferences this also works of course: https://play.nim-lang.org/#ix=2o5V |
10:22:45 | * | Senketsu joined #nim |
10:34:07 | PMunch | Does pinging people over the bot with spaces in their names work by the way? |
10:34:25 | voltist | There is a bot for pinging people? |
10:34:26 | FromDiscord | <lex> sent a code paste, see http://ix.io/2o5X |
10:34:28 | FromDiscord | <lex> am I importing correctly? |
10:34:50 | FromDiscord | <lex> linter is getting mad at me |
10:35:18 | PMunch | voltist, I mean here on IRC you ping people simply by mentioning their name. But on Discord and Gitter you need @ before their username |
10:35:31 | voltist | Ah right |
10:35:38 | PMunch | So the FromDiscord and FromGitter bots will try to convert those to actual pings |
10:36:09 | PMunch | @lex, yeah that looks fine |
10:36:19 | PMunch | (Although Nim uses 2 spaces for indentation, not 4) |
10:36:27 | FromDiscord | <lex> cannot open file: ../util/prompt |
10:36:32 | FromDiscord | <lex> I prefer 4 spaces lmao |
10:36:36 | FromDiscord | <lex> idk I suppose I can use two |
10:36:41 | FromDiscord | <lex> adds more readability for my blind ass |
10:36:55 | PMunch | You get used to it quickly, I was also not super happy with it to begin with |
10:37:00 | voltist | shashlick: Sorry for getting all up in your pings whilst you were away; I'm having a serious case of not being able to use nimterop :) |
10:37:11 | PMunch | Now I think Python just looks like a bunch of whitespace :P |
10:37:52 | PMunch | Try to add .nim to that import statement. I think maybe with filepaths you need that |
10:38:14 | voltist | PMunch: I don't think thats the case is it? |
10:38:31 | PMunch | But I think they are also relative to cwd when the compiler is invoked (a bit dumb, but I think that's the case). |
10:38:56 | PMunch | voltist, I don't remember, but doesn't hurt to try :P |
10:40:56 | FromDiscord | <Rika> theyre relative to the file |
10:41:23 | FromDiscord | <Rika> adding .nim would look for the file `nim.nim` in `../util/prompt/` |
10:41:41 | FromDiscord | <Rika> (nim used to use `.` for imports like python afaik) |
10:42:49 | * | Tongir quit (Ping timeout: 264 seconds) |
10:43:31 | * | zacharycarter quit (Ping timeout: 256 seconds) |
10:44:04 | Yardanico | did it? |
10:44:55 | Zevv | the fun I have. now with yellow=mentions, red=pings: http://zevv.nl/div/irc.png |
10:45:04 | Yardanico | lol |
10:45:18 | Yardanico | how did you do that? :P |
10:45:30 | Zevv | voodoo |
10:45:33 | FromDiscord | <Recruit_main707> look at that, i am already top 15 :P |
10:45:35 | Yardanico | and why I am connecting a lot of people |
10:45:51 | FromDiscord | <Recruit_main707> and thats not even counting when i write yardanico wrong xD |
10:46:15 | Zevv | reload for today's |
10:46:16 | FromDiscord | <Rika> today i have been inactive it seems |
10:46:17 | FromDiscord | <Rika> lmao |
10:46:25 | Zevv | So if I now ping @rika, our line should go red |
10:46:30 | FromDiscord | <Rika> REEEEEEEEEEEEEEE |
10:46:31 | Zevv | @Rika, that is |
10:46:35 | FromDiscord | <Rika> REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE |
10:46:54 | FromDiscord | <Rika> HOW COULD YOU DOUBLE PING ME |
10:47:01 | Zevv | it's magic |
10:47:10 | Yardanico | @rika |
10:47:21 | FromDiscord | <Rika> Zevv Yardanico |
10:47:22 | FromDiscord | <Rika> reeeeee |
10:47:26 | Yardanico | Zevv: wait what |
10:47:28 | Yardanico | it autoupdates |
10:47:28 | Yardanico | wtf |
10:47:29 | Yardanico | ? |
10:47:58 | Yardanico | Zevv: maybe I should really do the thing timo asked me to do |
10:48:04 | FromDiscord | <Rika> also lmao someone's named lex in irc it seems |
10:48:05 | Yardanico | parse all IRC logs for #nim into an sqlite database |
10:48:16 | Yardanico | @Rika nah they're on discord |
10:48:21 | FromDiscord | <Rika> really? |
10:48:24 | Yardanico | yes |
10:48:24 | FromDiscord | <Rika> didnt notice |
10:48:32 | PMunch | Zevv, what are grays? |
10:49:03 | Zevv | people talking in succcession, accumulated inverse proportional to the time between messages |
10:49:20 | FromDiscord | <Rika> holy shit the graph is unstable as fuck |
10:49:25 | FromDiscord | <Rika> the order changes really often lmao |
10:49:32 | Zevv | yeah, blame graphviz |
10:49:56 | Yardanico | Zevv: ok you convinced me, will try to parse nim irc logs today or tomorrow, I have raw data |
10:50:00 | PMunch | But wait, I pinged willyboar earlier today? |
10:50:08 | Zevv | why woudl you, text is good enough |
10:50:09 | Yardanico | but it's half marshal's json output and half html |
10:50:10 | FromDiscord | <Rika> today is relative |
10:50:15 | Yardanico | Zevv: to get nicks |
10:50:17 | Zevv | PMunch: or he pinged you? |
10:50:23 | Yardanico | and their relationships |
10:50:26 | Yardanico | @Rika in 48 hours |
10:50:29 | Zevv | 00:36 #nim: < FromDiscord> <willyboar> @PMunch why don't you pick another blogging platform? |
10:50:49 | PMunch | Yeah, that was just after midnight, and then I pinged him this morning to explain why :P |
10:50:58 | PMunch | Because I had logged off before that ping |
10:51:10 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2o62 |
10:51:12 | FromDiscord | <Synth> Anyone know why this is? |
10:51:31 | FromDiscord | <Rika> what |
10:51:34 | FromDiscord | <Rika> why are you doing that |
10:51:37 | Yardanico | @Synth that's not valid nim |
10:51:40 | FromDiscord | <Synth> (edit) 'http://ix.io/2o62' => 'http://ix.io/2o63' |
10:51:42 | Yardanico | if you have a tuple, you should return both values |
10:51:43 | FromDiscord | <Synth> Oh |
10:51:48 | Yardanico | and with options |
10:51:49 | FromDiscord | <Rika> do `proc example(exampleArg: string): Option[string] =` |
10:51:50 | Yardanico | what are you trying to do? |
10:51:52 | PMunch | @Synth, there's so much wrong with that :P |
10:52:02 | FromDiscord | <Synth> I'm sorry, I've never used options before |
10:52:08 | Yardanico | @Synth your idea is not really possible anyway |
10:52:11 | Yardanico | unless you use object variants |
10:52:16 | FromDiscord | <Synth> I'm trying to return 2 types and check if it returned string or false |
10:52:18 | FromDiscord | <Rika> sent a code paste, see http://ix.io/2o64 |
10:52:23 | PMunch | Yardanico, he just wants to either return a string, or fales. |
10:52:28 | FromDiscord | <Synth> Ahh okay, thanks |
10:52:28 | Yardanico | PMunch: yes |
10:52:29 | PMunch | s/fales/false |
10:52:39 | Yardanico | ah with options it's fine right |
10:52:43 | PMunch | Which is the same logic as would be expressed with an option |
10:52:44 | PMunch | Yeah |
10:52:49 | FromDiscord | <Rika> you make some "mentally equal to" true, and none "mentally equal to" false |
10:53:49 | * | adnan338 joined #nim |
10:55:22 | * | Senketsu quit (Ping timeout: 246 seconds) |
10:56:06 | * | filcuc quit (Ping timeout: 258 seconds) |
10:57:20 | * | adnan338 quit (Remote host closed the connection) |
10:58:11 | PMunch | @Synth: https://play.nim-lang.org/#ix=2o65 |
11:01:06 | voltist | Is a there a standard library proc to split a seq into evenly sized sections? |
11:01:18 | Yardanico | https://nim-lang.org/docs/sequtils.html#distribute%2Cseq%5BT%5D%2CPositive |
11:01:35 | voltist | Ah neat |
11:01:45 | voltist | Thanks |
11:01:48 | Yardanico | just check that the seq length can be evenly divided by the size of the section |
11:02:11 | Yardanico | well, if you know that it always can be divided you don't have to do that |
11:04:57 | * | xet7 quit (Quit: Leaving) |
11:06:31 | voltist | @Vindaar Around? |
11:09:49 | * | Guest57749 quit (Ping timeout: 264 seconds) |
11:11:16 | * | dadada joined #nim |
11:11:41 | * | dadada is now known as Guest64918 |
11:13:55 | FromDiscord | <lex> ``` ... /home/bork/Programming/connctl/src/commands/init.nim(1, 8) Error: cannot open file: ../util/prompt``` |
11:13:57 | FromDiscord | <lex> big error |
11:14:05 | * | dddddd joined #nim |
11:18:00 | FromDiscord | <Rika> i assume `/home/bork/Programming/connctl/src/util/prompt.nim` exists |
11:18:16 | Yardanico | @lex how are you compiling? |
11:18:16 | FromDiscord | <Rika> oh maybe remove the ""s in the import |
11:18:32 | FromDiscord | <lex> nimble build |
11:18:53 | FromDiscord | <lex> sent a code paste, see http://ix.io/2o5X |
11:19:28 | Yardanico | why quotes? |
11:19:28 | FromDiscord | <lex> idk |
11:19:45 | * | NimBot joined #nim |
11:20:11 | Yardanico | well you only need them when the directory name is not a valid nim identifier (e.g. starts with a digit) |
11:20:44 | FromDiscord | <lex> o |
11:20:46 | FromDiscord | <lex> ok |
11:20:52 | FromDiscord | <lex> is that gonna make a difference to my erm |
11:20:54 | FromDiscord | <lex> error |
11:21:01 | FromDiscord | <Rika> yeah |
11:21:04 | Yardanico | maybe |
11:21:10 | FromDiscord | <lex> it hasnt |
11:21:15 | FromDiscord | <lex> linter is still angery at me |
11:21:16 | FromDiscord | <Rika> it means its literally looking for the file named "../util/prompt.nim" |
11:21:17 | FromDiscord | <Rika> afaik |
11:21:22 | FromDiscord | <Rika> save |
11:21:46 | FromDiscord | <lex> i have saved |
11:22:04 | FromDiscord | <lex> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/717337220507369553 |
11:22:19 | FromDiscord | <lex> nice |
11:22:21 | FromDiscord | <lex> i wrote prompt |
11:22:24 | FromDiscord | <lex> and its meant to be prompts |
11:22:26 | FromDiscord | <lex> fffffffssssssssssss |
11:22:42 | FromDiscord | <Rika> nice |
11:22:57 | FromDiscord | <lex> ```nim↵proc init *() =↵ prompts.prompt(prompts.textInput, "Hello Men Are good?")↵ echo("text")``` |
11:23:09 | FromDiscord | <lex> ```proc init *() =↵ prompts.prompt(prompts.textInput, "Hello Men Are good?")↵ echo("text")``` |
11:23:29 | FromDiscord | <lex> > expression 'prompt(textInput, "Hello Men Are good?")' is of type 'string' and has to be discarded |
11:23:33 | Yardanico | yes |
11:23:33 | PMunch | Haha :P |
11:23:41 | * | filcuc joined #nim |
11:23:42 | Yardanico | if something returns a value you need to either use it or discard explicitly |
11:24:20 | PMunch | A lot of things in Nim is plural for some reason |
11:24:30 | FromDiscord | <lex> oh LOL |
11:24:32 | FromDiscord | <lex> FFFFSSSSSSSSSSSSSSSSSSSSSSSSSs |
11:24:35 | FromDiscord | <lex> hahahhhaha |
11:24:36 | FromDiscord | <lex> thanks |
11:24:37 | FromDiscord | <Rika> chill lmao |
11:25:20 | FromDiscord | <lex> wtf |
11:25:21 | FromDiscord | <lex> im hyper |
11:25:30 | Yardanico | well you know, we see each message as a different one |
11:25:36 | Yardanico | and each message has your nickname and bridge's nickname |
11:25:42 | * | NimBotNg joined #nim |
11:25:47 | Yardanico | so please try to spend a few seconds before sending a message :P |
11:27:01 | * | rockcavera joined #nim |
11:27:24 | FromDiscord | <Technisha Circuit> Is there a way to only import a specific function from a module? |
11:27:28 | Yardanico | "from x import y" |
11:27:35 | FromDiscord | <Technisha Circuit> Thanks! |
11:27:38 | * | NimBotNg quit (Remote host closed the connection) |
11:28:51 | FromDiscord | <lex> when I run my init command, I get this as the response. ```("Hello Men Are good?", " ")``` |
11:29:08 | FromDiscord | <lex> like, i havent even entered anything... |
11:29:20 | Yardanico | well are you listening for input properly? |
11:29:30 | Yardanico | are you reading from stdin or using rstdin or something? |
11:29:38 | FromDiscord | <Rika> whats rstdin? |
11:29:40 | FromDiscord | <lex> stdin |
11:29:51 | FromDiscord | <lex> sent a code paste, see http://ix.io/2o6g |
11:29:58 | FromDiscord | <lex> sent a code paste, see http://ix.io/2o6h |
11:29:58 | Yardanico | nonono |
11:30:13 | Yardanico | oh i see |
11:30:18 | FromDiscord | <lex> Yeeeeeep. |
11:30:20 | Yardanico | well yes, look |
11:30:29 | FromDiscord | <Rika> remove the space between echo and the () |
11:30:31 | Yardanico | or just do it like |
11:30:39 | Yardanico | stdout.write question & " " |
11:30:45 | Yardanico | echo makes a newline and I assume you don't want that |
11:30:49 | Yardanico | stdout.write doesn't add a newline |
11:30:50 | FromDiscord | <lex> o |
11:30:56 | Yardanico | also yes, you're echoing a tuple |
11:31:36 | FromDiscord | <lex> wait so hold on |
11:31:40 | FromDiscord | <lex> what do you mean by ```stdout.write question & " "``` |
11:31:45 | FromDiscord | <lex> is that a proc |
11:31:55 | Yardanico | stdout is a file handle |
11:32:01 | Yardanico | write is a proc which works on any file handle |
11:32:04 | Yardanico | nim has UFCS so you can write: |
11:32:08 | FromDiscord | <Rika> same thing as `write(stdout, question & " ") |
11:32:09 | FromDiscord | <Rika> (edit) '")' => '")`' |
11:32:14 | Yardanico | yeah |
11:32:21 | Yardanico | or write stdout, question & " " |
11:32:32 | * | NimBotNg joined #nim |
11:32:34 | Yardanico | stdout.write(question & " ") will feel logical for you though I guess |
11:32:54 | FromDiscord | <lex> hmph |
11:32:59 | * | NimBotNg quit (Remote host closed the connection) |
11:33:06 | FromDiscord | <lex> ok, so I write the question out |
11:33:15 | FromDiscord | <lex> and I readLine(stdin) |
11:33:15 | FromDiscord | <lex> yeah? |
11:33:18 | Yardanico | yes |
11:33:23 | Yardanico | readLine(stdin) will return when the user hits enter |
11:34:05 | FromDiscord | <lex> ooh! |
11:34:06 | FromDiscord | <lex> it works |
11:34:09 | FromDiscord | <lex> cheers mate |
11:37:05 | * | NimBotNg joined #nim |
11:37:12 | * | NimBotNg quit (Remote host closed the connection) |
11:38:14 | * | NimBotNg joined #nim |
11:38:21 | * | NimBotNg quit (Remote host closed the connection) |
11:38:35 | Yardanico | PMunch: are you testing nimbot? |
11:38:42 | PMunch | Yes |
11:38:48 | Yardanico | nice :P |
11:39:04 | Yardanico | we also have #nim-test fwiw, I mean it's an empty channel, but I used it to test my ircord |
11:39:06 | PMunch | First order of business was just to get it to compile :P |
11:39:17 | Yardanico | but I mean not a lot of people have join msgs on anyway |
11:39:30 | PMunch | It hasn't been touched in three years it seems ;S |
11:39:32 | * | filcuc quit (Ping timeout: 265 seconds) |
11:39:33 | PMunch | :S* |
11:41:49 | shashlick | @voltist all good - ping on the nimterop gitter channel for help |
11:42:07 | voltist | Yep that makes sense |
11:42:11 | voltist | Will do tomorrow |
11:42:47 | shashlick | Or even an issue is fine - happy to help |
11:46:47 | * | NimBotNg joined #nim |
11:47:06 | PMunch | Hmm, I think it actually works now |
11:47:39 | * | NimBotNg quit (Remote host closed the connection) |
11:49:18 | * | NimBotNg joined #nim |
11:49:42 | * | NimBotNg quit (Remote host closed the connection) |
11:51:21 | * | chemist69 quit (Ping timeout: 272 seconds) |
11:51:54 | * | NimBotNg joined #nim |
11:52:14 | * | chemist69 joined #nim |
11:57:53 | * | NimBotNg quit (Remote host closed the connection) |
11:58:49 | * | opDispatch quit (Remote host closed the connection) |
11:59:13 | * | opDispatch joined #nim |
12:00:38 | PMunch | Hmm, so Jester exposes the folder "public" right. But in the Nimble package for nimbot it is in src/public, and the file that starts jester is in src. But the nimble file obviously puts the built file in the root folder, so it doesn't see src/public as public. |
12:01:12 | PMunch | Should src/public be moved to just public? What is the norm here for Jester packages? |
12:01:42 | * | NimBotNg joined #nim |
12:01:47 | * | NimBotNg quit (Remote host closed the connection) |
12:05:36 | * | aeverr_ quit (Quit: Konversation terminated!) |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:40 | * | supakeen joined #nim |
12:13:20 | * | NimBotNg joined #nim |
12:13:31 | FromDiscord | <Zed> how would i access this data? ` data*: pointer # Image raw data` ↵I've tried dereferencing it with `[]` but that just pulls up errors |
12:14:04 | * | NimBotNg quit (Remote host closed the connection) |
12:14:26 | FromDiscord | <Recruit_main707> thats a raw pointer |
12:15:06 | * | lritter quit (Ping timeout: 256 seconds) |
12:15:27 | FromDiscord | <Recruit_main707> you probably need data: ptr DataType |
12:15:48 | FromDiscord | <Recruit_main707> pointer = `void*` in c |
12:16:07 | Yardanico | yes |
12:16:24 | Yardanico | if in C it's void* it's "pointer" in Nim (untyped pointer) |
12:17:06 | * | NimBotNg joined #nim |
12:17:10 | * | NimBotNg quit (Remote host closed the connection) |
12:17:54 | * | NimBotNg joined #nim |
12:18:43 | FromDiscord | <Zed> yeah it's void* in the C library, is there anyway i can read it as it is without changing anything? |
12:19:04 | Yardanico | not really |
12:19:09 | Yardanico | pointer is an _untyped_ pointer |
12:19:19 | Yardanico | you must cast it to some typed pointer to get the value |
12:19:37 | Yardanico | because pointer is just a pointer - it just points to some memory location without any info about the type, size, etc |
12:19:58 | FromDiscord | <Recruit_main707> you can also cast it.↵`cast[ptr DataType](data)` |
12:20:02 | Yardanico | yes, as I said |
12:20:08 | Yardanico | "you must cast it to some typed pointer" :P |
12:20:36 | FromDiscord | <Recruit_main707> ok :)↵i started typing b4 and didnt pay much atention |
12:21:05 | * | NimBotNg quit (Remote host closed the connection) |
12:22:15 | FromDiscord | <Zed> what is data in that example @Recruit_main707 |
12:22:23 | Yardanico | your untyped pointer |
12:22:36 | FromDiscord | <Recruit_main707> ^ |
12:23:03 | FromDiscord | <Recruit_main707> i finally see where pointer is useful |
12:23:31 | Yardanico | where? :P |
12:24:00 | FromDiscord | <Recruit_main707> (im too scared to say it because i might be wrong) |
12:24:53 | FromDiscord | <Recruit_main707> but, from what ive seen, you can use it so that you dont need to wrap objects/structs when interoping with, lets say python |
12:25:14 | Yardanico | well kinda |
12:25:21 | Yardanico | if you don't modify that data - yeah, sure |
12:25:44 | FromDiscord | <Recruit_main707> yeah, or if you do it via other functions of your own |
12:26:02 | Yardanico | well if you do it via your own functions then you need to wrap that object in your language |
12:26:31 | FromDiscord | <Recruit_main707> cast at the top of the function, cast at the bottom :P |
12:26:50 | Yardanico | well that's the point |
12:26:53 | * | NimBotNg joined #nim |
12:27:13 | Yardanico | void* in C can accept any pointer type |
12:27:22 | Yardanico | so if you have int* you can pass it as void* |
12:27:33 | * | NimBotNg quit (Remote host closed the connection) |
12:27:40 | Yardanico | so there's no need to cast between typed and untyped pointer really |
12:27:56 | Yardanico | mostly |
12:28:25 | FromDiscord | <Recruit_main707> i didnt understand that last part...↵>there's no need to cast between typed and untyped |
12:29:07 | Yardanico | well if you _must_ accept and return void* then yes, you need to cast in your function |
12:29:35 | * | NimBotNg joined #nim |
12:29:37 | * | NimBotNg quit (Remote host closed the connection) |
12:29:40 | FromDiscord | <Recruit_main707> ah, yes, i was thinking of some complex things like objects |
12:30:14 | FromDiscord | <Recruit_main707> (if you didnt understand that last sentence ignore it, i did understand you) :P |
12:30:38 | * | NimBotNg joined #nim |
12:31:22 | * | NimBotNg quit (Remote host closed the connection) |
12:32:13 | * | NimBotNg joined #nim |
12:32:15 | PMunch | italics underline |
12:32:20 | PMunch | c12ol02ou04rs06! |
12:32:26 | Yardanico | xd |
12:32:39 | PMunch | Sorry, just trying to figure out how the IRC module handles these :P |
12:32:41 | * | NimBotNg quit (Remote host closed the connection) |
12:32:41 | Yardanico | imagine using discord so you don't see glorious colours in IRC |
12:32:46 | Yardanico | PMunch: i think it doesn't at all |
12:32:49 | FromDiscord | <Recruit_main707> would this work the same way in Nim? https://media.discordapp.net/attachments/371759389889003532/717355038644764722/unknown.png |
12:33:14 | Yardanico | @Recruit_main707 yeah |
12:33:19 | PMunch | Yardanico, they enter the log at least :) So I should be able to convert them to HTML tags :) |
12:33:31 | Yardanico | I had to use a regex (nim-regex) to strip them , or you can use /mode -c #nim IIRC |
12:33:49 | Yardanico | I maybe should do it the mode way, but idk how to reliably send it after connecting to the channel |
12:34:01 | Yardanico | @Recruit_main707 see https://github.com/Yardanico/nim-snippets/tree/master/clib |
12:34:08 | Yardanico | it's nim from c, but still same thing applies |
12:34:35 | FromDiscord | <Recruit_main707> thanks |
12:35:31 | PMunch | Ah, FromDiscord sends a clear all formatting tag.. That explains why highlighted messages only highlight the nick of those that highlighted me and not the entire message.. |
12:35:58 | Yardanico | PMunch: is that bad or not? |
12:36:29 | FromDiscord | <Recruit_main707> what happens if you use gc:none, instead of GC_ref(), you allocate it, and instead of unref, you free it?↵(im sorry for asking this generic questions) |
12:36:29 | * | kungtotte quit (Read error: Connection reset by peer) |
12:36:39 | Yardanico | @Recruit_main707 gc:none should never be used |
12:36:48 | Yardanico | and with gc:none there's no way to deallocate GC'dd memory really |
12:37:14 | Yardanico | you can still use alloc/dealloc manually though, but at that point nim becomes C with better syntax and proper metaprogramming :P |
12:38:10 | FromDiscord | <Recruit_main707> ok, i dont use gcc:none, but you never know, better to have the knowledge and dont need it than needing it and not have it |
12:38:19 | Yardanico | gc:none should never be used really |
12:38:20 | Yardanico | we have arc now |
12:38:37 | Yardanico | well there might be a small usecase is that when you want to leak memory intentionally |
12:38:50 | Yardanico | some programs leak memory to execute faster but I doubt arc really will slow down those much |
12:38:50 | PMunch | Yardanico, well normally you'd send the bold character, then the bold message, then the bold character again to end bold mode. That way the colour would colour the entire thing |
12:39:03 | Yardanico | PMunch: ah, yeah, I see where I use \x0F |
12:39:17 | * | kungtotte joined #nim |
12:39:21 | Yardanico | but anyway I do it like "\x02<{m.author.username}>\x0F {msg}" |
12:39:37 | Yardanico | but yeah, need to change |
12:39:40 | FromDiscord | <Recruit_main707> or dumb people that say: iTs gARbage CoLlecTed so ITs WouLD be SlOw |
12:40:09 | PMunch | Yeah that should be "\x02<{m.author.username}>\x02 {msg}" |
12:40:46 | * | Froggster quit (Remote host closed the connection) |
12:44:09 | Yardanico | an interesting thing I found in some discussions btw - some people refer to rust's memory management as a "compile-time GC" |
12:44:18 | Yardanico | since that's actually kinda true |
12:55:15 | * | NimBotNg joined #nim |
12:55:17 | * | NimBotNg quit (Remote host closed the connection) |
12:56:32 | * | Guest64918 quit (Ping timeout: 256 seconds) |
13:01:50 | * | zacharycarter joined #nim |
13:05:31 | * | dadada joined #nim |
13:05:55 | * | dadada is now known as Guest15001 |
13:08:14 | disruptek | arc is a compile-time gc, too. |
13:08:49 | Yardanico | disruptek: well RC still exists :P |
13:08:53 | Yardanico | in rust RC is optional |
13:09:19 | FromDiscord | <Rika> which complicates simpler programs right> |
13:09:21 | FromDiscord | <Rika> (edit) 'right>' => 'right' |
13:09:22 | FromDiscord | <Rika> (edit) 'right' => 'right?' |
13:09:25 | FromDiscord | <Rika> fuck sorry lmao |
13:09:26 | Yardanico | nice two edits |
13:09:31 | Yardanico | and an apologizing message |
13:09:34 | Yardanico | :D |
13:09:37 | FromDiscord | <Rika> ok |
13:11:27 | FromDiscord | <Recruit_main707> {.push: exportc, dynlib.}↵{.pop.}↵to add those prarmas to all the functions inbetween? |
13:11:33 | FromDiscord | <Recruit_main707> pragmas* |
13:11:58 | Yardanico | yes |
13:13:10 | * | NimBotNg joined #nim |
13:13:30 | * | NimBotNg quit (Remote host closed the connection) |
13:15:45 | * | NimBotNg joined #nim |
13:24:40 | * | NimBotNg quit (Remote host closed the connection) |
13:24:49 | * | drewr joined #nim |
13:25:21 | * | NimBotNg joined #nim |
13:26:01 | PMunch | double style |
13:26:11 | Yardanico | heh |
13:26:33 | * | NimBotNg quit (Remote host closed the connection) |
13:26:41 | PMunch | It works :) |
13:26:56 | Yardanico | PMunch: well the thing is that IRC is still kinda not easy to parse |
13:27:05 | Yardanico | if you support \x0F properly you need to maintain bool flags for all styles |
13:27:22 | disruptek | eh? |
13:27:29 | Yardanico | disruptek: ? |
13:28:01 | disruptek | what do you mean? |
13:28:23 | * | NimBotNg joined #nim |
13:28:24 | PMunch | Yardanico, well yes |
13:28:27 | PMunch | All three styles |
13:28:33 | PMunch | Well, four if you count colours |
13:28:49 | PMunch | And six if you count some weird proprietary ones |
13:28:55 | * | NimBotNg quit (Remote host closed the connection) |
13:29:21 | PMunch | But that's actually not for \x0F support, but rather for the double tag support |
13:30:16 | disruptek | just strip all the codes if you want to parse it. if you want to tokenize it, use a set. |
13:31:19 | PMunch | I want to convert them to HTML |
13:31:51 | disruptek | i would use a state machine. |
13:32:54 | Zevv | oi disruptek |
13:33:07 | Zevv | tell me, I heard you did incremental compilation? |
13:33:18 | disruptek | nah. |
13:34:04 | disruptek | ic is dead. compile server is the new hotness. |
13:34:44 | alehander92 | come on guys |
13:34:53 | alehander92 | one can have both |
13:35:58 | * | NimBotNg joined #nim |
13:36:06 | * | NimBotNg quit (Remote host closed the connection) |
13:36:10 | disruptek | Zevv: i heard alehander92 is working on ic. |
13:37:03 | Zevv | oh god no compile server :( |
13:37:04 | alehander92 | it's called winning, disruptek |
13:37:26 | alehander92 | we are winning the war with normal compilation |
13:37:38 | alehander92 | or against |
13:37:40 | alehander92 | not sure |
13:37:42 | Zevv | so, what's the status of all that stuff then |
13:37:57 | disruptek | i have my knee on the neck of ic. |
13:38:24 | * | NimBotNg joined #nim |
13:38:31 | * | NimBotNg quit (Remote host closed the connection) |
13:38:43 | * | opal quit (Ping timeout: 240 seconds) |
13:38:54 | disruptek | the status is that i haven an ic6 branch that has a bug in codegen that needs fixing. |
13:39:02 | * | NimBotNg joined #nim |
13:39:08 | alehander92 | man nope. |
13:39:14 | Zevv | well, just add it to the other 1566 bugs |
13:39:17 | disruptek | araq wants me to pull the mangling out into a pr and throw the rest away. |
13:39:17 | alehander92 | otherwise is marshal for the ic thing |
13:39:28 | disruptek | !repo frosty |
13:39:29 | disbot | https://github.com/disruptek/frosty -- 9frosty: 11marshal native Nim objects via streams 15 0⭐ 0🍴 |
13:39:32 | disruptek | it's frosty now |
13:39:36 | * | xet7 joined #nim |
13:39:55 | * | NimBotNg quit (Remote host closed the connection) |
13:40:15 | disruptek | it could replace a lot of code in ic, but as i said, ic is dead. |
13:41:02 | Araq | what? |
13:41:16 | Araq | I never said "throw the rest away" |
13:41:49 | PMunch | disruptek, does frosty work on compile-time? |
13:41:52 | disruptek | okay, araq has a plan for the rest. |
13:42:05 | disruptek | PMunch: no idea. |
13:42:17 | PMunch | Haha, so probably not? :P |
13:42:18 | * | opal joined #nim |
13:42:31 | disruptek | well, it uses streams and not much else. |
13:42:48 | disruptek | it's pretty damn simple. |
13:43:07 | zedeus | any idea if it's more memory efficient than using msgpack? |
13:43:17 | PMunch | Hmm, because the NimScript <-> Nim is pretty horrible when it comes to sending complex data back and forth |
13:43:21 | zedeus | I'm storing serialized objects in redis for caching |
13:43:34 | PMunch | So I've been looking into just passing data as a string containing a JSON object |
13:43:59 | disruptek | there will be a channel interface, but channels aren't as efficient as streams. |
13:44:30 | disruptek | it's basically as efficient as in-memory representation. maybe a little more efficient. |
13:45:01 | zedeus | cool. any limitations with refs or variants? |
13:45:18 | disruptek | probably. i haven't tested it much. |
13:45:32 | disruptek | please fuck with it. |
13:45:39 | Yardanico | lmao |
13:45:42 | zedeus | will do. |
13:45:54 | disruptek | well, refs and self-refs seem to work, which is the key. |
13:46:06 | zedeus | recursively? |
13:46:14 | disruptek | afaik, yes. |
13:46:42 | zedeus | sweet, msgpack choked so I can't cache tweets yet |
13:46:44 | disruptek | i have a bug with freezing my graphs, but i haven't looked into it. |
13:46:59 | Yardanico | disruptek: your criterion doesn't import "os" btw |
13:47:04 | Yardanico | but it should :P i mean the .nims file |
13:47:11 | Yardanico | Error: undeclared identifier: 'execCmd' |
13:47:18 | Yardanico | or something like that |
13:47:23 | Yardanico | I mean .nimble |
13:47:29 | disruptek | that's not from os. |
13:47:45 | Yardanico | well anyway it fails for that reason |
13:47:48 | Yardanico | installing |
13:48:15 | disruptek | try head. |
13:48:23 | Yardanico | yeah, works with head |
13:48:30 | alehander92 | that's like my trying to put on clothes |
13:48:35 | alehander92 | head is a good choice |
13:48:48 | disruptek | i guess i'll bump it for nimble nitwits. |
13:49:54 | * | jwm224 quit (Quit: WeeChat 2.9-dev) |
13:50:22 | * | ftsf quit (Ping timeout: 246 seconds) |
13:52:02 | Yardanico | disruptek: well JsonNode serialization didn't work :P |
13:52:14 | Yardanico | because fieldPairs doesn't support object variants |
13:52:16 | Yardanico | at all |
13:52:20 | Yardanico | well kinda |
13:52:23 | disruptek | frosty is designed for ephemeral storage like cache. there's no facility for type conversions. |
13:52:43 | Yardanico | well some users might want to store object variants but they couldn't right now |
13:52:48 | * | jwm224 joined #nim |
13:52:48 | Yardanico | because you would need a macro for that |
13:52:54 | disruptek | well, that won't be hard to fix. |
13:54:50 | zedeus | disruptek: wanna help me figure out how to decrease nitter's memory usage later or tomorrow? |
13:55:01 | disruptek | say when. |
13:55:03 | zedeus | with the stupid amount of traffic on the official instance it's becoming a problem |
13:56:42 | Yardanico | well I just tested, seems sometimes usage can be a bit big |
13:56:47 | Yardanico | with the stupid thing like let a = {"a": {"a": {"a": {"a": {"a": 5}.newTable()}.newTable()}.newTable()}.newTable()}.newTable() |
13:56:57 | disruptek | i want a freezer that sinks what you put into it. |
13:56:58 | Yardanico | it takes 1061 bytes serialized -d:danger |
13:57:09 | Yardanico | with* |
13:57:18 | Yardanico | and most of them are zeroes |
13:57:24 | Yardanico | so with compression it would be ok |
13:57:27 | disruptek | what's it take in memory, chuckles? |
13:57:39 | Yardanico | disruptek: I mean literal count of bytes :P |
13:57:41 | Yardanico | on disk |
13:57:46 | disruptek | so do it. |
13:57:49 | disruptek | so do i. |
13:57:51 | disruptek | in memory. |
13:58:05 | Yardanico | but even with zstd |
13:58:06 | Yardanico | tatata : 10.08% ( 1061 => 107 bytes, tatata.zst) |
13:58:10 | Yardanico | 10x compression :D |
13:58:28 | disruptek | so submit a PR. |
13:58:39 | zedeus | Yardanico: can you try snappy? |
13:58:49 | Yardanico | Zevv: https://github.com/status-im/nim-snappy ? |
13:58:51 | zedeus | I need to serialize large objects ~30 times per second |
13:58:54 | zedeus | yes |
13:59:08 | * | NimBotNg joined #nim |
13:59:09 | * | NimBotNg quit (Remote host closed the connection) |
13:59:18 | alehander92 | hm, i think speed is a bit more important |
13:59:21 | alehander92 | than size for IC |
13:59:29 | zedeus | snappy is made for speed |
13:59:33 | Yardanico | uhh |
13:59:37 | alehander92 | but this might be a tradeoff that can be configurable |
13:59:38 | Yardanico | why there's https://github.com/jangko/snappy and https://github.com/status-im/nim-snappy |
13:59:44 | Yardanico | and nimble's snappy is jangko's one |
13:59:51 | zedeus | they do that |
13:59:55 | zedeus | use status's version |
14:00:05 | disruptek | you'll get an extra copy if you don't use a stream, but whatever. |
14:00:30 | Yardanico | damn snappy depends on stew, testutils, chronos, faststreams, bearssl |
14:00:30 | Yardanico | wtf |
14:00:38 | zedeus | streaming objects straight to redis would be wild. let's talk about it later |
14:00:54 | zedeus | lol, status is becoming like kde |
14:00:59 | disruptek | well, don't make me fucking guess. |
14:01:02 | disruptek | tell me when you wanna chat. |
14:01:05 | Zevv | Yardanico: sorry, was distracted, what's with snappy? |
14:01:13 | Yardanico | ah sorry wrong ping :P |
14:01:16 | Yardanico | I wanted to ping zedeus |
14:01:31 | zedeus | disruptek: I dunno, I've got about 30 things on my todo list for nitter v2 that just got released |
14:01:35 | zedeus | gotta work fast, people are crazy. |
14:01:43 | * | NimBotNg joined #nim |
14:01:53 | disruptek | hit me up whenever, then. bbiab |
14:03:15 | Yardanico | zedeus: 170 bytes |
14:03:19 | Yardanico | for same let a = {"a": {"a": {"a": {"a": {"a": 5}.newTable()}.newTable()}.newTable()}.newTable()}.newTable() |
14:03:28 | zedeus | yeah, but how much faster is it? |
14:03:37 | * | NimBotNg quit (Remote host closed the connection) |
14:04:52 | * | Cadey1 quit (Quit: Idle for 30+ days) |
14:04:53 | Yardanico | zedeus: 237.5k iterations/sec in -d:danger |
14:05:15 | Yardanico | that's with snappy, yes |
14:05:27 | Yardanico | in -d:release it's ~200k |
14:05:55 | * | Demos[m] quit (Quit: Idle for 30+ days) |
14:06:35 | zedeus | and zstd? |
14:06:43 | Yardanico | zedeus: well idk if there's zstd for nim binding :P |
14:06:46 | * | dzamo[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
14:06:57 | Yardanico | ah there is https://github.com/wltsmrz/nim_zstd |
14:06:58 | Yardanico | lemme try |
14:08:50 | * | NimBotNg joined #nim |
14:09:32 | * | NimBotNg quit (Remote host closed the connection) |
14:09:37 | * | nerdrat[m] quit (Quit: Idle for 30+ days) |
14:10:04 | Yardanico | zedeus: zstd with level 3 is slower (https://github.com/wltsmrz/nim_zstd), but uses ~40 less bytes for same thing, |
14:10:07 | * | NimBotNg joined #nim |
14:10:09 | Yardanico | with level -5 for zstd speed is still mostly the same ,strange |
14:10:13 | Yardanico | maybe bindings are not efficient :P |
14:10:25 | zedeus | hah, perhaps. how much slower? |
14:10:38 | Yardanico | with level -5 for zstd |
14:10:38 | * | NimBotNg quit (Remote host closed the connection) |
14:10:45 | Yardanico | 240k iters/s for snappy and 147k iters/s for zstd |
14:10:57 | zedeus | great |
14:11:00 | Yardanico | although even https://facebook.github.io/zstd/ facebook tells that snappy is faster than zstd |
14:11:05 | Yardanico | the reference impl |
14:11:11 | Yardanico | but ratio is worse of course |
14:11:18 | Yardanico | but frosty just has a lot of null bytes |
14:11:27 | zedeus | yeah, snappy optimizes for speed while zstd cares more about compression ratio |
14:11:29 | Yardanico | so even snappy can achieve ~9x compression ratio |
14:11:39 | Yardanico | thanks for snappy btw, didn't know such a thing existed |
14:11:46 | zedeus | made by Google |
14:11:49 | Yardanico | yeah, I know |
14:11:53 | Yardanico | I mean the nim implementation :P |
14:11:55 | Yardanico | pure-nim |
14:11:58 | zedeus | ah |
14:12:54 | FromDiscord | <Rika> zstd with fast seems faster than snappy tho |
14:13:00 | FromDiscord | <Rika> it says so in the table |
14:13:02 | Yardanico | well idk |
14:13:05 | Yardanico | I compared nim packages |
14:13:09 | Yardanico | not reference implementations |
14:13:11 | * | Senketsu joined #nim |
14:13:35 | FromDiscord | <Rika> interesting |
14:14:27 | Yardanico | tried even with -d:useExternalZstd (to make nim-zstd use system's zstd), still same result |
14:14:31 | Yardanico | maybe the binding is wrong or something |
14:15:14 | FromDiscord | <Rika> or bad |
14:15:18 | Yardanico | i meant this too |
14:15:28 | zedeus | wrong things are generally bad |
14:15:45 | * | filcuc joined #nim |
14:17:08 | zedeus | using packedjson instead of stdlib json didn't seem to change nitter's memory usage at all, I guess something else is hogging up memory |
14:17:29 | zedeus | maybe karax |
14:17:32 | Yardanico | well you can kinda get memory usage stats with default gc with dumpNumberOfInstances or something like that |
14:17:42 | Yardanico | dom made a nim prometheus report thing for that |
14:17:42 | zedeus | yeah, I'll try that later |
14:17:46 | zedeus | yep I tried it |
14:18:04 | zedeus | but that was when I was still parsing html so most of the objects were xml nodes |
14:18:24 | FromDiscord | <Rika> zedeus: but bad things arent always wrong |
14:18:40 | zedeus | depends on the definition of bad |
14:20:23 | zedeus | also, nitter is now 2-4x faster than twitter at loading timelines :) |
14:23:30 | * | NimBotNg joined #nim |
14:23:56 | * | NimBotNg quit (Remote host closed the connection) |
14:24:45 | * | NimBotNg joined #nim |
14:25:31 | PMunch | Yardanico: https://uploads.peterme.net/newlogs.png |
14:25:37 | PMunch | What do you think? |
14:25:48 | Yardanico | looks really cool :) |
14:25:54 | Yardanico | you might also want to handle FromDiscord I guess |
14:26:00 | * | NimBotNg quit (Remote host closed the connection) |
14:26:03 | Yardanico | change it to some special symbol or something |
14:26:07 | PMunch | Eh |
14:26:55 | Zevv | and of course autogenerate http://zevv.nl/div/irc.png. it's already in the right style I see :) |
14:27:47 | zedeus | interaction graph? |
14:27:54 | Zevv | please make your server messages dark grey or something, not bright green |
14:27:59 | Zevv | it's background noise |
14:28:07 | Prestige | zedeus: is nitter a Twitter clone? |
14:28:16 | zedeus | not quite |
14:28:21 | zedeus | https://github.com/zedeus/nitter |
14:29:07 | Prestige | Looks awesome |
14:29:13 | Zevv | wow a Nim app in the wild! |
14:29:26 | zedeus | been working my ass off for the past two weeks to save it from the removal of legacy twitter |
14:29:28 | zedeus | https://github.com/zedeus/nitter/pull/169 |
14:29:29 | disbot | ➥ Nitter v2 |
14:33:09 | zacharycarter | strformat docs are confusing |
14:33:20 | zacharycarter | specifically related to formatting floating point precision |
14:34:29 | Zevv | I hate that doc; I started fixing it once but never finished it |
14:48:30 | PMunch | Sweet.. NimBot is apparently not running the code in the official NimBot repo.. |
14:49:20 | FromGitter | <kaushalmodi> zacharycarter: Does this help? https://scripter.co/notes/nim-fmt/#precision |
14:49:20 | * | jwm224 quit (Quit: WeeChat 2.9-dev) |
14:50:06 | FromGitter | <kaushalmodi> I have organized the strformat fmt/& by the specifiers and not by the data type |
14:51:17 | zacharycarter | kaushalmodi: yeah thanks, it does make it clearer - I figured it out from the normal docs it just wasn't obvious |
14:51:37 | * | NimBotNg joined #nim |
14:52:35 | * | NimBotNg quit (Remote host closed the connection) |
14:52:39 | PMunch | Oh shit.. |
14:53:27 | PMunch | I changed json.nim to include a converter for StringTableRef, but that means I can't parse the old logs any longer.. |
14:54:02 | disruptek | the logs are available in json? |
14:54:46 | * | Guest15001 quit (Ping timeout: 246 seconds) |
14:55:44 | PMunch | Yup: https://irclogs.nim-lang.org/02-06-2020.logs |
14:55:47 | zedeus | I wonder if destroying big parts of the json while parsing it would be useful in reducing memory usage. No need to keep around a json copy of a tweet after deserializing it |
14:56:30 | disruptek | what you need is a quality out params impl. |
14:57:33 | PMunch | Well, I don't think it's 100% JSON, it prepends the entire thing with the start time. Then every line is whatever $$ from marshal spits out for the object |
14:58:03 | PMunch | But strtabs doesn't have a good JSON serialisation, so the file ends up pretty huge.. I wrote a better one, but that means it can't read the old format.. |
14:58:05 | disruptek | marshal works for arc now, right? |
14:58:18 | PMunch | No idea |
14:59:25 | disruptek | kinda nuts. |
15:00:15 | * | dadada joined #nim |
15:00:51 | * | dadada is now known as Guest15872 |
15:03:30 | * | NimBot joined #nim |
15:05:18 | * | filcuc quit (Ping timeout: 260 seconds) |
15:05:54 | * | filcuc joined #nim |
15:08:32 | * | NimBotNg joined #nim |
15:08:58 | * | NimBotNg quit (Remote host closed the connection) |
15:23:49 | * | Guest15872 quit (Ping timeout: 246 seconds) |
15:29:19 | * | opal quit (Remote host closed the connection) |
15:31:03 | * | NimBotNg joined #nim |
15:31:04 | * | NimBotNg quit (Remote host closed the connection) |
15:31:41 | * | Vladar joined #nim |
15:33:07 | * | opal joined #nim |
15:35:22 | * | waleee-cl joined #nim |
15:36:34 | * | NimBotNg joined #nim |
15:36:45 | * | NimBotNg quit (Remote host closed the connection) |
15:38:07 | * | krux02 joined #nim |
15:38:52 | * | filcuc quit (Ping timeout: 246 seconds) |
15:39:13 | * | NimBotNg joined #nim |
15:39:24 | * | NimBotNg quit (Remote host closed the connection) |
15:40:37 | PMunch | Hmm, NimBot is so old that Time was an int64.. |
15:40:49 | disruptek | pepperidge farm remembers. |
15:40:56 | PMunch | So any attempt at marshalling the old object will fail.. |
15:41:32 | disruptek | need a retro library. |
15:41:45 | PMunch | So I'll need to write a "Old IrcEvent object to new IrcEvent object converter" |
15:43:21 | * | Senketsu quit (Ping timeout: 246 seconds) |
15:47:44 | * | NimBotNg joined #nim |
15:48:07 | * | NimBotNg quit (Remote host closed the connection) |
15:52:02 | * | NimBotNg joined #nim |
15:52:14 | * | NimBotNg quit (Remote host closed the connection) |
15:58:17 | * | NimBotNg joined #nim |
15:58:22 | * | NimBotNg quit (Remote host closed the connection) |
16:02:39 | PMunch | Hoorah: https://github.com/nim-lang/nimbot/pull/15 🎉 |
16:02:40 | disbot | ➥ Modernise NimBot |
16:12:09 | * | Vladar quit (Quit: Leaving) |
16:13:29 | * | dadada joined #nim |
16:13:51 | * | dadada is now known as Guest63668 |
16:14:35 | FromDiscord | <treeform> Does any one know if there is a way to pass a "const string". So that I can do stuff to the string compile time? |
16:15:24 | FromDiscord | <treeform> I pass an html color string to a fill function. `fill("#F00BA4")` If its a "const string" could I parse it compile time? But if its run time string parse it runtime? |
16:16:17 | FromDiscord | <treeform> Do types carry with them a maker that they are const types or not? |
16:20:00 | FromDiscord | <mratsim> use static string |
16:20:21 | FromDiscord | <mratsim> you can have a static overload |
16:20:36 | FromDiscord | <treeform> WOW that so easy! Thanks. |
16:20:45 | FromDiscord | <treeform> This is *exactly* what I wanted. |
16:21:39 | FromDiscord | <treeform> This appears to work: https://gist.github.com/treeform/30eac7e122dc8009cfd174a55b8bc720 |
16:31:57 | * | Trustable joined #nim |
16:35:26 | * | rokups quit (Quit: Connection closed for inactivity) |
16:42:06 | * | disruptek quit (Ping timeout: 265 seconds) |
16:42:25 | * | disbot quit (Ping timeout: 272 seconds) |
16:44:57 | * | disruptek joined #nim |
16:46:01 | * | disbot joined #nim |
16:57:36 | * | Guest63668 quit (Ping timeout: 272 seconds) |
16:59:33 | * | dadada joined #nim |
16:59:53 | * | drewr quit (Ping timeout: 258 seconds) |
16:59:56 | * | dadada is now known as Guest31778 |
17:12:13 | disruptek | fsck btrfs. |
17:12:19 | disruptek | i always manage to corrupt it. |
17:17:26 | * | drewr joined #nim |
17:34:05 | PMunch | disruptek, isn't the whole point of btrfs that it should be better for rollbacks and such? |
17:34:43 | PMunch | @treeform, you always use the weirdest syntax that I'd never guess would work :P I always end up typing static[string] |
17:37:47 | FromDiscord | <treeform> what `static[string]` works? |
17:38:45 | FromDiscord | <treeform> well mratsim told me to use `static string` so I did. |
17:38:53 | Zevv | corruptek |
17:39:01 | FromDiscord | <treeform> do you also use `var[string]` ? |
17:39:35 | disruptek | i snapshot a SAN fs every hour. when i crash my machine, i often have to rollback. |
17:39:51 | disruptek | thing is, it's btrfs over btrfs because... it's san. |
17:40:04 | disruptek | so wtf. the fs isn't even safe over itself. |
17:40:16 | Prestige | Why is your machine crashing? |
17:40:34 | PMunch | @treeform, wait? Does that actually work? `var[string]`? |
17:40:45 | Zevv | snapshotting the FS every hour is too much of a burden for the machine |
17:40:46 | PMunch | I think mratsim was just telling you to use a static string :P |
17:40:47 | Zevv | I guess |
17:40:56 | disruptek | i just lost power because when trump moved control of the electricity grid to his desk, there was a brief interruption as the ups cycled. |
17:41:24 | PMunch | Nims syntax flexibility continues to amaze me |
17:41:29 | Zevv | that's one crap ups you have there. With a president like that I'd make sure to have a hospital-style unit in my cellar! |
17:41:42 | disruptek | you can also syntax[sometype](some expr) |
17:41:44 | disruptek | er, |
17:41:48 | disruptek | you can also static[sometype](some expr) |
17:41:58 | PMunch | Just switch to a crude oil generator, I hear that's cheap nowadays |
17:42:09 | disruptek | lol |
17:42:24 | PMunch | disruptek, what would that do? |
17:42:38 | disruptek | in soviet russia, you pay diesel generator! |
17:42:40 | PMunch | The same as "static(some expr)" just explicitly telling it the return type? |
17:42:51 | disruptek | yeah? |
17:43:14 | disruptek | else it's not typesafe, right? |
17:54:03 | * | opal quit (Ping timeout: 240 seconds) |
17:59:40 | * | darkmusic joined #nim |
18:00:17 | * | darkmusic quit (Client Quit) |
18:08:07 | * | opal joined #nim |
18:13:29 | * | darkmusic joined #nim |
18:14:33 | * | darkmusic quit (Client Quit) |
18:15:04 | FromDiscord | <treeform> @PMunch, no `var[string]` does not work. |
18:18:35 | * | darkmusic joined #nim |
18:22:42 | FromDiscord | <exelotl> Woah I didn't know that one. That forces "some expr" to be evaluated at compile time without first assigning it to a const? |
18:26:36 | PMunch | @treeform, haha okay |
18:27:02 | PMunch | Good to know I'm not completely out of touch |
18:29:17 | * | darkmusic quit (Quit: leaving) |
18:29:33 | * | drewr quit (Quit: BLM) |
18:30:29 | * | drewr joined #nim |
18:30:49 | Prestige | Is there a faster way to do this? https://play.nim-lang.org/#ix=2o7J seems to take forever to complete |
18:31:15 | Prestige | a similar cpp example runs in ~3 seconds but this is taking about 42 seconds for me |
18:33:16 | Zevv | 4 seconds here |
18:33:20 | Zevv | -d:danger? |
18:34:05 | Prestige | I just did nim c myfile.nim |
18:34:12 | Zevv | do nim c -d:danger myfile.nim instead |
18:34:29 | Zevv | default C compiles "safe", doing boundary checks and all |
18:34:29 | PMunch | -d:release is your first try |
18:34:29 | Zevv | which is nice, but not fast |
18:34:58 | Zevv | yeah what he said. I prefer living on the edge myself tho |
18:35:19 | Prestige | oh that is much better, thanks |
18:35:26 | Prestige | I kind of forgot about compiler options |
18:35:37 | FromDiscord | <Rika> 2 user seconds on danger for me |
18:35:51 | Prestige | 1.89 on release for me |
18:36:03 | Zevv | I got a crap computer |
18:36:13 | FromDiscord | <Rika> why? |
18:37:11 | Zevv | I don't care for bogomips I guess |
18:49:23 | * | NimBot joined #nim |
18:50:21 | Zevv | I only care for fast disks |
18:50:26 | FromDiscord | <Rika> man why am i bullied everywhere |
18:50:35 | Zevv | some people have that |
18:50:37 | FromDiscord | <Rika> people tell me that i'm so bulliable or something |
18:51:13 | PMunch | Haha, I wasn't bullying you :P |
18:51:17 | PMunch | It was just a reference |
18:53:22 | FromDiscord | <Rika> no im used to it |
18:53:36 | FromDiscord | <Rika> countless friends and discord servers have playfully bullied me |
18:54:22 | FromDiscord | <treeform> Prestige, most of the time is allocating a 381Mb buffer. |
18:54:39 | FromDiscord | <Rika> damn thats massive |
18:55:09 | FromDiscord | <treeform> if you do `var str = newStringOfCap(1000*800*500)` at the start it runs nearly instantly. |
18:55:19 | FromDiscord | <treeform> basically preallocate the string |
18:57:26 | * | Senketsu joined #nim |
18:57:48 | FromDiscord | <treeform> oh I got it down to 0.3seconds on my machine with this: |
18:58:19 | FromDiscord | <treeform> https://gist.github.com/treeform/a0bf64af27b9423d93d31bb196723007 |
18:59:14 | FromDiscord | <treeform> oops bug, need to do newString(1001*801*501) |
18:59:27 | FromDiscord | <treeform> because 0..1000 includes 1000 so its 1001 things |
19:00:30 | Zevv | https://en.wikipedia.org/wiki/Off-by-one_error |
19:00:36 | FromDiscord | <treeform> yeah! |
19:00:40 | Zevv | "A straight fence with n sections has n+1 posts." |
19:00:56 | FromDiscord | <Elegant Beef> Only if it's made properly |
19:01:05 | Zevv | that's not wrong |
19:01:15 | FromDiscord | <Elegant Beef> Free floating panels anyone? |
19:01:38 | FromDiscord | <treeform> Because this is such a huge uniform buffer, I can see this being speed up by some sort of page copier, where you create a page then use the operating system to copy pages (which is virutal and lazy)... but that might be too much? |
19:02:42 | FromDiscord | <treeform> Usually that is used for clearing large buffers not filling them... I have never done it. |
19:07:07 | Prestige | @treeform not working eh? |
19:07:45 | Prestige | incrementing 3 times in each loop |
19:09:42 | Prestige | so need to *9 |
19:11:21 | FromDiscord | <treeform> yeah, you right |
19:11:28 | FromDiscord | <treeform> I did the wrong computation its acctually |
19:11:41 | FromDiscord | <treeform> `1001*3 + 1001*801*3 + 1001*801*501*3` |
19:12:24 | FromDiscord | <treeform> or 1.1GB buffer |
19:12:41 | FromDiscord | <Rika> damn |
19:13:35 | Prestige | 0.30s with -d:danger |
19:14:51 | FromDiscord | <treeform> I get 1.30s on my Mac. Your computer is faster. |
19:14:58 | FromDiscord | <treeform> https://gist.github.com/treeform/a0bf64af27b9423d93d31bb196723007 |
19:16:45 | FromDiscord | <treeform> actually using the normal string version is faster |
19:17:01 | FromDiscord | <treeform> I get 0.30 with -d:danger as well |
19:17:05 | FromDiscord | <treeform> my optimization is not good |
19:17:13 | FromDiscord | <treeform> I think the string copy wins some how |
19:21:33 | Prestige | what is faster? |
19:21:50 | Prestige | like str &= "foo" ? |
19:23:39 | Zevv | your code is wrong |
19:23:48 | Zevv | http://ix.io/2o7Q the assertion fails |
19:24:15 | Prestige | Zevv: 100 vs 1000 |
19:24:39 | Zevv | oh right. Ye olde off-by-900 error of course |
19:26:24 | Prestige | or off-by-zero ;) |
19:26:37 | Zevv | ghe |
19:29:41 | Zevv | repeat("foo" & repeat("bar" & repeat("baz", 501), 801), 1001) |
19:30:19 | Prestige | oh fancy |
19:30:39 | FromDiscord | <mratsim> I like Oboe |
19:30:46 | FromDiscord | <Rika> oboe? |
19:30:52 | FromDiscord | <mratsim> Off-by-one-error |
19:31:02 | FromDiscord | <mratsim> wasn't updated to the latest message 😛 |
19:31:19 | FromDiscord | <Rika> Oboe looks like a name of a place s |
19:31:28 | FromDiscord | <Rika> (edit) removed 's' |
19:32:01 | FromDiscord | <mratsim> https://en.wikipedia.org/wiki/Oboe#/media/File:Oboe_modern.jpg |
19:32:25 | FromDiscord | <mratsim> This instruments inspired Vim and Emacs |
19:32:36 | Zevv | mratsim: is there a way that's more friendly to the eyes then casting-to-pointer to tell nim "trust me, I know what I'm doing" when using GC-ed data in weave |
19:32:39 | FromDiscord | <Rika> PFF |
19:33:20 | FromDiscord | <mratsim> Not using GC-ed data :p |
19:33:26 | Zevv | fair enough :) |
19:35:42 | Prestige | Zevv: that's stupid fast |
19:36:26 | Zevv | that's what it is for, right |
19:53:12 | FromDiscord | <KrispPurg> Is there any examples of locks in Nim, besides RosettaCode? |
19:53:28 | FromDiscord | <KrispPurg> anymore* |
19:53:37 | FromDiscord | <KrispPurg> (edit) 'anymore*' => 'any more*' |
19:56:54 | Prestige | on the threads page I think |
19:56:55 | * | silvernode joined #nim |
19:57:07 | FromDiscord | <KrispPurg> Link? |
19:57:07 | Prestige | https://nim-lang.org/docs/threads.html |
19:58:37 | silvernode | Araq, Watching your interview on the "Context Free" Youtube channel. Thank you for your dedication in sticking with the Nim project all these years. Great interview so far, keep up the good work. |
20:00:39 | * | naught-fowl joined #nim |
20:02:24 | FromDiscord | <speckledlemon> Ah, oboe and Nim, two of my favorite things |
20:08:35 | alehander92 | ohh |
20:09:34 | alehander92 | oh no man my rfc is there in the video :D |
20:10:35 | alehander92 | ok, some papers later |
20:10:43 | alehander92 | seems more sophisticated! |
20:21:21 | alehander92 | !disbot |
20:21:57 | * | narimiran quit (Quit: leaving) |
20:22:46 | * | nekits quit (Quit: The Lounge - https://thelounge.chat) |
20:22:48 | * | Guest31778 quit (Ping timeout: 272 seconds) |
20:23:38 | * | nekits joined #nim |
20:28:07 | * | dadada joined #nim |
20:28:29 | * | dadada is now known as Guest40673 |
20:34:21 | silvernode | I just had a random though: Does Nim run on Android? I never thought to look into it. I imagine I could install it via termux. |
20:34:30 | silvernode | thought* |
20:34:33 | alehander92 | yeah |
20:34:36 | alehander92 | some people use it |
20:35:30 | silvernode | Is there an alternative way other than termux? |
20:37:34 | alehander92 | no idea |
20:37:36 | silvernode | I am so comfortable with Nim now after 6 months of using it that I think I can replace bash in my day to day scripting. Normally by now with a programming language, the hype wears off and I move onto something else. Oddly this hasn't been the case with Nim. |
20:38:06 | alehander92 | i dont want to lie to you: i am not sure about android |
20:38:22 | FromDiscord | <Clyybber> Nim can run on android no problem |
20:38:29 | silvernode | alehander92, That's ok, it's not like I was going to use it anyway. |
20:38:35 | FromDiscord | <Clyybber> You can even bridge to java with jnim |
20:38:40 | FromDiscord | <Clyybber> I also ran it in termux |
20:38:41 | alehander92 | i think https://forum.nim-lang.org/t/3575 |
20:39:06 | silvernode | Thanks |
20:39:10 | alehander92 | disruptek, you online? |
20:41:22 | silvernode | Man, I really need to participate in the IRC room more. For awhile I was here every day but lately I've been slacking. |
20:49:14 | silvernode | bb |
20:49:21 | * | silvernode quit (Quit: Leaving) |
20:51:48 | * | Guest40673 quit (Ping timeout: 258 seconds) |
20:56:14 | alehander92 | yeah :) |
20:58:06 | * | dadada joined #nim |
20:58:29 | * | dadada is now known as Guest6088 |
21:02:40 | * | opDispatch quit (Ping timeout: 256 seconds) |
21:02:41 | * | B4s1l3 joined #nim |
21:09:35 | FromDiscord | <exelotl> oh wow that interview with araq is really good :O |
21:10:18 | FromDiscord | <exelotl> best overview of the Nim programming language I've seen, especially in any video |
21:21:11 | * | Trustable quit (Remote host closed the connection) |
21:21:42 | * | Guest6088 quit (Ping timeout: 258 seconds) |
21:28:11 | * | dadada__ joined #nim |
21:51:46 | * | dadada__ quit (Ping timeout: 260 seconds) |
21:58:02 | * | dadada joined #nim |
21:58:26 | * | dadada is now known as Guest27867 |
21:59:45 | disruptek | yes. |
22:00:51 | * | NimBot joined #nim |
22:04:38 | * | fredrikhr quit (Ping timeout: 258 seconds) |
22:06:28 | * | PMunch quit (Quit: leaving) |
22:10:59 | zedeus | disruptek: can you write to a socket with frosty? |
22:11:33 | zedeus | if not, there's a feature request for ya |
22:12:11 | * | Guest94576 joined #nim |
22:12:13 | FromDiscord | <treeform> silvernode, see my post on how to get stuff running: https://forum.nim-lang.org/t/5197 its tricky but not impossible. |
22:12:42 | silvernode | Thanks! |
22:12:56 | FromDiscord | <treeform> oops here is the direct link: https://github.com/treeform/glfm |
22:14:02 | FromDiscord | <treeform> I would like to create a tool that's some thing like emscripten but for mobiles. |
22:14:27 | FromDiscord | <treeform> were you just do `mobile-nim-tool foo.nim` and you get a foo.app. Not there yet. |
22:17:22 | * | Guest94576 quit (Quit: Guest94576) |
22:22:06 | * | Guest27867 quit (Ping timeout: 260 seconds) |
22:26:16 | * | fredrikhr joined #nim |
22:28:09 | * | dadada__ joined #nim |
22:36:50 | * | fredrikhr quit (Ping timeout: 258 seconds) |
22:46:13 | * | arecaceae quit (Read error: Connection reset by peer) |
22:46:35 | * | arecaceae joined #nim |
22:51:49 | * | dadada__ quit (Ping timeout: 264 seconds) |
22:55:44 | FromDiscord | <Rika> 😮 zevvs irc image is now dark themed |
22:58:06 | * | dadada joined #nim |
22:58:31 | * | dadada is now known as Guest43847 |
23:07:53 | Avatarfighter | What's the correct way of seeing if a path is a file/folder? |
23:08:00 | Avatarfighter | leads to a file/folders |
23:09:17 | Avatarfighter | I guess walkDir can be used |
23:10:04 | FromDiscord | <Rika> existsFile? |
23:10:07 | FromDiscord | <Rika> existsDir? |
23:10:20 | * | krux02_ joined #nim |
23:10:24 | leorize[m] | Can someone tell me why I need this? https://github.com/nim-lang/Nim/pull/14542/files#diff-09ce05d4800aaaa6014de76809a63957R403-R411 |
23:10:25 | disbot | ➥ asyncnet, net: call SSL_shutdown only when connection established [backport] |
23:10:53 | Avatarfighter | Rika: thank you, I skipped over the part where it says that directories, devices files, etc will return false |
23:12:34 | alehander92 | disruptek, sorry |
23:12:37 | alehander92 | tomorrow |
23:12:44 | alehander92 | gnight people |
23:13:04 | * | clemens3 quit (Ping timeout: 256 seconds) |
23:13:07 | Avatarfighter | o7 |
23:13:52 | * | krux02 quit (Ping timeout: 246 seconds) |
23:21:34 | * | Guest43847 quit (Ping timeout: 240 seconds) |
23:28:03 | * | opal quit (Ping timeout: 240 seconds) |
23:28:07 | * | dadada__ joined #nim |
23:37:10 | Avatarfighter | does anyone know how to stop karax from escaping quotes in an element? |
23:37:42 | Avatarfighter | I'm trying to do serverside rendering right now and i'm passing some js directly in a script element but karax escapes the double quotes |
23:38:35 | Avatarfighter | i found it |
23:38:43 | Avatarfighter | "verbatim" if anyone else is interested |
23:42:03 | * | opal joined #nim |
23:44:53 | * | opal quit (Excess Flood) |
23:46:57 | * | opal joined #nim |
23:51:34 | * | dadada__ quit (Ping timeout: 240 seconds) |
23:54:14 | skrylar[m] | hiyo |
23:56:40 | skrylar[m] | silvernode: yes i've been missing for some days too :( |
23:58:12 | * | dadada joined #nim |
23:58:36 | * | dadada is now known as Guest21672 |