00:03:51 | shashlick | disruptek does git-nim need nimgit2? |
00:07:29 | * | adnan338 quit (Read error: Connection reset by peer) |
00:07:54 | * | lritter quit (Ping timeout: 240 seconds) |
00:08:53 | * | lritter joined #nim |
00:15:17 | FromDiscord | <Rika> @Luk nim can get a 150 byte hello world btw |
00:17:43 | Yardanico | well that's with pretty ugly code |
00:18:04 | FromDiscord | <Rika> Well he argued v has an 186 byte hello world |
00:18:08 | Yardanico | lmao |
00:18:41 | FromDiscord | <willyboar> how much ugly? |
00:18:49 | Yardanico | 150 bytes? |
00:18:50 | FromDiscord | <Rika> Make your own syscall ugly |
00:18:56 | Yardanico | manually calling linux syscalls |
00:19:02 | Yardanico | and embedding hello world string in the elf header directly |
00:19:05 | Yardanico | with custom linking |
00:19:24 | FromDiscord | <Rika> basically impractical levels of ugly lmao |
00:19:39 | FromDiscord | <Rika> also is volt the web server or was that something else |
00:19:54 | Yardanico | idk |
00:20:02 | FromDiscord | <willyboar> volt is slack client i thikn |
00:20:09 | FromDiscord | <Rika> ah |
00:20:11 | FromDiscord | <willyboar> the server is ruby |
00:20:36 | FromDiscord | <Rika> i mean, there was a vlang webserver that "beat nim" but it was just a binding to another webserver in c |
00:21:02 | Yardanico | we dont want to have a vlang day today in chat |
00:21:07 | Yardanico | lets have a "pre nim-conf" day instead |
00:21:13 | Yardanico | nimconf is on 20th of June if you forgot |
00:21:19 | Yardanico | we have interesting talks |
00:21:28 | FromDiscord | <Rika> huh |
00:21:30 | FromDiscord | <Rika> its the 19th |
00:21:37 | oddp | Is there a talk schedule? |
00:21:49 | Yardanico | oddp: it should be published today (19th), a bit late, yes :P |
00:21:56 | oddp | Alright. |
00:22:05 | FromDiscord | <willyboar> well the only V framework in the benchmark is no.165 |
00:24:09 | Yardanico | lemme see how much can I get helloworld down to |
00:24:20 | Yardanico | iirc it was around 5kb |
00:24:34 | Yardanico | without changing nim source code, fully static build (with musl) |
00:24:46 | FromDiscord | <SeanOMik> How would I make a `nim` code block for the documentation generator? |
00:25:03 | FromDiscord | <willyboar> ## |
00:25:05 | Yardanico | https://github.com/Yardanico/nim-mathexpr/blob/master/src/mathexpr.nim#L14 |
00:25:51 | FromDiscord | <willyboar> everything inside ## supports rst i think |
00:25:57 | Yardanico | yes, for the docgen |
00:26:01 | Yardanico | also limited markdown |
00:26:35 | FromDiscord | <Rika> ah |
00:27:20 | FromDiscord | <SeanOMik> I try that but it looks like this: https://media.discordapp.net/attachments/371759389889003532/723333051182219335/unknown.png |
00:27:25 | FromDiscord | <Rika> can someone explain to me why this has a `RootEffect`? i still dont know... https://play.nim-lang.org/#ix=2pvs |
00:27:37 | Yardanico | @SeanOMik you need to have an empty line before the code block I think |
00:27:42 | Yardanico | show the source comment :) |
00:27:52 | FromDiscord | <SeanOMik> I was just about to |
00:27:59 | FromDiscord | <SeanOMik> sent a code paste, see http://ix.io/2pym |
00:28:09 | FromDiscord | <SeanOMik> (edit) 'http://ix.io/2pym' => 'http://ix.io/2pyn' |
00:28:11 | FromDiscord | <SeanOMik> Oops |
00:28:13 | FromDiscord | <SeanOMik> I ediited |
00:28:21 | FromDiscord | <SeanOMik> I forgot about IRC, sorry |
00:28:25 | Yardanico | its okay |
00:28:32 | Yardanico | @Rika because test.a could be *any* iterator |
00:28:44 | FromDiscord | <SeanOMik> Awesome |
00:28:55 | FromDiscord | <SeanOMik> I added a line after `Examples` and its working now |
00:28:57 | FromDiscord | <SeanOMik> Thanks |
00:29:18 | Yardanico | also you can have runnableExamples if your code examples are self-contained (runnableExamples will test your code examples when you run nim doc) |
00:29:31 | FromDiscord | <SeanOMik> Oh |
00:29:33 | FromDiscord | <SeanOMik> Thats kind of cool |
00:29:44 | FromDiscord | <SeanOMik> I may use that for other places |
00:29:46 | FromDiscord | <SeanOMik> But thanks! |
00:30:11 | Yardanico | @Rika you can have this to force user to not have any tags in their call |
00:30:12 | Yardanico | https://play.nim-lang.org/#ix=2pyo |
00:30:19 | FromDiscord | <Rika> Yardanico huh? is there a way for me to not have a root effect then? and while were at it why is it a RootEffect and not a specific effect |
00:30:30 | Yardanico | because the compiler doesn't know what the user will provide |
00:30:36 | Yardanico | it can be literally any iterator with that type |
00:30:40 | Yardanico | so it's a RootEffect |
00:30:49 | FromDiscord | <Rika> i see |
00:30:54 | * | fredrikhr quit (Ping timeout: 240 seconds) |
00:30:54 | FromDiscord | <Rika> so it can do anything |
00:30:54 | Yardanico | anyway why are you curious about effect system? :) |
00:31:08 | FromDiscord | <Rika> because i'm writing something for a `Stream` |
00:31:09 | FromDiscord | <Rika> lol |
00:31:12 | Yardanico | hah |
00:32:15 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
00:40:34 | * | krux02 quit (Remote host closed the connection) |
00:44:51 | * | dddddd quit (Ping timeout: 260 seconds) |
00:45:33 | * | endragor joined #nim |
00:46:26 | disruptek | shashlick: nah. |
00:56:43 | shashlick | Ok was wondering |
00:57:31 | * | vicfred_ joined #nim |
01:00:13 | * | vicfred quit (Ping timeout: 264 seconds) |
01:00:53 | FromDiscord | <Rika> why does time effect exist........ |
01:01:00 | Yardanico | for time travel |
01:05:13 | disruptek | for reproducible builds. |
01:05:39 | disruptek | shashlick: it's not even 100 lines of code i don't think. |
01:06:58 | FromDiscord | <Rika> yardanico: is there a way to "bypass" or "ignore" just this single effect |
01:07:09 | FromDiscord | <Rika> since i dont understand why it exists |
01:08:26 | Yardanico | I don't think you can "ignore" it |
01:08:38 | Yardanico | well not without some hacks at least |
01:09:12 | Yardanico | like casting |
01:09:22 | Yardanico | in your first example - https://play.nim-lang.org/#ix=2pyv |
01:10:00 | FromDiscord | <Rika> hmm |
01:10:03 | FromDiscord | <Rika> let me test that |
01:11:46 | Yardanico | ignore the {.tags: [].} in the testp |
01:11:48 | Yardanico | forgot to remove it |
01:12:10 | Yardanico | you can also do something like this when assigning a custom proc for streams |
01:12:48 | Yardanico | mystream.setPositionImpl = cast[typeof(Stream.setPositionImpl)](myproc) |
01:12:53 | Yardanico | but be careful :P |
01:13:10 | disruptek | leorize: builds seem great; can i have stable urls? |
01:13:54 | FromDiscord | <Rika> looks like it works |
01:16:14 | * | lritter quit (Ping timeout: 240 seconds) |
01:16:21 | Yardanico | asyncdispatch does this a bit too |
01:16:45 | * | mfx joined #nim |
01:17:13 | FromDiscord | <Rika> feels like im walking on a tightrope |
01:17:31 | Yardanico | ah sorry not asyncdispatch, asyncmacro |
01:17:48 | Yardanico | e.g. https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/asyncmacro.nim#L49 |
01:20:23 | FromDiscord | <Rika> i feel like i just wrote a horrible piece of code, not in terms of writing, but conceptually |
01:27:41 | shashlick | disruptek: git-nim still doesn't run for me |
01:30:48 | * | mfx quit (Quit: Leaving) |
01:31:30 | * | oddp quit (Ping timeout: 258 seconds) |
01:34:59 | * | bung joined #nim |
01:39:22 | * | bung quit (Ping timeout: 256 seconds) |
01:40:06 | disruptek | shashlick: cannot imagine why, but did you follow the directions? |
01:40:16 | disruptek | it has you build your own binary in the third step. |
01:40:35 | shashlick | i can do that - i just pulled latest and git-nim was still there so i tried running it |
01:40:58 | disruptek | ah. i figure that if you cannot build something, there's no point in proceeding. |
01:41:46 | disruptek | it's odd that a static binary doesn't work, though. |
01:43:16 | shashlick | so bug - if you try git-nim 1.2.2, error: Your local changes to the following files would be overwritten by checkout: |
01:43:17 | shashlick | bin/git-nim |
01:43:42 | disruptek | the .gitignore is supposed to prevent that. |
01:44:15 | disruptek | i guess we just remove it entirely. |
01:44:35 | shashlick | i guess your changes need to propagate to all branches |
01:44:38 | disruptek | but, i really want the branches to follow the binaries. hmm. |
01:45:06 | shashlick | why not have gitnim in a separate repo and have a bootstrap that loads it - submodules or something else |
01:45:16 | disruptek | because that misses the point. |
01:45:29 | disruptek | the whole idea is that it matches the compiler. |
01:45:35 | disruptek | and the architecture. |
01:45:38 | shashlick | but the nuisance of having to update git-nim in every branch |
01:45:51 | disruptek | is nothing compared to supporting infinite configurations. |
01:45:51 | shashlick | but you are expecting the user to compile it now |
01:45:58 | disruptek | sure. |
01:46:03 | disruptek | seems reasonable, right? |
01:46:09 | disruptek | they do have a working nim compiler. |
01:46:25 | shashlick | is it really going to get complex enough to have compatibility challenges across nim versions? |
01:46:36 | disruptek | i know a guy i can ask. |
01:46:50 | disruptek | shashlick: is choosenim too complex? |
01:47:09 | disruptek | let me put that another way... |
01:47:25 | disruptek | shashlick: is there a good reason for the failure of choosenim to support osx for ... so many weeks? |
01:48:00 | disruptek | also, the idea here is that someone else will make it better by forking my shit. |
01:48:09 | disruptek | and someone else will fork /that/ fork. |
01:48:24 | shashlick | who's comparing this with choosenim |
01:48:37 | disruptek | 👍this guy👍 |
01:51:24 | * | endragor quit (Remote host closed the connection) |
01:51:33 | * | endragor joined #nim |
01:51:46 | shashlick | how's nimph doing these days |
01:51:56 | disruptek | oh yeah, real good. |
01:53:03 | disruptek | will bundle it in git nim eventually. |
01:53:53 | * | chemist69 quit (Ping timeout: 246 seconds) |
01:56:03 | disruptek | i think we just omit the binary. seems like the reasonable move, right? |
01:56:08 | * | chemist69 joined #nim |
02:01:28 | shashlick | i disagree, rather have the binary built like nim itself |
02:01:58 | disruptek | well, i'm not gonna impl that. maybe if we wait around long enough, someone smart can do it. |
02:02:48 | shashlick | we will figure out a musl based nimph eventually |
02:03:03 | shashlick | trusting leorize, we can get it in a couple hours |
02:04:01 | disruptek | hopefully. |
02:04:37 | disruptek | but, i think people should be able to build their own without much trouble. |
02:07:18 | shashlick | maybe nimterop will work eh |
02:09:06 | disruptek | we may as well bundle it. |
02:09:30 | disruptek | current version does not include the binary but does ignore said binary. |
02:09:51 | shashlick | i'm still working on libdir support |
02:09:57 | shashlick | some random CI issues |
02:10:20 | shashlick | takes a few days to write most of the code, then weeks to please all OS and configs |
02:10:21 | shashlick | torture |
02:10:58 | disruptek | well, i will probably write a new ci based on these distributions. |
02:11:26 | disruptek | it will be zig-based, though, so i have to work through testing that stuff first. |
02:11:29 | shashlick | its not really a CI problem |
02:11:37 | disruptek | i mean, it is for me. |
02:11:39 | shashlick | just that dealing with C libraries across OS is a nightmare |
02:14:01 | * | willyboar quit () |
02:15:39 | disruptek | i think we just distribute binaries. done. |
02:15:46 | FromDiscord | <Zed> disruptek, How do you find zig? last i heard was that it was super immature |
02:15:56 | disruptek | don't know, don't care. |
02:16:06 | FromDiscord | <Zed> Wren looks interesting as well |
02:16:09 | disruptek | i mean, i build it. |
02:16:14 | disruptek | !repo euwren |
02:16:25 | FromDiscord | <Rika> bot ded |
02:16:26 | disruptek | disbot is dead. |
02:16:31 | FromDiscord | <Zed> rip |
02:16:35 | disruptek | he's moving. |
02:16:39 | FromDiscord | <Rika> disruptek killed disbot |
02:17:38 | * | Senny joined #nim |
02:31:05 | * | Senny quit (Ping timeout: 272 seconds) |
02:37:16 | * | unknown__ quit (Quit: Leaving) |
02:37:29 | * | disruptek quit (Quit: bye) |
02:38:21 | * | disruptek joined #nim |
02:38:56 | * | brainbomb quit (Quit: Leaving.) |
02:45:01 | FromDiscord | <Skaruts> has the zip module changed to require zlib1.dll? |
02:45:34 | FromDiscord | <Skaruts> I'm compiling an older project, and I never needed that before, but now it isn't running because of that |
02:47:56 | FromDiscord | <Luk> morning |
02:51:47 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:52:00 | leorize | disruptek: stable links? like a link to the latest nightlies? |
02:52:31 | FromDiscord | <SeanOMik> Is there a method that I could use to get a file extension? |
02:52:36 | FromDiscord | <SeanOMik> From a `FileStream` |
02:52:52 | FromDiscord | <Rika> dont think so |
02:52:58 | leorize | I don't think you can, FileStream don't store the filename |
02:53:05 | FromDiscord | <Rika> i dont think you can get the original file name from a File |
02:53:11 | FromDiscord | <SeanOMik> Okay |
02:53:19 | FromDiscord | <SeanOMik> Well I have a string for the filename |
02:53:24 | FromDiscord | <SeanOMik> So I could calculate it myself |
02:53:37 | leorize | os.getFileExt |
02:53:40 | FromDiscord | <SeanOMik> Is there a method similar to `find_last_of` from C++? |
02:53:41 | * | muffindrake joined #nim |
02:53:43 | FromDiscord | <SeanOMik> Okay |
02:53:57 | leorize | or splitFile() can also get you the extension |
02:55:04 | FromDiscord | <SeanOMik> I'll have to use `splitFile()` |
02:55:10 | FromDiscord | <SeanOMik> `getFileExt()` doens't exist |
02:55:20 | FromDiscord | <SeanOMik> I dont see it anywhere on the docs either |
02:55:26 | FromDiscord | <SeanOMik> Thanks |
02:55:41 | FromDiscord | <SeanOMik> (edit) '`splitFile()`' => '`splitPath()`' |
02:55:54 | leorize | ah yea, there's only this: https://nim-lang.org/docs/os.html#searchExtPos%2Cstring :P |
03:13:52 | FromDiscord | <SeanOMik> Is there a way I could pass a mutable reference to something through a proc's parameters? |
03:14:39 | leorize | use `var` parameters |
03:14:41 | FromDiscord | <Rika> add var before the type? |
03:19:12 | FromDiscord | <SeanOMik> Awesome, thanks |
03:34:01 | * | exelotl joined #nim |
03:34:10 | * | FromDiscord quit (Remote host closed the connection) |
03:34:24 | * | opDispatch quit (Quit: Konversation terminated!) |
03:34:26 | * | FromDiscord joined #nim |
03:39:38 | * | FromDiscord quit (Remote host closed the connection) |
03:39:53 | * | FromDiscord joined #nim |
03:44:28 | * | FromDiscord quit (Remote host closed the connection) |
03:44:44 | * | FromDiscord joined #nim |
04:03:45 | FromGitter | <ynfle> Where can I find the release notes on v1.2.2? |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:41 | * | supakeen joined #nim |
04:14:42 | Prestige | https://nim-lang.org/blog/2020/06/17/version-122-released.html |
04:14:58 | FromGitter | <ynfle> 👍 |
04:22:14 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:23:01 | * | bung joined #nim |
04:27:49 | * | bung quit (Ping timeout: 264 seconds) |
04:40:04 | * | narimiran joined #nim |
04:44:27 | FromGitter | <timotheecour> tests/async/t7758.nim is super flaky and breaks CI in many PR's ; can anyone please review https://github.com/nim-lang/Nim/pull/14721 ? |
04:56:58 | * | nsf joined #nim |
05:00:35 | leorize | @timotheecour why the `let t = 40`? |
05:01:11 | FromGitter | <timotheecour> to refer to `t` in the comment |
05:01:37 | leorize | you can make a const with a meaningful name and refer to it instead... |
05:05:30 | FromGitter | <timotheecour> done PTAL |
05:06:20 | leorize | please make whatever constable const |
05:10:50 | FromGitter | <timotheecour> done |
05:15:37 | * | NimBot joined #nim |
05:17:26 | * | mfx joined #nim |
05:26:41 | * | mfx quit (Quit: Leaving) |
05:29:01 | * | vicfred_ quit (Ping timeout: 264 seconds) |
05:29:47 | shashlick | Conan and http://binarybuilder.org have been a mixed bag - Conan windows builds are vc++ so link doesn't work with some static libs |
05:30:12 | shashlick | Whereas http://binarybuilder.org doesn't have static libs for some libs |
05:30:28 | shashlick | And both don't always have the latest versions |
05:30:48 | * | vicfred_ joined #nim |
05:32:05 | * | rokups joined #nim |
05:33:48 | * | solitudesf joined #nim |
05:35:58 | * | kenran joined #nim |
05:55:46 | FromDiscord | <Technisha Circuit> If i have a type with some values, am i able to directly modify the values in the type? Let's say `Foo` was the type with `bar` as a method (i think that's the correct term), and `bar` returns a string, could i just do `Foo.bar = "newValue"`? |
05:56:15 | FromDiscord | <Technisha Circuit> This is an initialized type btw |
05:58:59 | FromDiscord | <Rika> type, or instance? |
05:59:14 | FromDiscord | <Rika> bar is a method, or a field? |
05:59:21 | FromDiscord | <Rika> you can directly modify fields yes |
05:59:27 | FromDiscord | <Rika> (if it's var) |
06:07:07 | FromDiscord | <Technisha Circuit> Instance and field |
06:07:10 | FromDiscord | <Technisha Circuit> Yeah :P |
06:07:11 | FromDiscord | <Technisha Circuit> Thanks |
06:10:12 | FromDiscord | <Technisha Circuit> Why does Nim not allow the use of `__` in proc names? |
06:12:03 | FromDiscord | <Rika> because of how its parsed i assume |
06:12:32 | FromDiscord | <Rika> feel like compilation would be a bit slower if it allowed that |
06:18:02 | * | tdc joined #nim |
06:19:32 | FromDiscord | <Technisha Circuit> Oh okay |
06:20:21 | FromDiscord | <Elegant Beef> I'd say the best reason is it looks bad 😄 |
06:20:32 | FromDiscord | <Elegant Beef> The others are complementary to that arguement |
06:22:13 | FromDiscord | <Rika> argument has no e before the u |
06:22:29 | FromDiscord | <Rika> *after |
06:23:32 | FromDiscord | <Elegant Beef> Like i can spell |
06:24:18 | FromDiscord | <Technisha Circuit> https://www.urbandictionary.com/define.php?term=arguement&=true↵arguement - Urban Dictionary |
06:25:21 | Prestige | Gray and grey always mess me up |
06:25:54 | FromDiscord | <Technisha Circuit> Grey is how i spell it :p |
06:26:29 | FromDiscord | <Technisha Circuit> Is it better to deal with the loaded json data from parseJson or is it better to deal with the data as a nim type when possible? |
06:27:04 | FromDiscord | <Technisha Circuit> (edit) 'Is it better to deal with the loaded json data from parseJson or is it better to deal with the data as ... a' => 'Is it better to deal with the loaded json data from parseJson or is it better to deal with the data asan instance of' | removed 'nim' |
06:27:10 | FromDiscord | <Elegant Beef> What? |
06:27:28 | FromDiscord | <Elegant Beef> It's clearly better to get the data in your prefered type |
06:27:31 | FromDiscord | <Technisha Circuit> No idea 😅 |
06:27:46 | FromDiscord | <Elegant Beef> If you're relying on jsonNodes for all your logic, you dun goofed imo |
06:28:09 | FromDiscord | <Technisha Circuit> I mean is it better to marshal the data and then edit it like that or should i always deal with the raw JSON data? |
06:28:58 | FromDiscord | <Technisha Circuit> (edit) 'data?' => 'data when possible?' |
06:29:04 | * | fredrikhr joined #nim |
06:29:49 | * | bung joined #nim |
06:30:14 | * | silvernode joined #nim |
06:30:47 | silvernode | So I know there is 'openArray' but what about 'openSeq'? |
06:31:00 | FromDiscord | <Elegant Beef> that's pointless |
06:31:11 | FromDiscord | <Elegant Beef> procs that take sequences dont care about length |
06:31:19 | silvernode | ok |
06:31:44 | FromDiscord | <Elegant Beef> Openarray is basically saying that it'll take either an array of X type or a sequence |
06:31:58 | FromDiscord | <Elegant Beef> So you dont need a proc for each array[length,T] |
06:32:15 | silvernode | got you |
06:33:36 | silvernode | I'm still trying to figure out cmdline args and I had it working until I made some other procs to make the code a bit nicer. Seems like now that I put the args code in a proc, I can no longer append multiple args to the end of the list in the cmdline |
06:33:37 | FromDiscord | <Rika> i also like saying judgment has no e after the g |
06:34:04 | silvernode | I think I should just use a cmdline library |
06:34:13 | FromDiscord | <Elegant Beef> No clue, sounds weird |
06:35:11 | silvernode | I'm just trying to do manually what cligen is designed to do |
06:35:35 | Prestige | Can always share code snippets here |
06:36:07 | silvernode | Prestige: Normally I do but this code is split between several files |
06:36:54 | silvernode | I can share the project though https://github.com/silvernode/tuxn/tree/master/src |
06:37:02 | silvernode | it's a package manager wrapper |
06:37:24 | FromDiscord | <Cut a weeb and a pedo bleeds> Can you do this in your .nimble file? ```backend = if filename == "frontend": "js" else: "c"``` |
06:37:38 | silvernode | I usually rewrite tux whenever I learn a new language since it is a good project to practice with |
06:39:49 | silvernode | The usage should be: tuxn i i3-gaps xterm mc |
06:40:17 | silvernode | but when I do something like that, the program is only reading up to i3 in that example |
06:40:32 | silvernode | i3-gaps* |
06:50:21 | Prestige | Are there any Nim t-shirts? I need a shirt. |
06:51:06 | * | nikita` joined #nim |
06:52:30 | Prestige | Oh I found https://teespring.com/shop/nimlang1 |
06:54:14 | * | silvernode quit (Ping timeout: 240 seconds) |
06:55:27 | FromDiscord | <Elegant Beef> No long sleever shirts 0/10 |
06:55:30 | FromDiscord | <Elegant Beef> (edit) 'sleever' => 'sleeve' |
06:55:33 | * | marnix joined #nim |
06:56:24 | FromDiscord | <Rika> > long sleeved shirts |
06:56:29 | FromDiscord | <Elegant Beef> Our those even official |
06:56:37 | FromDiscord | <Rika> prolly bootleg |
06:56:44 | FromDiscord | <Elegant Beef> Long sleeve is right |
06:56:55 | FromDiscord | <Elegant Beef> Dont fucking try to correct me there bud |
06:57:04 | Prestige | Yeah probably bootleg |
06:57:11 | Prestige | We need some Nim merch |
06:57:33 | FromDiscord | <Elegant Beef> I say we need a less child murderer mascot, just so it can be more cheerful |
06:59:02 | FromDiscord | <Elegant Beef> Go encourage official nim merch |
06:59:59 | FromDiscord | <Rika> @Elegant Beef im not |
07:00:07 | FromDiscord | <Rika> im saying > imagine liking long sleeved shirts |
07:00:17 | FromDiscord | <Elegant Beef> ah |
07:00:20 | FromDiscord | <Elegant Beef> Imagine not |
07:00:30 | FromDiscord | <Rika> i live in a *tropical country* |
07:00:31 | FromDiscord | <Elegant Beef> I can leave my house in -10 and not be cold |
07:00:36 | Prestige | Let's get everyone on board, open an issue on GitHub about merch |
07:01:03 | FromDiscord | <Elegant Beef> I also sweat a lot and most of my long sleeve shirts are vastly thicker so i dont have huge sweatstains in my armpits |
07:02:23 | * | vikfret joined #nim |
07:02:48 | FromDiscord | <Elegant Beef> Well prestige dont forget stickers, people love stickers |
07:03:23 | Prestige | Nim shorts (gym shorts) |
07:04:36 | FromDiscord | <Rika> i hate stickers |
07:04:44 | FromDiscord | <Rika> i would love an acrylic keychain though |
07:04:56 | FromDiscord | <Luk> Wallpapers |
07:05:05 | FromDiscord | <Luk> Made with nim |
07:06:12 | Prestige | I'd get a t-shirt and a hoodie |
07:06:43 | FromDiscord | <Technisha Circuit> Is it possible to use GitHub actions to compile Nim code for me and publish the binaries as releases? |
07:06:44 | Prestige | And definitely a cape if they were still in style |
07:06:46 | * | skrzyp joined #nim |
07:07:07 | FromDiscord | <Rika> yes it is possible |
07:07:10 | FromDiscord | <Rika> no i do not know how |
07:07:29 | FromDiscord | <Rika> theres prolly an example in the nim github wiki |
07:07:38 | FromDiscord | <Technisha Circuit> O oki |
07:07:56 | FromDiscord | <Elegant Beef> Travis CI can be used |
07:08:02 | FromDiscord | <Elegant Beef> Get me a nim keycap for super |
07:08:24 | FromDiscord | <Elegant Beef> And a rust one for delete |
07:08:24 | FromDiscord | <Rika> ooh keycaps |
07:08:28 | FromDiscord | <Rika> LMAO |
07:08:31 | FromDiscord | <Elegant Beef> Just so i can delete rust |
07:08:41 | FromDiscord | <Rika> but that implies you touching the rust logo... |
07:08:48 | FromDiscord | <Rika> do you really wanna touch that 😛 |
07:09:15 | FromDiscord | <Elegant Beef> I mean the rust logo sucks |
07:09:17 | FromDiscord | <Elegant Beef> So not really |
07:09:23 | FromDiscord | <Elegant Beef> Their mascot is a better logo than the official one |
07:10:10 | FromDiscord | <Elegant Beef> Rust on a metal gear, exactly what you dont want, fragments of metal in the cogs |
07:10:10 | FromDiscord | <Luk> I hate llvm languagrs |
07:10:17 | FromDiscord | <Luk> (edit) 'languagrs' => 'languages' |
07:10:17 | FromDiscord | <Elegant Beef> Im indifferent |
07:11:07 | FromDiscord | <Rika> i just dont like the syntax |
07:11:13 | FromDiscord | <Rika> dont really mind if its llvm or not |
07:11:30 | Prestige | Oh man I'd love a Nim keycap |
07:11:54 | FromDiscord | <Luk> I compile a lot... LLVM needs some over 90GiBs |
07:11:57 | FromDiscord | <Technisha Circuit> Nim phonecase- |
07:13:14 | FromDiscord | <Elegant Beef> Yea rust reads like sandpaper |
07:13:19 | FromDiscord | <Elegant Beef> It's one reason i didnt attempt to learn it |
07:13:23 | FromDiscord | <Elegant Beef> It just doesnt look fun to write |
07:13:36 | FromDiscord | <Rika> i'd prolly prefer c to rust... |
07:13:40 | FromDiscord | <Zed> same, i couldn't get past the syntax |
07:14:03 | FromDiscord | <Elegant Beef> I have no interest in learning C/C++/Rust |
07:14:09 | FromDiscord | <Elegant Beef> It's all the same offending syntax to me |
07:14:19 | FromDiscord | <Zed> i quite like braces syntax |
07:14:24 | FromDiscord | <Elegant Beef> That's not the issue |
07:14:25 | Prestige | Same |
07:14:41 | FromDiscord | <Elegant Beef> The issue is the use of annoying symbols and keywords |
07:14:53 | FromDiscord | <Zed> im attempting to implement braces in nim, it's interesting |
07:14:54 | FromDiscord | <Rika> &&::<><{}@][[] |
07:15:08 | FromDiscord | <Rika> did i scare you beef |
07:15:08 | FromDiscord | <Zed> somtimes they make sense |
07:15:13 | FromDiscord | <Elegant Beef> Yes rika you did |
07:15:18 | Prestige | If you get that working let me know Zed |
07:15:20 | FromDiscord | <Rika> "the horror!" |
07:15:32 | FromDiscord | <Elegant Beef> Yea im actually having a heart attack |
07:15:34 | FromDiscord | <Elegant Beef> Oh im dead |
07:15:35 | FromDiscord | <Elegant Beef> Shit |
07:15:45 | FromDiscord | <Zed> *children screaming* |
07:17:11 | FromDiscord | <Zed> Prestige, https://github.com/Zed-Inc/nim_braces |
07:17:23 | FromDiscord | <Zed> still a work in progress |
07:17:59 | * | vikfret quit (Ping timeout: 246 seconds) |
07:18:07 | FromDiscord | <Zed> but you can change the json file to have whatever you want as a closing/opening symbol |
07:18:10 | * | vicfred_ quit (Ping timeout: 256 seconds) |
07:18:11 | Prestige | Exciting stuff, I hope you get it working |
07:18:13 | FromDiscord | <Rika> > pushed binary to repo |
07:18:15 | FromDiscord | <Rika> :thonk: |
07:18:31 | FromDiscord | <Zed> yup |
07:18:37 | FromDiscord | <Zed> much sense |
07:18:47 | FromDiscord | <Luk> Lel |
07:18:55 | FromDiscord | <Zed> i've done most of it half asleep ok |
07:19:49 | FromDiscord | <Zed> there's so many mistakes :/ |
07:20:36 | FromDiscord | <Elegant Beef> Now the question is, do you have a way to remove the braces and output proper nim code? |
07:20:50 | FromDiscord | <Zed> that's what it does |
07:20:54 | FromDiscord | <Elegant Beef> Ah |
07:21:00 | FromDiscord | <Rika> lol |
07:21:01 | FromDiscord | <Elegant Beef> Thought you modified the compiler to parse this directly |
07:21:09 | FromDiscord | <Zed> no |
07:21:15 | FromDiscord | <Zed> how smart do you think i am |
07:21:18 | FromDiscord | <Rika> did you even read the embed |
07:21:21 | FromDiscord | <Elegant Beef> Nope |
07:21:24 | FromDiscord | <Zed> dont |
07:21:30 | FromDiscord | <Zed> full of spelling mistakes |
07:21:38 | FromDiscord | <Luk> "&&::<><" =opening bracket↵"{}@][[]" = closing bracket |
07:21:39 | FromDiscord | <Elegant Beef> I dont read text from sites |
07:21:48 | FromDiscord | <Zed> ok |
07:21:49 | FromDiscord | <Elegant Beef> Gooberment could change it |
07:22:11 | FromDiscord | <Elegant Beef> I get my information directly from the chickens ass |
07:22:30 | FromDiscord | <Zed> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/723437535488901170 |
07:22:35 | FromDiscord | <Zed> @Luk |
07:22:44 | FromDiscord | <Zed> ok beef |
07:22:51 | FromDiscord | <Luk> Hah |
07:23:01 | FromDiscord | <Elegant Beef> Im going to "accidently" let my lawnmower run me over |
07:23:02 | FromDiscord | <Elegant Beef> bbs |
07:23:07 | FromDiscord | <Zed> ok |
07:24:05 | FromDiscord | <Rika> beef's...↵*out of luk* |
07:25:10 | FromDiscord | <Luk> Nimimalism |
07:26:07 | Zevv | Zed: I patched the parser a few weeks ago to parse braces |
07:26:19 | Zevv | it's crap but it kinda works :) |
07:27:23 | Prestige | I need some braces in my life Zevv don't hold out |
07:29:30 | Araq | hi Zevv, what's wrong with CPS? |
07:29:45 | FromDiscord | <Elegant Beef> They always take kids away from their parents |
07:29:53 | FromDiscord | <Elegant Beef> Ill see myself out |
07:31:19 | FromDiscord | <Elegant Beef> I'd like to point out that all the work that went into nim, led up to that shitty joke |
07:32:19 | FromDiscord | <Rika> now leave thanks |
07:33:01 | FromDiscord | <Elegant Beef> It's better for everyone's health if i dont |
07:33:21 | Prestige | Araq: thoughts on Nim merch? |
07:34:18 | FromDiscord | <Luk> If nim gets stickers and other merch I'll use it |
07:35:19 | FromDiscord | <Elegant Beef> `template sticker()=discard`↵There equally as useful as a sticker |
07:37:55 | Araq | Prestige, you can get stickers and T-shirts |
07:38:03 | Araq | but I cannot remember the link... ping dom96 |
07:38:28 | FromDiscord | <Elegant Beef> @dom96 you have been summoned! |
07:38:31 | Prestige | https://teespring.com/shop/nimlang1 is the only thing I've found |
07:39:05 | Prestige | Nomc |
07:39:21 | Prestige | Nim conf 2020 would be a cool shirt as well |
07:40:38 | FromDiscord | <impbox> hmm can I exit an iterator early? |
07:41:14 | FromDiscord | <Rika> what do you mean? |
07:41:38 | FromDiscord | <impbox> like return / break without yielding an item and end the iteration |
07:41:52 | FromDiscord | <Rika> just stop yielding? |
07:42:12 | FromDiscord | <Rika> when you get to the end of the iterator itll "stop" |
07:42:56 | FromDiscord | <impbox> yeah, but i want to end it early |
07:43:21 | FromDiscord | <Rika> then break out of the while loop thats keeping you in the iterator |
07:43:29 | FromDiscord | <impbox> it's not in a loop |
07:43:42 | FromDiscord | <Rika> then how are you staying in the iterator |
07:43:49 | solitudesf | add iterator body to `block` and use break. |
07:45:15 | FromDiscord | <impbox> solitudesf thanks! |
07:45:40 | FromDiscord | <impbox> @Rika i wanted to exit before the loop started |
07:45:46 | FromDiscord | <Rika> i see |
08:01:19 | * | rokups quit (Quit: Connection closed for inactivity) |
08:04:00 | * | pietroppeter joined #nim |
08:06:23 | bung | is there simple way turn parser ast node to formated code ? |
08:09:20 | * | haxscramper joined #nim |
08:10:41 | haxscramper | If you are talking about `PNode` you can use `renderer.$` to convert it to string. Example: https://play.nim-lang.org/#ix=2pzq |
08:10:54 | * | fredrikhr quit (Ping timeout: 240 seconds) |
08:14:19 | bung | so its tied to specific parser? am wondering some like algorithm that can be used in common parsers |
08:16:45 | * | matti quit () |
08:17:41 | * | matti joined #nim |
08:17:47 | FromDiscord | <Zed> i think it would be interesting to see machine learning in compilers and parsers for source code |
08:19:11 | haxscramper | You mean pretty-printing any AST back to working code? I guess it is possible to implement in principle but I don't know of any library/tool which actually does this. All of them are specific to ast/language. |
08:20:36 | bung | yeah, it can be done but it also need write grammar since it doesnot know the source language |
08:21:57 | haxscramper | What does `ObservableStores` warning mean? I haven't found anything concrete as to what can cause it. |
08:23:11 | * | PMunch joined #nim |
08:25:31 | Araq | haxscramper, it's an edge case caused by the interaction of exceptions and NVRO |
08:26:04 | Araq | we tried to disable NVRO but now code relies on it |
08:26:48 | Araq | and so instead we produce a warning. There is an RFC about it too, so far without any consensus |
08:27:39 | Araq | the problem is that you can observe stores to 'result' when an exception is raised. |
08:28:07 | Araq | IMHO that's a feature. Others think it's a bug. :P |
08:35:01 | * | waleee-cl joined #nim |
08:40:46 | Prestige | That sounds useful |
08:43:11 | PMunch | NVRO? |
08:43:35 | Araq | NVRO: turn x = f() into f(addr x) |
08:44:02 | Araq | to avoid stack slot copies |
08:44:45 | FromDiscord | <Zed> What is a complex statement?? vscode is giving me this error on my proc |
08:46:17 | Araq | a complex statement is one that can contain other statements |
08:46:33 | Araq | for instance, 'if' is complex, 'return' isn't |
08:47:03 | Araq | I should have used "nestable statement" instead |
08:47:31 | PMunch | Ah, I see |
08:48:36 | Prestige | PMunch: I've fixed most of the issues I was having with steam and other weird applications btw |
08:48:48 | PMunch | Prestige, oh cool! |
08:48:58 | PMunch | What was the issue Steam was giving you? |
08:49:11 | PMunch | Or rather, what was the fix, I know the issues.. |
08:49:51 | Prestige | Sometimes it would just resize itself for no reason, I ended up figuring out how to better handle configurerequest events |
08:50:52 | Prestige | What issue were you having? |
08:56:13 | haxscramper | So `ObservableStores` triggers when I have an expression which can raise an exception _and_ I'm assigning value of the expression to variable? In this example: https://play.nim-lang.org/#ix=2pzv it triggers for `r1` but not for `r2` - because second one is annotated with `{.raises: [].}`. Is this correct or I'm missing something? |
08:58:01 | haxscramper | And why it is called either `NVRO` or `NRVO` in the RFC? There are differences between these two or it's just a typo? |
09:00:19 | Araq | typo |
09:00:41 | Araq | .raises: [] is only affecting the analysis when you use --panics:on |
09:03:05 | PMunch | Prestige, all sorts of stuff |
09:03:20 | PMunch | Windows being blocked by other windows that have disappeared and such. |
09:04:52 | Prestige | hmm |
09:05:34 | Prestige | I don't use many applications other than a terminal or a browser so I haven't had much to test |
09:06:32 | PMunch | Haha, ditto |
09:06:57 | PMunch | Well, terminal, browser, and HexChat |
09:07:42 | Prestige | If you get the chance to try it out let me know what you think - trying to polish a few things before I add more features |
09:09:05 | * | Trustable quit (Remote host closed the connection) |
09:10:43 | * | Trustable joined #nim |
09:15:17 | narimiran | youtube playlist for NimConf 2020, happening tommorrow (26 hours from now): https://www.youtube.com/playlist?list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx |
09:15:25 | narimiran | you can already click on 'set reminder' for the videos you would like to be notified before they air |
09:23:45 | PMunch | Hype! |
09:25:03 | FromDiscord | <Technisha Circuit> Is there any other JSON modules that isn't packedjson or the stdlib json? |
09:25:18 | FromDiscord | <Technisha Circuit> Just curious |
09:25:22 | FromDiscord | <Rika> status' json serialize? |
09:25:23 | FromDiscord | <Technisha Circuit> Before anyone asks why |
09:25:28 | FromDiscord | <Rika> or whatever the name was |
09:25:32 | FromDiscord | <Technisha Circuit> Oh? |
09:25:37 | * | oddp joined #nim |
09:26:01 | FromDiscord | <Technisha Circuit> https://github.com/status-im/nim-json-serialization↵this one? |
09:26:01 | Araq | there is always regex-json which uses regexes to parse json |
09:26:12 | FromDiscord | <Technisha Circuit> Oh god |
09:26:20 | FromDiscord | <Technisha Circuit> Wouldn't that be slower? |
09:26:21 | Araq | (I'm kidding) |
09:26:22 | FromDiscord | <Technisha Circuit> Like |
09:26:25 | FromDiscord | <Technisha Circuit> Way slower |
09:26:26 | FromDiscord | <Technisha Circuit> Oh |
09:26:34 | FromDiscord | <Technisha Circuit> Maybe i should make it a thing.... |
09:26:54 | Araq | here is what the world needs: |
09:26:55 | FromDiscord | <Rika> :thonk: what's bad about packedjson? |
09:27:06 | FromDiscord | <mratsim> it's not in the stdlib? |
09:27:10 | Araq | a regex based parser for json that transforms json into xml |
09:27:23 | FromDiscord | <mratsim> I'm sure someone wrote that in Java |
09:27:57 | Araq | because then you can use xpath to transform it into something else. and you can spend time on important questions such as "is whitespace part of the xml tree?" |
09:28:11 | FromDiscord | <Rika> lmao |
09:28:18 | FromDiscord | <Technisha Circuit> I'm just curious :P |
09:28:45 | * | haxscramper quit (Ping timeout: 258 seconds) |
09:29:00 | Araq | and also "how come I use a format for semi-structured data for my database table dumps?" |
09:29:37 | FromDiscord | <mratsim> why dump, it should be your database |
09:30:12 | Araq | because the world hates databases, we should grep on fragile text files instead |
09:30:42 | Araq | and be concerned with floating point parsing roundtrip problems, escape sequences and quoting hell |
09:34:13 | * | kenran quit (Ping timeout: 246 seconds) |
09:42:48 | * | tane joined #nim |
09:47:43 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
09:47:49 | * | njoseph joined #nim |
09:48:06 | Araq | muhaha I wrote functizer.nim |
09:58:43 | * | brainbomb joined #nim |
09:58:46 | * | krux02 joined #nim |
10:00:12 | * | endragor quit (Remote host closed the connection) |
10:00:39 | * | endragor joined #nim |
10:06:32 | * | endragor quit (Ping timeout: 256 seconds) |
10:16:08 | Zevv | which does what exactly |
10:19:18 | * | endragor joined #nim |
10:24:26 | * | Trustable quit (Remote host closed the connection) |
10:25:30 | * | Trustable joined #nim |
10:26:30 | FromDiscord | <spook> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/723483836972924949 |
10:26:56 | FromDiscord | <spook> (edit) 'http://ix.io/2pzJ' => 'http://ix.io/2pzI' |
10:27:46 | * | bacterio quit (Ping timeout: 246 seconds) |
10:27:58 | FromDiscord | <Recruit_main707> what are you returning? |
10:28:14 | FromDiscord | <spook> I was going to return wins |
10:28:34 | FromDiscord | <Recruit_main707> that seq needs would need to be seq[aType], or int in your case |
10:29:43 | FromDiscord | <spook> sent a code paste, see http://ix.io/2pzM |
10:29:57 | FromDiscord | <Rika> what is `wins+`? |
10:30:02 | Zevv | Araq: you made up a word. 0 hits on the googles for "functizer" |
10:30:05 | FromDiscord | <spook> it's a counter |
10:30:08 | FromDiscord | <Rika> thats invalid nim |
10:30:09 | FromDiscord | <Rika> no |
10:30:12 | FromDiscord | <Rika> the + part |
10:30:17 | FromDiscord | <Rika> what does `wins+` do? |
10:30:21 | FromDiscord | <Rika> do you mean `inc wins` |
10:30:30 | FromDiscord | <spook> increase wins by 1 |
10:30:32 | FromDiscord | <Rika> yeah |
10:30:36 | FromDiscord | <Rika> its not wins+ then |
10:30:40 | FromDiscord | <Rika> its `inc wins` |
10:31:22 | * | bacterio joined #nim |
10:32:04 | FromDiscord | <Vindaar> I get 2 hits for functizer. But pretty weird to type something resembling a word with only 9 characters into google and getting barely any results |
10:32:39 | FromDiscord | <Rika> @spook did that solve your problem? |
10:33:19 | FromDiscord | <spook> yes, just had to import systems ^.^ |
10:33:20 | FromDiscord | <spook> ty |
10:33:36 | FromDiscord | <Rika> huh? you dont need to import system @spook |
10:35:02 | FromDiscord | <spook> oh I didn't |
10:35:11 | FromDiscord | <InventorMatt> Is there a way to make a string type that only allows certain characters? |
10:35:32 | FromDiscord | <Rika> like what characters |
10:36:03 | FromDiscord | <spook> thanks for the help |
10:36:08 | FromDiscord | <Rika> yw |
10:36:47 | FromDiscord | <InventorMatt> Just + - 0 |
10:36:50 | krux02 | InventorMatt: well you can make a distinct string and modify the `add` proc to check on the appended charactor. |
10:37:11 | FromDiscord | <Rika> does & use add? |
10:37:21 | krux02 | no |
10:37:25 | krux02 | I don't think so |
10:37:34 | * | nsf quit (Quit: WeeChat 2.8) |
10:38:02 | FromDiscord | <InventorMatt> I was thinking about that but couldn't someone convert a string into that distinct type anyways? |
10:38:17 | krux02 | but if you append two strings with the correct characters, it should be ok. |
10:39:12 | FromDiscord | <Rika> @InventorMatt people can always cast it too if its a separate type |
10:39:32 | krux02 | I personally would prefer to just implement a check that ensures that the right characters are used. And call this check at strategic points in your application. |
10:40:34 | krux02 | The reason for that is, tacking on `add` and distinct string works pretty well for this specific problem. |
10:40:57 | krux02 | But for more complex constraints on strings, it doesn't work anymore that easy. |
10:41:28 | FromDiscord | <InventorMatt> I am trying to make a proc that converts a string of balanced ternary back into an integer. So I want to make sure that it'll use the correct values so compile time errors can occur |
10:41:36 | FromDiscord | <ikrima> is there a way to specify a constraint on a variant type in nim? |
10:42:28 | FromDiscord | <ikrima> I've tried various formulations with the typeclass syntax but can't manage |
10:42:36 | FromDiscord | <Rika> if it's just 3 elements then maybe do a seq[enum], matt |
10:42:50 | FromDiscord | <Rika> ikrima what constraint we talkin bout? |
10:43:00 | krux02 | InventorMatt, well you can use seq['0'..'2'] |
10:44:02 | FromDiscord | <ikrima> @Rika i have an ast node object variant. for some nodes, i want to constrain what type of children they may have |
10:45:17 | FromDiscord | <Rika> i dont think thats possible |
10:45:48 | FromDiscord | <ikrima> 👍 good to know |
10:47:32 | * | neceve_ joined #nim |
11:04:01 | FromDiscord | <Cut a weeb and a pedo bleeds> dear nimfriends, can you switch `backend` in the .nimble file based on the filename? |
11:07:11 | * | dddddd joined #nim |
11:08:08 | FromDiscord | <Vindaar> ^person: you realize that there's probably plenty of people you'd probably consider a "weeb" in this very room, right? just saying... |
11:09:16 | FromDiscord | <😬🤣> fixed |
11:14:23 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
11:17:36 | alehander92_ | i really want to ban you for this username |
11:17:58 | alehander92_ | :P |
11:18:35 | alehander92_ | otherwise why in nimble and not in nims? |
11:26:04 | * | waleee-cl joined #nim |
11:35:39 | FromDiscord | <😬🤣> @alehander92_ because I didn't know I can just `setCommand "js"` and nimble will behave 😬 |
11:40:01 | alehander92_ | ahh i dont think ive used that stufvf |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:34 | * | supakeen joined #nim |
12:08:05 | FromDiscord | <Recruit_main707> msgpack is nuts, but also very wonky :/ |
12:08:07 | * | vsantana joined #nim |
12:29:47 | * | Kaivo quit (Quit: WeeChat 2.8) |
12:30:45 | FromDiscord | <Recruit_main707> is there a compact function that does the same as strutils.toHex(), without making the output twice as long as the input?? |
12:31:06 | PMunch | What? |
12:31:18 | PMunch | You know that's how hex works right? |
12:32:29 | FromDiscord | <Recruit_main707> bruh, lapsus there, but, you know leaving aside that dumb question, something that can convert a binary string into a format that doesnt make it larger? |
12:33:56 | FromDiscord | <Rika> what |
12:34:06 | PMunch | var x = z |
12:34:08 | PMunch | There you go |
12:34:11 | FromDiscord | <Rika> lol |
12:34:24 | FromDiscord | <Rika> binary strings are as small as they can be, unless you mean compression |
12:35:08 | FromDiscord | <Recruit_main707> binary strings dont work well when interoping |
12:35:15 | * | brainbomb1 joined #nim |
12:35:19 | FromDiscord | <Rika> why |
12:35:31 | PMunch | Recruit_main707, depends on what you're interoping with.. |
12:36:14 | FromDiscord | <Recruit_main707> python, maybe im doing something wrong, but i guess the issue is that there are null characters as data, and that makes it think the string ends there |
12:36:51 | FromDiscord | <Recruit_main707> i have an idea that could work though... |
12:37:48 | PMunch | That's probably easier to handle on the Python side.. |
12:38:07 | * | brainbomb quit (Ping timeout: 258 seconds) |
12:38:15 | PMunch | https://docs.python.org/3/library/struct.html |
12:40:34 | * | lritter joined #nim |
12:43:30 | * | kenran joined #nim |
12:53:39 | FromDiscord | <Shucks> ssshh |
12:54:22 | FromDiscord | <Shucks> disruptek might be here |
12:55:48 | PMunch | Huh? |
12:56:05 | PMunch | Hot tip, when you want to avoid someone, don't ping them :P |
12:56:51 | FromDiscord | <Shucks> Oh, nice idea |
13:00:46 | * | leorize quit (Remote host closed the connection) |
13:01:15 | * | leorize joined #nim |
13:01:51 | FromDiscord | <Rika> tfw irc |
13:03:11 | Araq | Zevv, it's a litte tool I wrote that turns 'proc' into 'func' |
13:03:25 | Araq | in preparation for https://github.com/nim-lang/RFCs/issues/234 |
13:06:00 | FromDiscord | <willyboar> maybe we need a hackernews post for the conf |
13:06:13 | FromDiscord | <dom96> yes, join #nimconf |
13:06:16 | FromDiscord | <dom96> we should decide on a title |
13:21:55 | FromDiscord | <willyboar> https://news.ycombinator.com/item?id=23573938 vote please |
13:23:30 | FromDiscord | <dom96> Please don't ask for upvotes on HN |
13:23:39 | FromDiscord | <dom96> they have algorithms that detect voting rings... |
13:23:53 | FromDiscord | <dom96> you'll end up having that post demoted |
13:24:08 | FromDiscord | <djazz> Yeah, asking for votes is against rules |
13:24:21 | FromDiscord | <djazz> And i wont create an account just to vote heh |
13:26:07 | FromDiscord | <willyboar> (edit) removed ' vote please' |
13:32:50 | FromDiscord | <lqdev> the stdlib has Options but it doesn't have Results? |
13:33:19 | FromDiscord | <Rika> yes |
13:34:35 | FromDiscord | <dom96> if you want to boost something, then RT this: https://twitter.com/nim_lang/status/1273972374694768645 🙂 |
13:36:29 | planetis[m] | i cant change the url |
13:36:47 | FromDiscord | <djazz> Imo, change the name of the Nim twitter to Nim programming language, ”Nim language” sounds odd |
13:37:29 | Araq | it's also a language for human beings |
13:37:33 | planetis[m] | i posted this yesterday: https://news.ycombinator.com/item?id=23564668 |
13:37:51 | marnix | Araq +1 :-) |
13:39:03 | FromDiscord | <djazz> Hehe |
13:39:21 | FromDiscord | <djazz> Fair |
13:39:22 | FromDiscord | <willyboar> planetis hackathon will not take a place 😦 |
13:39:47 | FromDiscord | <willyboar> next year maybe |
13:39:52 | planetis[m] | :( |
13:44:14 | * | marnix quit (Ping timeout: 240 seconds) |
13:50:50 | * | marnix joined #nim |
13:57:46 | * | leorize_ joined #nim |
13:58:03 | * | leorize quit (Ping timeout: 240 seconds) |
14:09:54 | * | PMunch quit (Quit: leaving) |
14:15:59 | FromDiscord | <Recruit_main707> setting openArray[byte] as the return type of a function throws me errors, i thought it was possible, wasnt it? |
14:16:34 | Araq | nope, requires our borrowing RFC |
14:20:50 | * | clemens3 joined #nim |
14:23:15 | * | ftsf joined #nim |
14:26:44 | FromDiscord | <Technisha Circuit> Anyone know of a cli text editor with a liveshare-like feature? |
14:27:50 | Araq | Lynx |
14:28:47 | FromDiscord | <Technisha Circuit> Thanks |
14:29:18 | * | disruptek quit (Quit: bye) |
14:30:41 | FromDiscord | <Zed> simple dumb question |
14:31:10 | FromDiscord | <Zed> wait never mind |
14:35:44 | FromDiscord | <Shucks> Does defer gets called on a uncaught exception? |
14:38:44 | FromDiscord | <Rika> afaik yes |
14:40:33 | * | disruptek joined #nim |
14:42:22 | * | silvernode joined #nim |
14:43:12 | * | silvernode quit (Client Quit) |
14:48:36 | * | disruptek quit (Quit: bye) |
14:50:11 | * | kenran quit (Quit: leaving) |
14:53:25 | * | disruptek joined #nim |
14:55:58 | * | disruptek quit (Client Quit) |
14:57:40 | FromDiscord | <lqdev> it does |
14:58:27 | * | disb0t joined #nim |
14:58:59 | * | disruptek joined #nim |
15:00:15 | * | disbot quit (Quit: Bye) |
15:00:15 | * | disb0t is now known as disbot |
15:02:46 | * | Vladar joined #nim |
15:03:58 | * | haxscramper joined #nim |
15:08:46 | haxscramper | Unless I wrap my macro call in `block` I'm getting `indentation error` - what can cause this? I compared generated AST to expected AST - they are identical. If I add `block` error disappears. Writing the same code manually does not give any errors. Code example with all tested cases - https://play.nim-lang.org/#ix=2pB4 |
15:10:22 | * | marnix quit (Ping timeout: 260 seconds) |
15:15:46 | * | marnix joined #nim |
15:18:04 | FromDiscord | <Jasper> Variadic branch macros can't be used as expressions. Also your thing will not work in generics/templates currently. |
15:24:06 | * | marnix quit (Ping timeout: 258 seconds) |
15:24:54 | * | bung quit (Ping timeout: 240 seconds) |
15:26:01 | * | vicfred joined #nim |
15:32:08 | * | haxscramper quit (*.net *.split) |
15:32:09 | * | vsantana quit (*.net *.split) |
15:32:09 | * | bacterio quit (*.net *.split) |
15:32:09 | * | narimiran quit (*.net *.split) |
15:32:09 | * | Jjp137 quit (*.net *.split) |
15:32:17 | * | Amun_Ra quit (*.net *.split) |
15:32:17 | * | unclechu quit (*.net *.split) |
15:32:17 | * | sepples quit (*.net *.split) |
15:32:17 | * | leorize_ quit (*.net *.split) |
15:32:17 | * | opal quit (*.net *.split) |
15:32:17 | * | BitPuffin quit (*.net *.split) |
15:32:17 | * | k0mpjut0r quit (*.net *.split) |
15:32:17 | * | khanate[m]0 quit (*.net *.split) |
15:32:17 | * | salotz[m] quit (*.net *.split) |
15:32:17 | * | watzon quit (*.net *.split) |
15:32:17 | * | koltrast_ quit (*.net *.split) |
15:32:27 | * | haxscramper joined #nim |
15:32:27 | * | leorize_ joined #nim |
15:32:27 | * | vsantana joined #nim |
15:32:27 | * | bacterio joined #nim |
15:32:27 | * | narimiran joined #nim |
15:32:27 | * | Jjp137 joined #nim |
15:32:27 | * | Amun_Ra joined #nim |
15:32:27 | * | opal joined #nim |
15:32:27 | * | BitPuffin joined #nim |
15:32:27 | * | k0mpjut0r joined #nim |
15:32:27 | * | khanate[m]0 joined #nim |
15:32:27 | * | salotz[m] joined #nim |
15:32:27 | * | watzon joined #nim |
15:32:27 | * | sepples joined #nim |
15:32:27 | * | koltrast_ joined #nim |
15:33:29 | * | opal quit (Max SendQ exceeded) |
15:34:52 | * | opal joined #nim |
15:35:48 | * | sendell quit (Ping timeout: 240 seconds) |
15:35:51 | * | BitPuffin quit (Ping timeout: 244 seconds) |
15:35:52 | * | k0mpjut0r quit (Ping timeout: 244 seconds) |
15:35:52 | * | khanate[m]0 quit (Ping timeout: 244 seconds) |
15:36:07 | * | planetis[m] quit (Ping timeout: 240 seconds) |
15:36:16 | * | skrylar[m] quit (Ping timeout: 244 seconds) |
15:36:17 | * | codic quit (Ping timeout: 244 seconds) |
15:36:18 | * | bolti[m] quit (Ping timeout: 260 seconds) |
15:36:18 | * | neceve quit (Ping timeout: 260 seconds) |
15:36:22 | * | salotz[m] quit (Ping timeout: 244 seconds) |
15:36:22 | * | watzon quit (Ping timeout: 244 seconds) |
15:36:49 | * | ftsf quit (Ping timeout: 246 seconds) |
15:38:20 | * | oneark quit (Ping timeout: 244 seconds) |
15:38:51 | * | dzamo[m]1 quit (Ping timeout: 246 seconds) |
15:40:06 | * | theelous3 joined #nim |
15:45:37 | Zevv | Is there some way we can put up a post for nimconf on HN and make sure it ranks high for a few hours? |
15:46:40 | Zevv | it's not fair play, but with a bit of effort from people here on irc we might be able to move it up by having a lot of comments in |
15:46:49 | * | bung joined #nim |
15:48:57 | FromDiscord | <Rika> Doubt |
16:02:20 | * | disruptek quit (Read error: Connection reset by peer) |
16:02:20 | * | disbot quit (Read error: Connection reset by peer) |
16:04:57 | * | disruptek joined #nim |
16:07:04 | * | disbot joined #nim |
16:08:03 | FromDiscord | <djazz> I’m reading the Nim in Action book by @dom96 to prepare for the conf 😄 |
16:09:18 | * | nsf joined #nim |
16:16:57 | FromDiscord | <Clyybber> Zevv: Theres this one https://news.ycombinator.com/item?id=23573938 |
16:22:01 | * | noonien quit (Quit: Connection closed for inactivity) |
16:24:23 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
16:33:47 | * | Senny joined #nim |
16:35:21 | disruptek | !mem |
16:35:22 | disbot | total: 24383488; free: 6762496; owned: 15762576; max: 24383488 |
16:38:16 | * | Senny quit (Ping timeout: 244 seconds) |
16:44:35 | * | Yardanico left #nim ("https://quassel-irc.org - Chat comfortably. Anywhere.") |
16:44:36 | * | Yardanico joined #nim |
16:51:05 | Yardanico | wait I completely forgot, where's the full-yellow nim logo version? |
16:51:31 | Yardanico | it's not in https://github.com/nim-lang/assets but I used it before (e.g. created an emote on nim discord), but I forgot where I took it from |
16:51:47 | alehander92_ | lets play fair |
16:51:51 | alehander92_ | otherwise cool stuff |
16:53:13 | * | Trustable quit (Remote host closed the connection) |
16:59:17 | * | ChanServ quit (shutting down) |
17:01:35 | FromDiscord | <Shucks> nimpretty acts pretty unpretty |
17:04:10 | Yardanico | ah found it https://nim-lang.org/assets/img/logo.svg |
17:05:05 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
17:05:40 | * | pbb joined #nim |
17:11:41 | * | Demos[m] joined #nim |
17:14:48 | * | NimBot joined #nim |
17:20:39 | * | haxscramper quit (Remote host closed the connection) |
17:45:50 | * | nsf quit (Quit: WeeChat 2.8) |
17:46:27 | * | codic joined #nim |
17:46:27 | * | unclechu joined #nim |
17:46:27 | * | khanate[m]0 joined #nim |
17:46:27 | * | k0mpjut0r joined #nim |
17:46:27 | * | dzamo[m] joined #nim |
17:46:27 | * | BitPuffin joined #nim |
17:46:27 | * | planetis[m] joined #nim |
17:46:27 | * | nerdrat[m] joined #nim |
17:46:27 | * | sendell joined #nim |
17:46:27 | * | neceve joined #nim |
17:46:27 | * | bolti[m] joined #nim |
17:46:27 | * | salotz[m] joined #nim |
17:46:27 | * | oneark joined #nim |
17:46:27 | * | watzon joined #nim |
17:46:27 | * | GitterIntegratio joined #nim |
17:46:33 | * | skrylar[m] joined #nim |
17:59:43 | FromDiscord | <dakyskye> Hey. I `startProcess` with `poEvalCommand` option, but killing that process turns it into a zombie |
17:59:50 | FromDiscord | <dakyskye> Is there any way to kind of disown it? |
18:00:59 | Araq | poEvalCommand is a security risk, please try to avoid it |
18:01:33 | FromDiscord | <dakyskye> But otherwise it does not seem to start any of my process |
18:01:37 | FromDiscord | <dakyskye> Let me try again, just to make sure, |
18:06:47 | FromDiscord | <Recruit_main707> ```nim↵stdout.writeLine((result[8..^1]).cstring == ppacket)↵stdout.writeLine($(result.cstring) == ppacket) |
18:07:33 | FromDiscord | <Recruit_main707> whoops |
18:11:57 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=2pBE↵cleaned that comment above, why does this happen, i presume the string contains null characters, but how can i avoid this happening? |
18:12:34 | Yardanico | convert it to seq[byte] instead of string? |
18:12:36 | Yardanico | or seq[char] |
18:12:48 | FromDiscord | <Recruit_main707> but interoping... |
18:13:04 | Yardanico | ? |
18:13:44 | Yardanico | both c and nim strings are null-terminated |
18:14:00 | FromDiscord | <Recruit_main707> i need to return `result.cstring` essentially, but as you see, it doesnt work when converting it back to a nim string |
18:15:27 | Yardanico | well if you have stuff after a null character it's not gonna be there anymore :P |
18:16:27 | FromDiscord | <Recruit_main707> maybe returning an array of bytes then? |
18:16:39 | Yardanico | what are you returning to? |
18:16:41 | Yardanico | to C? to python? |
18:17:01 | FromDiscord | <Recruit_main707> its the same basically |
18:17:14 | * | bung quit (Ping timeout: 240 seconds) |
18:18:25 | * | chemist69 quit (Remote host closed the connection) |
18:18:48 | * | chemist69 joined #nim |
18:26:38 | * | casaca joined #nim |
18:26:39 | * | casaca quit (Excess Flood) |
18:28:26 | * | bung joined #nim |
18:30:44 | * | vicfred_ joined #nim |
18:32:52 | * | bung quit (Ping timeout: 246 seconds) |
18:33:12 | FromDiscord | <codic> I'm trying to get every *n*th element of a seq in nim, like for example, in python i could do `thing[::-n]`. is there an equivalent for nim? |
18:33:13 | * | vicfred quit (Ping timeout: 246 seconds) |
18:33:42 | Yardanico | small for loop will do |
18:37:06 | * | Supersphere1 joined #nim |
18:39:04 | FromDiscord | <mratsim> minus? |
18:39:19 | Yardanico | @mratsim well yeah python has that |
18:39:25 | Yardanico | python slices have start/stop/step |
18:39:32 | Yardanico | - is reversed |
18:39:32 | * | Supersphere1 quit (Killed (Sigyn (Stay safe off irc))) |
18:39:42 | FromDiscord | <mratsim> but minus is for reverse iteration |
18:39:45 | * | leorize_ is now known as leorize |
18:39:50 | FromDiscord | <mratsim> yes |
18:39:55 | Yardanico | well yes, but it's still a for loop in the end:P |
18:39:57 | Yardanico | with countdown |
18:41:12 | FromDiscord | <mratsim> you can filter with i mod n == 0 as well |
18:41:29 | FromDiscord | <codic> so can you give an example? |
18:41:44 | leorize | @codic basically: for i in countup(low(thing), high(thing), n) |
18:42:48 | Yardanico | @codic https://play.nim-lang.org/#ix=2pBQ |
18:43:24 | Yardanico | you can create a small iterator and a procedure for this of course |
18:44:09 | leorize | not sure if something like this already exists in narimiran itertools |
18:44:15 | leorize | !repo itertools |
18:44:15 | disbot | https://github.com/narimiran/itertools -- 9itertools: 11Nim rewrite of a very popular Python module of the same name. 15 61⭐ 5🍴 |
18:44:35 | FromDiscord | <codic> ah, thanks |
18:44:38 | Yardanico | yeah, islice |
18:44:41 | Yardanico | from itertools |
18:44:52 | Yardanico | ah wait it's not reversed hmm |
18:52:16 | FromDiscord | <codic> wait wait wait |
18:52:25 | Yardanico | ? |
18:52:49 | FromDiscord | <codic> nvm |
18:52:53 | Yardanico | lol |
18:53:01 | Araq | omg 16 hours left |
18:53:06 | * | Araq is excited |
18:53:09 | Yardanico | me2 :P |
18:53:20 | FromDiscord | <codic> i'm trying to port `def palindrome1(text): return text==text[::-1]`, lemme see↵NimConf? |
18:53:34 | Yardanico | @codic you don't need a loop for that |
18:53:43 | Yardanico | https://nim-lang.org/docs/algorithm.html#reversed%2CopenArray%5BT%5D%2CNatural%2Cint |
18:53:53 | leorize | that's inefficient as hell... |
18:53:54 | FromDiscord | <codic> ah |
18:53:59 | Yardanico | leorize: yes that's true :P |
18:54:17 | FromDiscord | <codic> so i can do what? `return text.reversed == text`? |
18:54:36 | Yardanico | yes |
18:54:37 | leorize | yea, but use the result variable please |
18:54:42 | FromDiscord | <codic> yeah of course |
18:55:54 | * | nsf joined #nim |
18:59:29 | Araq | unicode.reverse ? |
19:00:31 | FromDiscord | <codic> i used algorithm.reversed |
19:00:51 | Araq | you cannot reverse unicode via 'algorithm' |
19:00:57 | FromDiscord | <Yardanico> ah right it won't work for utf-8 strings |
19:01:12 | Araq | Python's won't work either btw |
19:01:24 | Araq | unicode is -er- special |
19:04:06 | * | waleee-cl joined #nim |
19:06:08 | * | casaca joined #nim |
19:06:28 | FromDiscord | <Yardanico> Actually seems like it would work in Python 3 |
19:06:55 | * | bung joined #nim |
19:10:04 | FromDiscord | <codic> ah |
19:10:18 | FromDiscord | <codic> quick question btw, where is nimbase.h located on a choosenim installation? |
19:11:19 | * | bung quit (Ping timeout: 260 seconds) |
19:11:50 | Araq | Yardanico: it cannot because of "combining characters" |
19:12:04 | FromDiscord | <Yardanico> Ohhh |
19:12:04 | Araq | unicode is really hard and utf-32 doesn't help |
19:13:18 | shashlick | codic: ~/.choosenim/toolchains/nim-xxx/lib |
19:14:34 | FromDiscord | <codic> ah |
19:15:05 | * | bung joined #nim |
19:19:34 | * | bung quit (Ping timeout: 260 seconds) |
19:22:43 | * | bung joined #nim |
19:28:34 | * | bung quit (Ping timeout: 240 seconds) |
19:29:45 | * | bung joined #nim |
19:31:08 | FromDiscord | <mratsim> Oh, our collegues just demo-ed a Nim desktop app: https://drive.google.com/file/d/1zrYkkwHGg3TvORSR3qT6jQJ2qYbgBkk1/view↵It's only been a month since they started writing Nim (unedited video) |
19:33:25 | supakeen | mratsim: That looks cool! |
19:33:47 | FromDiscord | <slymilano> looks cool, is that a native mac app written in Nim or some kind of electron hybrid? |
19:34:00 | Yardanico | it's QML iirc |
19:34:14 | Yardanico | isn't it https://github.com/status-im/nim-status-client ? |
19:34:20 | * | bung quit (Ping timeout: 256 seconds) |
19:35:36 | FromDiscord | <slymilano> I've never worked with QT so this is a native app, right? |
19:35:40 | Yardanico | yes of course |
19:36:51 | * | bung joined #nim |
19:37:15 | FromDiscord | <djazz> That looks good! |
19:37:56 | FromDiscord | <djazz> I have looked at qml, but couldnt exactly figure out how you were supposed to structure your code for it. |
19:38:06 | FromDiscord | <djazz> And style it. |
19:43:14 | * | bung quit (Ping timeout: 258 seconds) |
19:43:15 | FromDiscord | <mratsim> @Yardanico, yes it's nim-status-client |
19:45:44 | * | bung joined #nim |
19:47:39 | FromDiscord | <Recruit_main707> i have a dumb idea, but how feasible is to recreate the nim string structure in python, so that i can return actual nim strings? |
19:47:58 | Yardanico | well the structure itself is easy |
19:48:13 | FromDiscord | <mratsim> if python can print C-string it can print nim-strings |
19:48:32 | FromDiscord | <mratsim> maybe nimporter deals with that |
19:48:46 | Yardanico | nah isn't nimporter just precompiling extensions |
19:48:53 | FromDiscord | <Recruit_main707> > well the structure itself is easy↵where is it? |
19:48:55 | Yardanico | it doesn't add any functionality for the interop itself on top of nimpy |
19:50:24 | FromDiscord | <Recruit_main707> bruh xD https://media.discordapp.net/attachments/371759389889003532/723625747901841460/unknown.png |
19:50:35 | Yardanico | why not use arc :P |
19:51:14 | Yardanico | for arc it's in https://github.com/nim-lang/Nim/blob/devel/lib/system/strs_v2.nim#L12 |
19:51:24 | FromDiscord | <mratsim> @Recruit_main707 Nim strings are easy, it's a pointer to length, reserved: int and buffer: UncheckedArray[char] |
19:51:39 | FromDiscord | <mratsim> and the buffer if allocated is nul-byte terminated like c-strings |
19:51:46 | * | bung quit (Ping timeout: 260 seconds) |
19:52:02 | Araq | actually under arc it's different, but roughly speaking you're correct |
19:52:27 | FromDiscord | <Recruit_main707> ok |
19:59:03 | * | bung joined #nim |
20:00:37 | * | vikfret joined #nim |
20:02:23 | FromGitter | <bung87> slymilano https://github.com/bung87/crowngui |
20:03:04 | FromGitter | <bung87> you can check my version or !repo nimwebgui |
20:03:06 | Yardanico | I'm really excited for https://github.com/treeform/fidget :P |
20:03:12 | Yardanico | there's a talk about it on nimconf too |
20:03:26 | * | bung quit (Ping timeout: 260 seconds) |
20:04:45 | * | Senny joined #nim |
20:06:05 | * | bung joined #nim |
20:06:09 | FromGitter | <bung87> seems has a big picture |
20:10:27 | * | bung quit (Ping timeout: 258 seconds) |
20:11:15 | * | Demos[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
20:13:28 | FromDiscord | <willyboar> fidget and nico |
20:14:57 | * | nerdrat[m] quit (Quit: Idle for 30+ days) |
20:17:48 | * | bung joined #nim |
20:17:48 | * | kungtotte_ quit (Read error: Connection reset by peer) |
20:19:33 | * | kungtotte joined #nim |
20:20:23 | FromGitter | <bung87> havnt seen a cross mobile platform framework in nim |
20:21:06 | leorize | cross platform and mobile don't go well together :P |
20:21:13 | leorize | but yes we do have one iirc |
20:21:25 | FromDiscord | <willyboar> well i played a game made with nico in mobile |
20:21:26 | leorize | !repo wiish |
20:21:28 | disbot | https://github.com/iffy/wiish -- 9wiish: 11Why Is It So Hard (to make a cross-platform app)? 15 40⭐ 2🍴 7& 17 more... |
20:22:06 | leorize | !repo nimx |
20:22:07 | disbot | https://github.com/yglukhov/nimx -- 9nimx: 11GUI library 15 653⭐ 57🍴 7& 2 more... |
20:22:15 | leorize | ^ that should work too I think |
20:22:49 | FromDiscord | <mratsim> did someone ever manage to compile the falcon game |
20:24:15 | * | bung quit (Ping timeout: 258 seconds) |
20:24:27 | Yardanico | i didn't try :P |
20:25:35 | FromGitter | <bung87> oh thanks , someone really have such big goal |
20:30:59 | * | bung joined #nim |
20:32:52 | Yardanico | what would be a good way to add timeout for threads (I'm calling into a .so library, the main call is blocking so the thread will block, and if that call doesn't complete the thread will just block forever) ? |
20:33:16 | Yardanico | somehow store time since thread started and in one "observer" thread kill other bad threads? |
20:33:26 | FromDiscord | <willyboar> Yardanico where is your talk? 😛 |
20:33:33 | FromDiscord | <mratsim> you don't timeout threads |
20:33:39 | Yardanico | well I have to :( |
20:33:52 | FromDiscord | <mratsim> spawn on a threadpool dedicated to blocking calls |
20:34:17 | FromDiscord | <mratsim> otherwise you need to send a sigkill signal from a monitoring thread |
20:35:06 | * | brainbomb1 quit (Quit: Leaving.) |
20:35:10 | FromDiscord | <mratsim> I suggest you don't use time as a source of truth either but something that is more core to your application, like the number of event loop you did for example |
20:35:20 | FromDiscord | <mratsim> time is a bit "non-deterministic" |
20:35:28 | FromDiscord | <mratsim> and non-portable |
20:35:50 | Yardanico | well that lib is only available for windows and linux anyway :D |
20:36:08 | leorize | well if you want to timeout you can use thread cancellation |
20:36:15 | leorize | not that I recommend it |
20:36:37 | leorize | usually if you need to kill a thread you're doing it wrong |
20:37:07 | Yardanico | it's for scanning routers (yes, i'm only doing it for education, there's an original windows tool which this lib was created for), and this lib also has a linux version |
20:37:17 | Yardanico | and the lib itself doesn't check IP addresses or doesn't have timeouts for network requests |
20:37:26 | Yardanico | so if I pass it a non-working IP it'll just stall forever for this thread |
20:37:43 | Yardanico | and it's closed source of course |
20:38:25 | leorize | maybe you'll need a different entry point |
20:38:38 | Yardanico | the scanning itself os done by 3 calls to the lib |
20:38:44 | leorize | or you can just use thread cancellation, it works great for thir stuff |
20:38:47 | leorize | this* |
20:38:55 | Yardanico | PrepareRouter which "prepares" the object internally, ScanRouter which does the scanning, FreeRouter to actually free the object |
20:39:02 | Yardanico | there's also StopRouter |
20:39:06 | Yardanico | so I don't actually need thread cancellation sorry |
20:39:09 | Yardanico | I can use StopRouter |
20:39:15 | Yardanico | just need to be careful to not mess things up |
20:39:56 | Yardanico | funny fact is that the lib itself is written in Delphi Pascal :P |
20:40:23 | leorize | with a C API? |
20:40:28 | FromDiscord | <Recruit_main707> whats an UncheckedArray[T] traduced to in C? |
20:40:32 | leorize | well that's rarely seen :P |
20:40:38 | Yardanico | leorize: yeah, it exposes a relatively small "C API" |
20:40:46 | Yardanico | with quotes because it's kinda win32-api inspired |
20:40:54 | Yardanico | and uses utf16 internally too (I'm really thankful we have WideCString) |
20:41:12 | leorize | @Recruit_main707 uncheckedArray[T] => T[] in C |
20:41:36 | FromDiscord | <Recruit_main707> thx |
20:42:24 | leorize | Yardanico: eh, win32-api inspired and don't have Ex calls to hook on? :P |
20:42:59 | Yardanico | if you're curious that's the entire API described in delphi, although there are docs to make more sense of it ofc https://gist.github.com/Yardanico/2ef0cd330814a600086b528bc4faa789 |
20:43:03 | FromGitter | <matrixbot> `Zoom` Hey guys, do you know if the author of NiGui (trustable-code) appears here? |
20:43:08 | Yardanico | they do |
20:43:10 | Yardanico | !seen trustable-code |
20:43:11 | disbot | trustable-code never seen. |
20:43:14 | Yardanico | !seen trustable |
20:43:15 | disbot | Trustable quit 73 hours ago and last spoke 14 weeks ago |
20:43:27 | Yardanico | you might also open an issue in the repo |
20:43:43 | leorize | @Zoom join us here on IRC @ #freenode_#nim:matrix.org |
20:44:02 | Yardanico | the (roughly) same file in nim is https://gist.github.com/Yardanico/11709df8a3681ac891ac18e750439d66 |
20:44:06 | leorize | how come everyone keeps getting in via the gitter portal... |
20:44:07 | FromGitter | <matrixbot> `Zoom` I've looked up the name already |
20:45:12 | * | Zoom[m] joined #nim |
20:45:51 | FromGitter | <matrixbot> `Zoom` Oh, thanks. That's what I found in Matrix search |
20:46:16 | leorize | someone probably linked the gitter room there then |
20:46:25 | leorize | which is kinda weird given how you must be the admin to do so |
20:47:23 | leorize | Yardanico: eh, looks like it's not really pascal code |
20:47:32 | leorize | just a header |
20:47:40 | Yardanico | well the lib itself is 100% in delphi :) |
20:47:40 | Zoom[m] | Actually, Gitter room shows more users in Matrix and has more avatars :P |
20:48:24 | Yardanico | e.g. from the "strings liblibrouter.so" |
20:48:25 | Yardanico | "TDelphiReader.ReadString: WideString and UTF8String are not implemented yet" |
20:48:33 | Yardanico | "TTiffImage - Lazarus LCL: 1.6.4.0 - FPC: 3.0.2" |
20:49:02 | leorize | it's generous for them to even give you a header then :P |
20:49:16 | Yardanico | well yeah, they also give some docs for the API |
20:49:19 | leorize | usually they would throw you .ppu (pascal unit) file which are compiled headers |
20:49:22 | Yardanico | lol |
20:50:29 | leorize | I guess they don't want to leak implementation details so they resorted to a super simple C API |
20:50:36 | Yardanico | yeah |
20:51:05 | Yardanico | because the lib itself has tons of exploits/backdoor creds for different routers |
20:51:27 | leorize | this is why I'm glad that I use openwrt on my routers :P |
20:51:31 | Yardanico | haha |
20:51:40 | Yardanico | well even Mikrotik had a huge exploit a while ago |
20:52:00 | Yardanico | and that lib has it as wel |
20:53:34 | * | narimiran quit (Ping timeout: 240 seconds) |
20:54:01 | leorize | fwiw pascal bool should be as big as our bool |
20:54:09 | Yardanico | well it doesn't seem so |
20:54:12 | Yardanico | it's actually an int32 |
20:54:21 | Yardanico | the api docs also provide C++ definitions |
20:54:34 | Yardanico | and it's "BOOL Enabled;" |
20:55:05 | leorize | https://freepascal.org/docs-html/current/prog/progsu157.html#x201-2060008.2.3 |
20:55:14 | Yardanico | well idk :P |
20:55:18 | Yardanico | https://i.imgur.com/g60lrAU.png |
20:55:43 | leorize | have you checked what BOOL means? :P |
20:55:50 | Yardanico | yes |
20:55:56 | Yardanico | in win32api it's C's int |
20:56:13 | Yardanico | https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types |
20:56:19 | leorize | they didn't define their own BOOL, right? :P |
20:56:22 | Yardanico | they did |
20:56:26 | Yardanico | " A Boolean variable (should be TRUE or FALSE). |
20:56:26 | Yardanico | This type is declared in WinDef.h as follows: |
20:56:26 | Yardanico | typedef int BOOL;" |
20:56:31 | Yardanico | oh sorry for multiline |
20:56:39 | leorize | I don't mean win32, I mean librouter |
20:56:48 | Yardanico | well I don't know :P |
20:56:50 | Yardanico | I just know that it's 4 bytes |
21:09:43 | shashlick | anyone has windows with nim setup for some tests? |
21:09:58 | * | willyboar joined #nim |
21:13:08 | FromDiscord | <Recruit_main707> is it long? :P |
21:13:37 | FromDiscord | <Recruit_main707> if its copy paste and run i can try, but im lazy and coding rn |
21:14:24 | shashlick | testing nimterop / nimarchive / choosenim |
21:14:39 | FromDiscord | <Recruit_main707> i only have nimterop |
21:14:55 | shashlick | its all branches so will have to clone new stuff |
21:15:37 | shashlick | do you have bash |
21:15:44 | shashlick | git-bash |
21:16:09 | shashlick | need to just run https://github.com/genotrance/travister/blob/master/test.sh |
21:17:15 | FromDiscord | <djazz> nimarchive? |
21:18:03 | shashlick | libarchive wrapper |
21:18:29 | Prestige | |
21:18:37 | Prestige | woops |
21:24:00 | * | vicfred_ quit (Quit: Leaving) |
21:27:49 | * | solitudesf quit (Ping timeout: 264 seconds) |
21:43:53 | * | Vladar quit (Quit: Leaving) |
21:48:52 | * | surma quit (Ping timeout: 246 seconds) |
21:49:08 | * | surma joined #nim |
21:51:13 | * | tdc quit (Ping timeout: 264 seconds) |
21:52:29 | * | letto quit (Quit: Konversation terminated!) |
22:00:50 | * | vikfret quit (Quit: Leaving) |
22:03:30 | * | willyboar quit (Remote host closed the connection) |
22:04:05 | * | willyboar joined #nim |
22:10:28 | * | unknown__ joined #nim |
22:10:40 | * | letto joined #nim |
22:10:46 | * | vsantana quit (Quit: leaving) |
22:46:00 | Yardanico | wait we have a sums module? https://nim-lang.org/docs/sums.html |
22:46:04 | Yardanico | never seen that one lol |
23:03:22 | * | Senny quit (Ping timeout: 260 seconds) |
23:11:34 | Prestige | I'm working with a clib that has a pointer to the start of an array (ptr cint) and I'm wanting to get elements by index. What is the syntax for that? |
23:12:09 | Prestige | do I like, cast to a cint with (val.unsafeAddr + index) ? |
23:15:07 | * | tane quit (Quit: Leaving) |
23:16:08 | * | casaca quit (Remote host closed the connection) |
23:18:14 | Prestige | basically trying to do pointer arithmetic |
23:26:21 | * | nikita` quit (Quit: leaving) |
23:32:51 | * | vicfred joined #nim |
23:34:32 | * | neceve_ quit (Ping timeout: 256 seconds) |
23:39:40 | * | nsf quit (Quit: WeeChat 2.8) |
23:48:14 | FromGitter | <awr1> what would be an easy way to determine if an object type contains a field? |
23:48:17 | FromGitter | <awr1> there's concepts but meh |
23:56:30 | FromDiscord | <Yardanico> @Prestige cast it to UncheckedArray[cint] |
23:56:39 | * | willyboar quit () |
23:56:52 | FromDiscord | <Yardanico> @awr1 well one of the ways is to use "compiles" from system module |
23:57:00 | FromDiscord | <Yardanico> Or write a small macro |
23:57:25 | FromGitter | <awr1> i ended up using a concept |
23:57:45 | FromGitter | <awr1> my concern is kind of over the stability of concepts |
23:59:36 | * | krux02 quit (Remote host closed the connection) |