00:00:46 | FromDiscord_ | <nothing to no one> ah, completely missed it. thanks! |
00:42:10 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
00:42:45 | * | Snircle joined #nim |
00:52:15 | FromDiscord_ | <nothing to no one> is the current working directory thread-local, or global to the program? |
00:53:10 | * | a_b_m quit (Quit: Leaving) |
01:01:48 | * | kapilp joined #nim |
01:03:24 | FromDiscord_ | <nothing to no one> nvm, not using it anymore |
01:16:34 | * | couven92 quit (Read error: Connection reset by peer) |
01:47:42 | * | dddddd quit (Remote host closed the connection) |
01:55:54 | * | rnrwashere quit (Remote host closed the connection) |
02:25:48 | * | banc joined #nim |
03:08:30 | * | rnrwashere joined #nim |
03:09:19 | * | theelous3 quit (Ping timeout: 248 seconds) |
03:16:37 | FromGitter | <Varriount> The CWD is global |
03:17:25 | * | jasper quit (Ping timeout: 256 seconds) |
04:26:34 | * | nsf joined #nim |
04:27:18 | FromGitter | <kaushalmodi> Is anyone familiar with the Python Marshal format? |
04:28:48 | FromGitter | <kaushalmodi> I'm reading up on how to easy parse perforce output and seems like its "-G" switch is the best way, but that outputs data in Python's binary marshal format. Ref: https://nedbatchelder.com/blog/200402/another_cool_thing_about_perforce_python.html |
04:30:00 | FromGitter | <kaushalmodi> This is me doing some night time reading, to plan out how to tackle p4 (perforce)'s -G marshal output in Nim tomorrow |
04:45:23 | FromGitter | <Varriount> @kaushalmodi The Python documentation should have an explanation. |
04:48:01 | FromGitter | <Varriount> Failing that, I would bet on the source code of the marshal module |
04:50:22 | * | leorize quit (Remote host closed the connection) |
04:50:48 | * | leorize joined #nim |
04:58:20 | * | Gaboose joined #nim |
05:01:42 | Gaboose | Hello friends. Newbie here. I'm intrigued by the "Easy C, C++ and Objective C wrapping" feature of nim. Does it mean it can import C++ files and then compile them to a different target language? |
05:01:44 | Gaboose | like javascript? |
05:03:49 | leorize | Gaboose: nope :p |
05:04:16 | leorize | if it's that magical we won't need emscripten |
05:04:51 | Gaboose | i see, ok, misunderstood a little bit :) |
05:05:17 | Gaboose | compilation to several languages is cool though |
05:19:53 | * | kapilp quit (Quit: Connection closed for inactivity) |
05:29:24 | * | vlad1777d joined #nim |
05:37:47 | * | narimiran joined #nim |
05:40:39 | * | solitudesf joined #nim |
06:04:40 | * | pyotr joined #nim |
06:05:30 | pyotr | 😁️ |
06:08:22 | pyotr | Somebody there? Don't know how to use this? |
06:08:48 | pyotr | Some Nim advocate? |
06:09:23 | pyotr | 😴️ I know I know is time to sleep. |
06:12:08 | * | pyotr quit (Quit: pyotr) |
06:14:45 | Zevv | tell me |
06:14:56 | Zevv | or tell the channel, actually |
06:16:22 | * | solitudesf quit (Ping timeout: 272 seconds) |
06:34:46 | * | enthus1ast quit (Ping timeout: 259 seconds) |
06:36:24 | * | PMunch joined #nim |
06:47:51 | * | enthus1ast joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:03:11 | * | rnrwashere quit (Remote host closed the connection) |
07:03:47 | * | rnrwashere joined #nim |
07:04:51 | * | gmpreussner joined #nim |
07:05:34 | * | rokups joined #nim |
07:08:08 | * | rnrwashere quit (Ping timeout: 252 seconds) |
07:08:56 | * | krux02 joined #nim |
07:22:28 | * | neceve joined #nim |
07:23:04 | * | Vladar joined #nim |
07:34:03 | * | noonien quit (Read error: Connection reset by peer) |
07:34:19 | * | dddddd joined #nim |
07:38:23 | * | LyndsySimon quit (Ping timeout: 252 seconds) |
07:39:40 | PMunch | Hmm, I'm looking at the code for DES encryption. It has an encrypt procedure that takes a `var openArray[byte]` to store the result in. The way I use it is to run it three times with a seq[byte].len == 8 and concatenate the three results into a single seq[byte].len == 24. Is there a way to create one seq[byte].len == 24 and pass slices of that sequence to the openArray parameter? |
07:39:41 | * | rokups quit (Ping timeout: 250 seconds) |
07:40:00 | PMunch | Similar to how you would pass a pointer to the middle of an array in C to have it populate only that slice |
07:40:58 | leorize | seq[byte][0..2]? |
07:42:44 | PMunch | Well that would create a copy wouldn't it? |
07:43:08 | * | rokups joined #nim |
07:43:32 | * | LyndsySimon joined #nim |
07:43:42 | * | solitudesf joined #nim |
07:44:18 | Araq | yup |
07:44:24 | PMunch | Yeah: http://ix.io/1JUU/ |
07:45:41 | * | noonien joined #nim |
07:58:02 | PMunch | http://ix.io/1JUW/Nim |
07:58:31 | PMunch | Hmm, tried something that I thought would work (albeit being a bit hacky), but I get strange SIGSEGVs |
08:00:20 | PMunch | With the echos in place it prints an empty line and an h (by the way, would it be good if Nim printed escape characters instead of printing things like 0 as nothing?) |
08:02:18 | * | stefanos82 joined #nim |
08:03:07 | * | dvn quit (Ping timeout: 248 seconds) |
08:06:33 | * | noonien quit (Ping timeout: 250 seconds) |
08:06:42 | * | rnrwashere joined #nim |
08:06:59 | * | LyndsySimon quit (Ping timeout: 250 seconds) |
08:07:33 | PMunch | Hmm, trying to get GCC to add debug symbols for the C code that Nim spits out -ggdb doesn't seem to work |
08:07:33 | * | noonien joined #nim |
08:07:54 | Araq | it's -g |
08:07:54 | PMunch | Compiled the Nim code with -d:release to avoid it adding it's own debugging information |
08:08:01 | PMunch | Tried that as well |
08:08:15 | Araq | --linedir:off --debuginfo |
08:08:25 | Araq | for when you want to debug the C code |
08:08:50 | PMunch | Aha |
08:08:51 | PMunch | Nice |
08:09:03 | * | LyndsySimon joined #nim |
08:09:49 | Araq | also good: GC_disable() and run it through Valgrind |
08:10:28 | PMunch | I just wanted to see what actually SIGSEGVed |
08:10:59 | PMunch | Because with the Nim code debugging enabled it said it occured in code that was before the echo statements that had been executed |
08:11:21 | PMunch | Oh wait.. |
08:11:27 | * | rnrwashere quit (Ping timeout: 264 seconds) |
08:11:32 | PMunch | I'm an idiot.. I call populate twice.. |
08:12:15 | narimiran | even just the second one sigsegv's |
08:12:54 | narimiran | well, the first one was one that printed stuff |
08:13:16 | * | ShalokShalom joined #nim |
08:13:53 | PMunch | Eureka: https://play.nim-lang.org/index.html?ix=1JV4 |
08:14:02 | * | dvn joined #nim |
08:14:35 | PMunch | narimiran, yeah that was the issue. I was seeing the echos from the first `populate` call, which confused me, I think I need more cofffee |
08:14:52 | livcd | PMunch: clicking on playground should redirect you to playground not nim-lang.org |
08:15:27 | PMunch | Hmm, good point. It was originally just the logo |
08:15:58 | narimiran | PMunch: argh, `addr`, you're not the only one who hasn't even noticed it that it is missing ;) |
08:16:33 | PMunch | livcd, In newfrontend it doesn't link to anything: play.nim-lang.org/newfrontend/ |
08:16:57 | PMunch | narimiran, yeah I forgot that array was a pointer for a sec |
08:16:58 | narimiran | link would be nice/expected |
08:17:21 | PMunch | Yeah I'll fix it once I actually deploy the newfrontend |
08:17:44 | PMunch | Which will be once Karax builds on an actual release and not just devel |
08:23:20 | PMunch | Which will be once Karax builds on an actual release and not just devel |
08:23:23 | PMunch | Woops |
08:23:44 | PMunch | Hmm, is there a way to save a cast? |
08:23:49 | PMunch | I guess I could use a template |
08:27:01 | * | solitudesf quit (Ping timeout: 246 seconds) |
08:31:16 | narimiran | PMunch: how about `populate toOpenArray(test, 1, 3)`? |
08:33:30 | PMunch | Pfft, that would be easy! |
08:33:40 | PMunch | But yeah, definitely a better solution :P |
08:35:37 | livcd | btw what is the point of the "stable" release ? |
08:37:14 | PMunch | Well, I didn't want to rely on a random point on the devel branch |
08:37:18 | PMunch | It case it had some weird bug |
08:37:57 | PMunch | narimiran, that works like a charm, thanks :) It felt too wrong to do it my way :P |
08:38:06 | livcd | i have a feeling that random point on the devel is more stable than stable |
08:38:46 | PMunch | Haha, might be |
08:39:11 | PMunch | But I kinda wanted other people to be able to deploy the playground easily |
08:39:40 | PMunch | And make Nim appear more stable if I put an article on HN or Reddit |
08:45:16 | * | seni joined #nim |
08:45:39 | * | hoijui joined #nim |
08:47:58 | * | kapilp joined #nim |
08:49:38 | * | Tanger left #nim ("Leaving") |
08:49:58 | poopBot | yglukhov[m], oh master of masters can you pls assist me with issue with nim-jwt |
08:50:48 | leorize | narimiran: I think I fixed that indent problem with pragmas :) |
08:51:05 | narimiran | leorize: thumbs up! |
08:51:13 | leorize | wait a sec for me to push this |
08:51:48 | leorize | now that I got a test suite, this should not cause too much problem |
08:53:14 | narimiran | ...famous last words |
08:54:19 | leorize | one day I'll have to rewrite the indent script :p |
08:54:30 | leorize | anw, got that pushed :) |
08:54:38 | leorize | please wait for travis |
08:56:20 | leorize | narimiran: you can pull now :) |
09:02:34 | poopBot | yglukhov[m], stop playing fonline, i need you :), will give you sneekboy+waki for it |
09:03:06 | leorize | I think he's on gitter more than matrix |
09:03:09 | leorize | so @yglukhov |
09:05:15 | poopBot | @yglukhov : can you check your jwt-nim pls i duno if i am retarded or if its buged tryed on 2 pcs |
09:20:13 | * | hoijui quit (Ping timeout: 250 seconds) |
09:22:00 | narimiran | poopBot: based on the previous experience with your bug reports here......... :P :D :D |
09:22:28 | narimiran | leorize: did you get my PM yesterday about object fields highlighting? |
09:22:36 | poopBot | np i can alwies create a new account xD |
09:23:07 | narimiran | i'm sure nobody would recognize you :D :D |
09:23:52 | * | al2 joined #nim |
09:24:41 | poopBot | anyway i am like 65% sure its not my foult this time |
09:25:03 | narimiran | hahaha, improving the odds, i like it :) |
09:26:29 | leorize | narimiran: nope |
09:27:04 | leorize | can you send it again? :) |
09:27:24 | poopBot | http://ix.io/1JVm |
09:31:43 | poopBot | hmm it wont even compile duno why i thinked it copiled yesterday |
09:33:14 | poopBot | so when i use this ix.io it owerites old cuz i got same link or am just blind |
09:33:32 | narimiran | PMunch: i didn't even know that `toOpenArray` exists and can do that, i found out about it when i couldn't implicitly convert UncheckedArray to OpenArray trying to make your example more general :) |
09:36:46 | PMunch | Haha, yeah I've never seen it either |
09:36:49 | PMunch | But it's a nice trick |
09:38:19 | * | al2 quit (Ping timeout: 258 seconds) |
09:38:35 | poopBot | duno if i should try wrap https://github.com/pokowaka/jwt-cpp then |
09:40:02 | Zevv | hm wait I probably could not use openarray to cheaply slice a string, right? |
09:40:53 | * | hoijui joined #nim |
09:44:09 | narimiran | Zevv: ummm, it seems to work? |
09:45:16 | Zevv | ah its basically just passing the pointer, but safer then doing it with addr. nice |
09:47:09 | narimiran | now two questions remain: 1. why nobody knows about it? 2. why it isn't called `slice`? :) |
09:49:03 | Zevv | well, because it isn't? |
09:49:10 | Zevv | if you slice a string, you should get a string |
09:49:16 | Zevv | not an array of chars |
09:53:21 | * | hoijui quit (Quit: Leaving) |
09:53:36 | Araq | toOpenArray is new in 0.19 and we don't make good use for it, yet |
09:58:19 | Zevv | what's the typical place it should be used then |
09:59:08 | Zevv | and I guess it's not for C backends only, so we can't just sprinkle it through the stdlib |
09:59:28 | Zevv | /it's for C backetds only/ |
10:00:44 | Zevv | oooh, and also: "syntax sugar yet to come" \o/ |
10:01:54 | Araq | PMunch, karax should work with latest stable, I'll insert some workaround |
10:08:19 | skrylar[m] | well. i nim-ized the appkit (though its not implemented on any platform yet) |
10:13:17 | skrylar[m] | https://pastebin.com/LDj097RJ a very rough dump |
10:18:30 | * | rnrwashere joined #nim |
10:22:51 | * | rnrwashere quit (Ping timeout: 248 seconds) |
10:28:19 | * | poopBot quit (Remote host closed the connection) |
10:38:48 | * | ng0 joined #nim |
10:40:13 | Araq | skrylar[m], any opinion on "immediate mode UIs"? |
10:44:22 | PMunch | Zevv, I guess the use for it is exactly what I needed to use it for here. So basically pass a part of a sequence or array as an openArray for direct manipulation. |
10:45:03 | federico3 | https://nim-lang.github.io/Nim/system.html#UncheckedArray is not documented: what's its use-case? |
10:46:17 | Araq | federico3, C interop mostly, use it with a 'ptr' in front, 'ptr UncheckedArray[int]' |
10:46:51 | federico3 | there are comments in system.nim but they are not being rendered in the manual it seems |
10:50:42 | skrylar[m] | <Araq "skrylar, any opinion on "immedia"> i've never bought in to them. they seem to be some nontrivial work to make efficient, difficult to integrate with other things (ex. accessibility services) .. they seem to be great for debugging systems |
10:51:35 | skrylar[m] | i mean the Be stuff lets you do it if you want; you can just have a window process draws/events manually and just not use widgets |
10:55:40 | * | al2 joined #nim |
10:58:29 | Araq | well but that's not good enough, you can have immediate mode plus widgets that are written for immediate mode |
11:00:14 | FromGitter | <alehander42> Araq, is this easy to do |
11:00:21 | FromGitter | <alehander42> i have a OS todolist |
11:00:30 | FromGitter | <alehander42> and UI is the only missing thing |
11:01:03 | FromGitter | <alehander42> trust me, i want the most hacky thing, the os would run everything on physical memory in kernel mode |
11:02:01 | PMunch | alehander42, actual GUIs? Or a TUI? |
11:03:55 | FromGitter | <alehander42> hm i needed some special stuff to be able to bootstrap a gui |
11:03:55 | FromGitter | <alehander42> right |
11:04:34 | FromGitter | <alehander42> i need to set the video resolution, and real multitasking |
11:04:47 | FromGitter | <alehander42> so probably for the beginning a TUI indeed |
11:04:54 | Zevv | you could do without the multitasking |
11:05:15 | PMunch | federico3, Araq, is UncheckedArray any different from the old array[0..int.high, int] {.unchecked.}? |
11:05:21 | FromGitter | <alehander42> hm nice |
11:05:30 | FromGitter | <alehander42> but i do need multitasking overally |
11:05:46 | FromGitter | <alehander42> basically my idea is simple: define a very simple typed language |
11:05:48 | PMunch | But writing schedulers are the fun part :P |
11:05:51 | FromGitter | <alehander42> run everything without paging |
11:06:11 | FromGitter | <alehander42> but ensure somehow from the types that each program touches only valid part of the memory |
11:06:29 | FromGitter | <alehander42> and yeah write a very basic memory manager & scheduler |
11:06:36 | FromGitter | <alehander42> preemptive scheduler! |
11:07:01 | Zevv | even that is hard enough, given that you need context switching |
11:07:35 | FromGitter | <alehander42> well i do: but i thought it's not so hard |
11:07:41 | FromGitter | <alehander42> i remember looking at one toy os |
11:07:45 | FromGitter | <alehander42> several years ago |
11:07:53 | FromGitter | <alehander42> which had a not very complicated impl of context switching |
11:07:56 | Zevv | on toy CPU's it is pretty simple |
11:08:08 | FromGitter | <alehander42> i need to preserve/copy some stuff and move some stuff on each switch i think |
11:08:32 | Zevv | and create some new stuff |
11:08:38 | FromGitter | <alehander42> yes |
11:08:43 | FromGitter | <alehander42> so what would be the simplest "real" semi-modern CPU |
11:08:49 | FromGitter | <alehander42> for this kind of thing |
11:09:05 | Zevv | some arm cortex |
11:09:23 | skrylar[m] | theres those blaze-things for fpgas |
11:09:34 | skrylar[m] | those have variable complexity iirc |
11:10:21 | FromGitter | <yglukhov> poopBot: hey whats up |
11:11:10 | FromGitter | <alehander42> yeah but i probably would run it on qemu |
11:11:15 | FromGitter | <alehander42> and maybe on an old laptop or something |
11:11:32 | FromGitter | <kaushalmodi> federico3: I use UncheckedArray to map to array pointers in C: `let uncheckedArrPtr = castptr UncheckedArray[cint (alloc0(arrSize))` |
11:11:46 | * | seni quit (Quit: Leaving) |
11:12:49 | Zevv | alehander42: STM32 is a nice platform, and has full system qemu support |
11:13:25 | FromGitter | <alehander42> yeah, but i'd love to run it on a normalish machine |
11:13:32 | FromGitter | <alehander42> what i mean is |
11:13:34 | FromGitter | <alehander42> hm |
11:13:38 | PMunch | Was the settings block concept removed from Jester? |
11:13:41 | FromGitter | <alehander42> but i can connect stm32 to a monitor, right |
11:13:51 | FromGitter | <alehander42> so in this case i can use it for coding actually |
11:14:17 | Zevv | alehander42 -> #nim-offtopic |
11:14:39 | federico3 | PMunch: use https://github.com/dom96/jester#custom-router , it's much more flexible |
11:14:41 | FromGitter | <alehander42> yes |
11:14:43 | PMunch | alehander42, we used bochs in our OS course in uni |
11:15:02 | PMunch | bochs and some random lab machines |
11:15:28 | FromGitter | <alehander42> afaik qemu is pretty good as well |
11:15:33 | FromGitter | <alehander42> for development |
11:16:18 | PMunch | federico3, hmm |
11:16:49 | PMunch | My old design for custom routes still supported the simple case of a settings block I think.. |
11:16:56 | PMunch | I just want to change the public dir |
11:17:02 | PMunch | For debugging |
11:17:55 | * | solitudesf joined #nim |
11:19:09 | * | lritter joined #nim |
11:21:06 | * | al2 quit (Quit: WeeChat 2.4) |
11:21:57 | Araq | PMunch, it's different in that it clearly communicates that you don't have bounds checking |
11:22:18 | Araq | and it can also be the last field of an object, then to be used without the 'ptr' |
11:22:36 | Araq | so that you can reimplement your own 'seq', for example |
11:23:08 | PMunch | Oooh interesting |
11:23:47 | Araq | works well with the custom destructors |
11:24:13 | * | laaron quit (Remote host closed the connection) |
11:24:55 | PMunch | Cool, looking forward to see what kind of crazy stuff will come of this |
11:25:14 | PMunch | Native feeling custom types could be pretty neat :) |
11:26:01 | skrylar[m] | something interesting but probably not as relevant, i was thinking about how the bmessage system could be tied in to adapters... so you could concievably have stuff like "do this libcurl thing and then throw the http response back as a message" |
11:26:09 | * | laaron joined #nim |
11:26:34 | skrylar[m] | they were basically using json objects for system wide messages before that was a thing |
11:26:43 | PMunch | Something completely different, bit annoying that you can't do "initSomething().doSomething()" where doSomething expects a "var Something". You have to assign initSomething to a var first, even though I obviously don't care about the value in this case. |
11:27:32 | skrylar[m] | i guess because the system doesn't recognize temporary storage as an actual variable |
11:28:16 | Araq | PMunch, you brought this up before and I disagree |
11:28:46 | Araq | doSomething() mutates and the result of the mutation can be important and so shouldn't operate on throw-away data |
11:33:37 | Araq | template combine(a, b) = (var x = a; b(x)); initSomething().combine(doSomething) |
11:36:07 | PMunch | Well in this case for example it was initJester(myRouter, settings = newSettings(...)).serve() |
11:36:42 | PMunch | Serve in this case will run forever, so there is no possibility of me changing that variable anyways. |
11:36:55 | PMunch | Well, I guess it would be possible, but that's beside the point |
11:42:17 | * | laaron quit (Remote host closed the connection) |
11:43:28 | * | PMunch wonders, with IncludeOS, could you make a pure Nim docker container? |
11:45:22 | * | laaron joined #nim |
11:47:55 | * | leorize quit (Ping timeout: 256 seconds) |
11:48:47 | * | joshbaptiste quit (Ping timeout: 245 seconds) |
11:49:58 | * | leorize joined #nim |
11:52:25 | * | joshbaptiste joined #nim |
11:53:35 | federico3 | http://paste.debian.net/1082880/ some help with this? |
11:54:26 | federico3 | It's being called as a callback from a dynamic library in C |
11:59:19 | PMunch | I'm guessing x is being garbage collected? |
11:59:38 | FromGitter | <kaushalmodi> I haven't used a "var" ptr before |
11:59:57 | FromGitter | <kaushalmodi> I'd keep the return ptr of ptr immutable, and directly assign the resp |
12:00:48 | FromGitter | <kaushalmodi> Not at my computer, but try something like: |
12:00:57 | * | couven92 joined #nim |
12:01:44 | federico3 | PMunch: yes, the error happens when the callback exits |
12:02:00 | FromGitter | <kaushalmodi> I'd rename the resp arg to respPtrPtr for clarity. Then, |
12:02:30 | FromGitter | <kaushalmodi> let respPtr = respPtrPtr[] |
12:02:47 | PMunch | I guess just resp = cast[ptr ptr pam_response](alloc0(sizeof(pointer))); resp[] = cast[ptr pam_response](alloc0(sizeof(pam_response))) |
12:02:55 | FromGitter | <kaushalmodi> Then assign directly to `respPtr[]` |
12:03:14 | FromGitter | <kaushalmodi> That way the respPtrPtr arg doesn't need to be a var |
12:03:36 | PMunch | x in your example probably lives on the stack, so when you get the addr to it and return that pointer will be to some unused part of the stack and cause an error |
12:03:59 | federico3 | ah you first allocate a pointer and then build pam_response! |
12:04:37 | PMunch | Yes, otherwise the pointer to the pointer to pam_response won't be on the heap, and therefore not available to the caller |
12:05:00 | federico3 | resp = cast[ptr ptr pam_response](alloc0(sizeof(pointer))) alone triggers the invalid pointer error |
12:06:32 | FromGitter | <kaushalmodi> Something like this (https://github.com/kaushalmodi/nim-systemverilog-dpic/blob/master/amiq_dpi_c_examples/libdpi.nim#L105), but for the second ptr dereferencing too |
12:08:15 | * | poopBot joined #nim |
12:09:02 | poopBot | so treform helpd me out , i head dumbest issue --d:ssl--passL:"-lcrypto" dident pass this to compiler, thats why nim-jwt dident work |
12:10:33 | FromGitter | <yglukhov> poopBot: so.. is it solved now? |
12:10:42 | federico3 | kaushalmodi resp is not initialized. I cannot set resp[] straight away |
12:10:45 | poopBot | yep :) |
12:11:23 | poopBot | should put that on github page for newbs who dont know that need to do that :) |
12:12:45 | leorize | PMunch: the settings block for jester is still there |
12:12:57 | leorize | you just have to build the doc and read it :p |
12:13:01 | FromGitter | <kaushalmodi> federico3: ah, understood.. in my case the C side allocates stuff before sending me the pointer |
12:13:24 | FromGitter | <Vindaar> @poopBot good it's working now. But why do you manually have to pass `lcrypto` to the C compiler? |
12:13:40 | poopBot | that part i duno |
12:14:16 | poopBot | its like asking a cleaning crew what is the molecular mass of detergent xD |
12:14:27 | FromGitter | <Vindaar> @yglukhov shouldn't that be done in the library? |
12:14:45 | poopBot | cleaning crew would be me in that elaboration |
12:16:00 | FromGitter | <yglukhov> does it work with only `-d:ssl` and without `-lcrypto`? |
12:16:02 | PMunch | leorize, it is? Couldn't find it.. |
12:16:18 | FromGitter | <Vindaar> on my machine `-d:ssl` is not required, only `-lcrypto` |
12:16:21 | poopBot | can try |
12:16:49 | FromGitter | <Vindaar> (and only `-d:ssl` does not work) |
12:16:53 | poopBot | same on my |
12:17:00 | poopBot | just tested |
12:17:11 | federico3 | PMunch: any other hint? |
12:17:22 | * | laaron quit (Remote host closed the connection) |
12:17:32 | leorize | PMunch: https://github.com/dom96/jester/blob/master/jester.nim#L1358 |
12:17:36 | PMunch | Just a sec, looking into it |
12:17:43 | poopBot | i tryed before tht LD_PREALODING tought tht dident work :) |
12:17:46 | leorize | just put the block before you use `router` |
12:18:32 | leorize | -d:ssl is only usable for the httpclient module iirc |
12:18:48 | leorize | nowadays it won't pass -lcrypto randomly |
12:19:33 | PMunch | federico3, this seems to work fine: http://ix.io/1JWd |
12:20:11 | PMunch | leorize, strange, I searched through that file for the word setting.. |
12:20:19 | PMunch | Must've mis-typed it |
12:20:52 | PMunch | federico3, what does the C library look like? |
12:20:59 | PMunch | Or specifically the part that calls your code |
12:21:08 | * | laaron joined #nim |
12:21:43 | PMunch | Typically when you get passed a ptr ptr it's because you are supposed to change the pointer that gets pointed to |
12:21:48 | FromDiscord_ | <kiwi> @federico3, not sure if you saw my question yesterday ... but I was wondering if you can use CSS or something to change button colors. Original: ... can you change the background colour of the UI & the background colour of the buttons in ui.nim / libui? Like this .... https://i.imgur.com/4DHBmQn.png |
12:22:13 | federico3 | kiwi: wrong person :) |
12:22:34 | FromDiscord_ | <kiwi> oops. sorry. |
12:22:50 | PMunch | I'm assuming it was me you tried to talk to? |
12:22:53 | PMunch | About wxNim? |
12:24:03 | PMunch | kiwi^ |
12:24:05 | FromDiscord_ | <kiwi> Not really. After working through a lot of wxnim stuff & writing a basic gui I concluded that I couldn't do it. |
12:24:48 | FromDiscord_ | <kiwi> I was wondering about nim's libui libary and whether it would pass css to control the button colour on gtk3 buttons or not. https://github.com/nim-lang/ui |
12:25:48 | PMunch | Ah, I know the Gtk wrapper can do it, but I'm not all that familiar with libui |
12:26:41 | FromDiscord_ | <kiwi> I understand wxnim deciding to stay true to platform colours ... but I need to sort of flexibility that you get with qt ... but don't really want to try to write an interface. I couldn't tell with libui either ... basically QT packages the CSS a little but its basically doing it like gtk. |
12:27:38 | PMunch | Doesn't look like libui supports it: https://github.com/andlabs/libui/issues/313 |
12:28:00 | PMunch | wxWidgets is able to set button colours |
12:28:27 | PMunch | Just not with a stylesheet |
12:28:31 | FromDiscord_ | <kiwi> That seemed to involve creating some new button objects not standard buttons. |
12:28:58 | FromDiscord_ | <kiwi> Or wasn't it as difficult as I suspected? |
12:29:18 | WilhelmVonWeiner | if I run len() on an array is that done at runtime |
12:29:44 | livcd | kiwi: try sciter |
12:29:47 | WilhelmVonWeiner | should I just store obj.size in my object? the array size won't change |
12:30:08 | FromDiscord_ | <kiwi> thanks livcd |
12:31:31 | FromDiscord_ | <kiwi> funny thing about colour .. i used to buy vdus that were green on black & didn't believe in colours ... then out came windows & mac stole an interface from xerox ... and here we are in a world where colours provide contrast with lots of grey buttons. Bizarre circle. |
12:32:27 | FromDiscord_ | <kiwi> however, i shall investigate sciter 😃 |
12:40:23 | PMunch | kiwi, hmm I'm able to set a buttons foreground (ie. text) colour with setForegroundColour |
12:40:33 | PMunch | But the background seems a bit trickier.. |
12:41:40 | leorize | WilhelmVonWeiner: array length are compile-time |
12:42:11 | leorize | openArray length are runtime, but they're stored with the array |
12:42:16 | leorize | same goes for seq |
12:44:55 | Araq | gah, Nim's nim.cfg is complex stuff |
12:48:42 | FromGitter | <mratsim> array length is not stored at runtime |
12:48:44 | * | laaron quit (Remote host closed the connection) |
12:48:55 | FromGitter | <mratsim> it's inlined everywhere needed |
12:50:48 | * | laaron joined #nim |
12:53:36 | PMunch | kiwi, the thing with GUIs are that you have three things to balanec: platforms, customisability, and complexity. Gtk runs great on many platforms, but it's only really "native" to Linux, you can customize pretty much everything, and it's not too hard to work with. WxWidgets uses only native components, is fairly easy to work with (once you know what you're doing), but customization is difficult since it has to be possible to do with native components. Things |
12:53:36 | PMunch | like Sciter use no native components, allows you to customize everything, and are often fairly simple to work with. To create something that has native UIs on all platforms, allows complete customization, and is easy to both maintain and work with, now that's a feat! |
12:53:44 | * | kapilp quit (Quit: Connection closed for inactivity) |
12:55:58 | FromGitter | <mratsim> @Araq: did you see this Github sponsor thing - https://help.github.com/en/articles/about-github-sponsors |
13:05:52 | Araq | yeah, will apply |
13:06:09 | Araq | anyhow ... this config stuff is terrible |
13:06:37 | Araq | I'll hardcode it into extccomp.nim |
13:06:42 | Araq | for VCC |
13:06:51 | Araq | any objections? no? ok then. |
13:07:29 | Araq | seems to be a big hack around the lack of a decent builtin feature |
13:07:53 | FromDiscord_ | <kiwi> Thanks PMunch |
13:12:09 | federico3 | PMunch: this is the simplest code to reproduce the error http://paste.debian.net/1082896/ |
13:15:13 | * | nsf quit (Quit: WeeChat 2.4) |
13:18:32 | PMunch | Hmm, can you declare a C callback in a struct like that? |
13:19:23 | * | poopBot quit (Remote host closed the connection) |
13:20:21 | * | solitudesf- joined #nim |
13:20:26 | FromGitter | <mratsim> yes |
13:21:19 | * | laaron quit (Remote host closed the connection) |
13:22:33 | * | solitudesf quit (Ping timeout: 245 seconds) |
13:23:43 | Araq | conv*: proc (num_msg: cint; msg: ptr ptr pam_message; resp: var ptr ptr PAMResponse; |
13:23:43 | Araq | appdata_ptr: pointer): cint --> |
13:23:48 | Araq | conv*: proc (num_msg: cint; msg: ptr ptr pam_message; resp: var ptr ptr PAMResponse; |
13:23:48 | Araq | appdata_ptr: pointer): cint {.cdecl.} |
13:23:52 | * | laaron joined #nim |
13:24:01 | Araq | told you to watch out about implicit .closure |
13:25:15 | federico3 | thanks Araq |
13:26:16 | federico3 | same behavior with cint {.cdecl.} |
13:26:30 | FromGitter | <mratsim> I feel like very often when working with higher order functions we need to force nimcall (or cdecl for C API): https://github.com/nim-lang/Nim/issues/7808 |
13:27:35 | * | Araq shrugs |
13:27:42 | Araq | c2nim does it decently |
13:27:58 | Araq | alehander42: any idea what's going on here: https://ci.appveyor.com/project/dom96/nim/builds/24784172/job/jyae0gcn17ykgnyf/tests |
13:29:34 | Araq | my PR affects multi methods, does 'gara' use these? |
13:34:42 | PMunch | federico3, I'm looking into this. It seems there are a couple things going on here |
13:36:02 | narimiran | @everybody: i need some (relatively short) code example that nicely shows nim's strengths, any ideas? |
13:37:15 | * | rnrwashere joined #nim |
13:39:28 | shashlick | @PMunch did you get to try out the radcli wrapper? |
13:40:15 | * | Cthalupa- quit (Ping timeout: 264 seconds) |
13:41:19 | * | Cthalupa joined #nim |
13:41:26 | FromGitter | <alehander42> how can i see the whole |
13:41:31 | FromGitter | <alehander42> error? Araq |
13:41:38 | FromGitter | <alehander42> as i dont see actual errors in this box |
13:41:42 | PMunch | shashlick, there is a radcli wrapper?! |
13:41:47 | * | rnrwashere quit (Ping timeout: 248 seconds) |
13:43:12 | * | laaron quit (Remote host closed the connection) |
13:43:37 | * | laaron joined #nim |
13:47:56 | Araq | alehander42: I think you can't but does gara use 'method'? |
13:48:15 | * | solitudesf- quit (Ping timeout: 248 seconds) |
13:49:49 | shashlick | I made one for you remember |
13:50:05 | FromGitter | <mratsim> @narimiran: echo "Hello world" |
13:50:14 | PMunch | shashlick, you did? |
13:50:16 | FromGitter | <mratsim> ask Rust to do the same ;) |
13:50:27 | PMunch | I think I used the one I generated with c2nim |
13:50:33 | FromGitter | <mratsim> println!("Hello world") ;) |
13:50:42 | PMunch | Anyways it works great :) Got MsCHAPv1 working and everything |
13:50:55 | narimiran | @mratsim :P |
13:51:45 | shashlick | @PMunch https://irclogs.nim-lang.org/22-05-2019.html#14:46:26 |
13:51:56 | Zevv | PMunch: welcome to 1998! |
13:52:01 | narimiran | something like the current example at https://nim-lang.org/ but it can be longer and show something not-so-obvious |
13:52:19 | Zevv | trumpet winsock calling, they're asking you to startup your mosaic browser |
13:53:10 | PMunch | narimiran, https://uploads.peterme.net/backside-jester-fullres.png https://uploads.peterme.net/backside-gol-fullres.png |
13:53:25 | PMunch | Me and dom96 made those for FOSDEM last year. Ended up not using them, but eh |
13:53:29 | PMunch | Might be helpful |
13:53:46 | PMunch | narimiran, I think throwing a template in there would be nice |
13:53:51 | narimiran | PMunch: yep, i'm looking for stuff like that |
13:53:56 | PMunch | At least give them a taste of metaprogramming :) |
13:53:59 | narimiran | and a template example would be nice too |
13:54:08 | FromGitter | <kaushalmodi> looking at that screenshot, are we moving to using `std/` prefix for stdlib modules? I kinda like it. |
13:54:22 | FromGitter | <kaushalmodi> helps me quickly distinguish the stdlib vs other imports in my code |
13:54:55 | narimiran | kaushalmodi: i just use two lines of imports - first for stdlib, second for the rest |
13:55:15 | PMunch | shashlick, oh woops, I had left work half an hour before you posted that :( |
13:55:40 | FromGitter | <kaushalmodi> narimiran: I think it helps a Nim newcomer see how much stuff is already coming from Nim stdlibs |
13:56:09 | PMunch | federico3, I'm a bit stumped by this. Found some example that seems to suggest that it's not a pointer to a pointer but rather a pointer to an array |
13:56:16 | FromGitter | <kaushalmodi> I use 3 lines: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce7f800d22ba766a2f11b0f] |
13:56:26 | Araq | narimiran, how about we give a nice summary about how Nim *really* works |
13:56:31 | FromGitter | <kaushalmodi> line 1 is pkg internal modules, 2 is stdlibs, 3 is nimble installed |
13:56:33 | PMunch | But I'm out of time right now, have to get fetch my car from the repair shop |
13:56:59 | PMunch | kaushalmodi, I do something similar :) |
13:57:01 | narimiran | Araq: ok, i'll wait.... :P |
13:57:09 | Araq | oh nah, that will only scare potential users :P |
13:57:13 | * | PMunch quit (Remote host closed the connection) |
13:57:55 | shashlick | @PMunch well is an example, as long as you have a wrapper, I'm good |
13:59:23 | FromGitter | <kaushalmodi> Varriount: I looked at the marshal source code and my eyes glazed over. |
13:59:53 | FromGitter | <kaushalmodi> Everyone here who's great with Python and its internal marshal serialized format: https://irclogs.nim-lang.org/24-05-2019.html#04:27:18 |
14:00:10 | FromGitter | <kaushalmodi> ^ anyone has tried to decode the marshalled binary blob in Nim? |
14:00:34 | FromGitter | <kaushalmodi> Plan B is to call python via exec from Nim |
14:00:57 | Araq | why not make Python output .json |
14:01:26 | FromGitter | <kaushalmodi> Perforce p4 somehow decided to provide just the Python marshal blob |
14:01:30 | FromGitter | <kaushalmodi> that's quite odd |
14:02:36 | Araq | python blob2json.py blob |
14:05:19 | * | al_ joined #nim |
14:06:23 | FromGitter | <MortimerSnerd> Is it a bug that offsetof() won't work with an object that ends with an UncheckedArray, because the type can't be instantiated as a value? |
14:08:56 | FromGitter | <kaushalmodi> Araq: yeah, that's the plan.. call a little blob2json Python script from nim |
14:11:22 | * | sealmove joined #nim |
14:14:24 | Araq | MortimerSnerd: maybe, please report it |
14:16:21 | FromGitter | <mratsim> @kaushalmodi Are you talking about pickle? |
14:17:52 | FromGitter | <kaushalmodi> no, just marshal |
14:18:25 | FromGitter | <kaushalmodi> @mratsim See https://www.perforce.com/manuals/cmdref/Content/CmdRef/global.options.html and look for the "-G" switch in there |
14:18:43 | FromGitter | <kaushalmodi> I wonder why the smart Perforce engineers didn't provide a JSON out |
14:20:38 | Araq | btw what is Perforce? |
14:21:17 | FromGitter | <kaushalmodi> it's a version control system |
14:23:09 | * | rnrwashere joined #nim |
14:25:56 | * | theelous3 joined #nim |
14:31:13 | FromGitter | <Vindaar> @kaushalmodi if it's really a normal python dictionary marshaled via python, you can just use `nimpy` to parse it: http://ix.io/1JWP/nim |
14:32:06 | FromGitter | <kaushalmodi> @Vindaar Let me try that! |
14:32:31 | FromGitter | <kaushalmodi> In the meanwhile, I discovered another way which removes Python dependency.. p4 gives out another weird output called "ztag" |
14:32:40 | FromGitter | <kaushalmodi> it's format is: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce80088d22ba766a2f15d6a] |
14:34:28 | * | nsf joined #nim |
14:40:24 | FromGitter | <kaushalmodi> how do I do binary read in Nim? |
14:42:36 | FromGitter | <kaushalmodi> this is the python script that works with reading the `p4 -G` marshal output.. but doesn't do JSON: http://ix.io/1JWQ |
14:42:43 | FromGitter | <kaushalmodi> I'll play with it later today |
14:43:52 | * | Gaboose quit (Quit: Page closed) |
14:44:26 | * | couven92 quit (Quit: Client disconnecting) |
14:46:15 | FromGitter | <Vindaar> I used json, because it's easy to work with in Nim. You could of course iterate over the `PyObject` in Nim and call the `decode` function, too and build the json or whatever you want manually from that too |
14:47:09 | FromGitter | <kaushalmodi> I meant that I need to work on fusing the working bit of reading marshal from that python code with the bit about converting to json from your code :) |
14:47:53 | FromGitter | <Vindaar> ah, I see |
14:48:59 | FromGitter | <kaushalmodi> ugh, why wouldn't the Perforce guys document a Formatting switch.. I just learn from their official blog post: ⏎ ⏎ > Sharp-eyed users may have noticed the addition of a new undoc option to the command line client |
14:49:09 | FromGitter | <kaushalmodi> > -F formatstring |
14:52:08 | * | rnrwashere quit (Remote host closed the connection) |
14:52:40 | * | rnrwashere joined #nim |
14:52:59 | FromGitter | <Vindaar> that's certainly one way to spin "sorry for not documenting this feature" :D |
14:53:18 | * | Trustable joined #nim |
14:54:32 | * | rnrwashere quit (Remote host closed the connection) |
14:54:45 | * | rnrwashere joined #nim |
14:56:46 | * | rnrwashere quit (Remote host closed the connection) |
15:25:52 | * | rnrwashere joined #nim |
15:28:29 | * | kapilp joined #nim |
15:32:58 | * | vlad1777d quit (Ping timeout: 258 seconds) |
15:41:01 | * | gangstacat joined #nim |
15:43:05 | * | rnrwashere quit (Remote host closed the connection) |
15:50:07 | federico3 | TIL: the auto type |
15:51:26 | * | solitudesf- joined #nim |
15:51:42 | * | rnrwashere joined #nim |
15:53:00 | * | solitudesf- quit (Client Quit) |
15:53:16 | * | solitudesf joined #nim |
15:53:29 | * | nsf quit (Quit: WeeChat 2.4) |
16:00:56 | * | laaron quit (Remote host closed the connection) |
16:03:43 | * | laaron joined #nim |
16:10:50 | * | laaron quit (Remote host closed the connection) |
16:12:47 | * | laaron joined #nim |
16:26:39 | * | xace quit (Ping timeout: 248 seconds) |
16:27:42 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
16:39:43 | * | laaron quit (Remote host closed the connection) |
16:40:09 | * | Jesin quit (Quit: Leaving) |
16:43:10 | * | laaron joined #nim |
16:45:50 | * | Jesin joined #nim |
16:48:09 | * | al_ quit (Quit: al_) |
16:48:55 | Zevv | wow, new to me as well. I really feel I should hate this language for its complexity and pleora of things I didn't know and only find out after two years, because that is usually my argument against C++ |
16:49:22 | Zevv | but I don't - then what is it? |
16:49:43 | FromGitter | <kaushalmodi> may be the community and the direct feedback to the devs here? |
16:50:21 | FromGitter | <kaushalmodi> .. and to be able to hack the language in the same language |
16:51:26 | Zevv | yeah, true. Bjarne just hangs up on me these days, he's not the guy I once new now he got his superstar status |
16:52:17 | Zevv | we just used to hang out together you know. Chill and code a bit, smoke some weed, have a pizza. But no, mr big no does conferences and gets all the girls. And I'm just here at home, on the couch |
16:52:25 | FromGitter | <Vindaar> well, you can skim Nim's manual in less than a day, which covers every feature aside from some experimental ones. How long does it take to read C++'s manual. Oh wait, there isn't even one? |
16:53:02 | Zevv | hehe |
16:55:06 | narimiran | "i dident read it" :D |
16:55:28 | * | rnrwashere quit (Remote host closed the connection) |
16:55:46 | Zevv | hoooo |
16:57:15 | * | ShalokShalom quit (Remote host closed the connection) |
17:01:11 | * | rnrwashere joined #nim |
17:03:19 | * | xace joined #nim |
17:07:32 | * | laaron quit (Remote host closed the connection) |
17:11:08 | * | laaron joined #nim |
17:14:26 | * | rnrwashere quit (Remote host closed the connection) |
17:15:11 | * | rnrwashere joined #nim |
17:20:08 | * | rnrwashere quit (Remote host closed the connection) |
17:28:17 | * | rnrwashere joined #nim |
17:39:16 | Araq | Zevv: do you really know Bjarne? |
17:43:10 | * | Vladar quit (Remote host closed the connection) |
17:46:51 | * | rnrwashere quit (Remote host closed the connection) |
17:53:54 | * | rnrwashere joined #nim |
17:54:53 | Zevv | nah :) |
17:55:59 | Araq | what's complex about the 'auto' type? |
17:56:06 | * | abm joined #nim |
17:56:25 | FromGitter | <kaushalmodi> Araq: Sorry for bugging with the `--out:` and nim doc issues.. but the URLs with index.html are really much cleaner |
17:57:30 | * | rnrwashere quit (Remote host closed the connection) |
17:58:21 | Araq | tbh I think I'll remove --out for 'nim doc', --outdir makes sense but everything else is simply to expensive to maintain and support |
17:59:02 | Araq | cross references cannot work reliably when you get to chose the .html name |
17:59:08 | Araq | *choose |
17:59:39 | Araq | you can have an index.nim to produce an index.html |
17:59:45 | Araq | or an index.rst |
18:02:20 | FromGitter | <kaushalmodi> cross references uses the .idx .. so you need to just pass the --out: value to the index generation |
18:02:47 | FromGitter | <kaushalmodi> index.nim would generate a module named "index" .. for all my modules |
18:03:37 | FromGitter | <kaushalmodi> Please don't remove `--out:`. |
18:05:48 | * | couven92 joined #nim |
18:06:18 | FromGitter | <kaushalmodi> If you remove `--out`, may be the doc HTML default should be to generate `index.html` :) |
18:06:55 | FromGitter | <kaushalmodi> then using `--outdir:foo`, I can have `foo/index.html` if I liked |
18:07:03 | Araq | and what should be in this index.html? seems like a terrible idea |
18:07:16 | * | laaron quit (Remote host closed the connection) |
18:07:29 | FromGitter | <kaushalmodi> let me rephrase the example |
18:10:06 | FromGitter | <kaushalmodi> now: `nim doc foo.nim` -> `foo.html` -> need to visit this URL as `foo.html` ⏎ after (changing default to `index.html`): `nim doc foo.nim` -> `foo/index.html` -> can visit this URL as `foo/index.html` or `foo/` [outdir defaults to package name for `nim doc`] ⏎ after (changing default to `index.html`) + `--outdir:.`: `nim doc --outdir:. foo.nim` -> `index.html` -> can visit this URL as `/index.html` or `/` |
18:10:48 | * | laaron joined #nim |
18:11:57 | FromGitter | <kaushalmodi> .. actually that might be a more involved change, as you cannot have `foo/` dir and `foo` binary in the same dir |
18:11:58 | FromGitter | <kaushalmodi> oh well |
18:16:40 | FromDiscord_ | <nothing to no one> How can I check if an element in a sequence is nil or not? |
18:17:50 | * | ShalokShalom joined #nim |
18:17:56 | FromDiscord_ | <nothing to no one> I've tried `thr[0] != nil` but that gives a type error on `!=` |
18:19:26 | FromGitter | <kaushalmodi> what's the seq type? |
18:19:45 | narimiran | `isnil` |
18:20:55 | FromDiscord_ | <nothing to no one> seq is of type `seq[Thread[tuple[config: Config, path: string]]]`. isNil throws type checking errors |
18:21:45 | * | leorize quit (Ping timeout: 256 seconds) |
18:21:52 | FromDiscord_ | <nothing to no one> might be an x y problem. I have an array of threads that contains `n` elements, but some elements might be nil, so calling `joinThread` on them causes segfaults |
18:23:12 | * | ShalokShalom quit (Remote host closed the connection) |
18:23:24 | Araq | a Thread can never be nil |
18:23:36 | Araq | which is what the compiler is trying to tell you. |
18:24:15 | FromDiscord_ | <nothing to no one> oh no, i'm gonna have to do this the proper way, aren't i? |
18:24:59 | rayman22201 | I vote for simplifying doc generation fwiw @kuashalmodi and @araq |
18:25:22 | Araq | --project and --outdir go a long way |
18:28:44 | rayman22201 | +1 |
18:30:18 | FromDiscord_ | <nothing to no one> line 17 here (https://hastebin.com/abotumizij.pl) is segfaulting. I can't really see what I'm doing wrong. am i misunderstanding how threads work? |
18:30:37 | * | rnrwashere joined #nim |
18:34:47 | Mister_Magister | how do you compile in release mode |
18:35:02 | narimiran | Mister_Magister: nim c -d:release filename.nim |
18:35:07 | * | rnrwashere quit (Ping timeout: 248 seconds) |
18:35:08 | Mister_Magister | thanks |
18:39:32 | FromGitter | <kaushalmodi> Araq: may be I am not seeing the full picture, but you already set the destFile in Pdoc correctly here: https://github.com/nim-lang/Nim/blob/d67a9f024eeeb2bc26fb38a98be9a53956003290/compiler/docgen.nim#L173-L174 |
18:39:56 | FromGitter | <kaushalmodi> but to generate the index you use `d.filename` instead of `d.destFile`: let dest = dir / changeFileExt(relativeTo(AbsoluteFile d.filename, |
18:40:11 | FromGitter | <kaushalmodi> oops, meant to paste link: https://github.com/nim-lang/Nim/blob/d67a9f024eeeb2bc26fb38a98be9a53956003290/compiler/docgen.nim#L1016 |
18:43:40 | FromDiscord_ | <nothing to no one> oh, I can just check fi the thread is running before joining it, duh |
18:48:52 | narimiran | kaushalmodi: PR? |
18:49:49 | * | leorize joined #nim |
18:59:33 | FromGitter | <kaushalmodi> I am trying it out locally but replacing d.filename with d.destFile made no difference :/ |
18:59:55 | FromGitter | <kaushalmodi> I'll certainly submit a PR if I can fix this |
19:00:09 | Mister_Magister | okay i can compile nim to cpp using nim cpp and compile that in into my cpp but how exactly can i use functions i wrote in nim? |
19:01:02 | * | rokups quit (Quit: Connection closed for inactivity) |
19:01:13 | * | rnrwashere joined #nim |
19:03:50 | FromGitter | <kaushalmodi> Mister_Magister: You should be able to use them if you added {.exportc.} to the Nim proc identifiers |
19:04:03 | Mister_Magister | ooh |
19:06:36 | narimiran | Mister_Magister: https://nim-lang.github.io/Nim/manual.html#foreign-function-interface |
19:06:43 | Mister_Magister | thanks |
19:07:40 | Mister_Magister | proc sendMessage(s: string) {.async.} {.exportc.} = |
19:07:48 | Mister_Magister | i guess it's not a proper way of doing it? |
19:07:58 | Mister_Magister | how do i put 2 of |
19:07:59 | * | rnrwashere quit (Remote host closed the connection) |
19:08:02 | Mister_Magister | *those* |
19:10:08 | FromGitter | <kaushalmodi> `{.async, exportc.}` |
19:11:11 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
19:11:25 | Mister_Magister | thanks |
19:11:44 | * | laaron joined #nim |
19:15:20 | * | NimBot joined #nim |
19:15:22 | * | a_b_m joined #nim |
19:17:55 | Mister_Magister | @kaushalmodi when i add exportc shouldn't nim generate some .h file to include? |
19:18:43 | * | abm quit (Ping timeout: 246 seconds) |
19:20:05 | Mister_Magister | exportc doesn't seem to work :/ |
19:21:49 | * | nsf joined #nim |
19:23:26 | FromGitter | <kaushalmodi> afaik Nim does not generate a .h |
19:23:47 | FromGitter | <kaushalmodi> how I use is that I compile Nim file via cpp backend to a .so |
19:24:32 | Mister_Magister | oh --header:bot.h is the magic |
19:24:46 | Mister_Magister | and -app:staticLib |
19:25:33 | Mister_Magister | tho this header doesn't make much sense either |
19:33:49 | Zevv | federico3: https://github.com/zevv/nim-kernel-module |
19:34:35 | Mister_Magister | no this is completely not working |
19:34:40 | Mister_Magister | not even examples |
19:34:53 | * | natrys joined #nim |
19:35:44 | federico3 | Zevv: I found my attempt at the same and it's pretty similar |
19:35:51 | * | sealmove quit (Quit: WeeChat 2.4) |
19:36:20 | Zevv | that's because that's all there is to it |
19:36:34 | Zevv | although it would be a nice excersise to get the GC working on kmalloc and friends |
19:40:08 | Araq | Mister_Magister, you cannot export an .async proc, C(++) has no async procs |
19:40:54 | Mister_Magister | not even non async exist. and i can't link it |
19:45:31 | Mister_Magister | ye i can't compile it |
19:48:41 | Mister_Magister | lol wait i added some -ldl -ld and it worked |
19:49:51 | Mister_Magister | Question. If my nim function returns nim object how do i make variable from it in c |
19:50:51 | Mister_Magister | oh it's int* |
20:02:15 | * | demond joined #nim |
20:02:29 | * | ShalokShalom joined #nim |
20:02:30 | * | demond left #nim ("++++++") |
20:04:00 | * | ShalokShalom quit (Remote host closed the connection) |
20:04:32 | * | demond joined #nim |
20:05:02 | * | demond left #nim ("~~~~~~~~~~~~~~~~~~~~~~~~~~~") |
20:05:07 | Araq | most certainly not. |
20:08:19 | * | Jesin quit (Quit: Leaving) |
20:09:43 | * | couven92 quit (Read error: Connection reset by peer) |
20:11:42 | FromGitter | <kaushalmodi> Araq: woot! https://github.com/nim-lang/Nim/pull/11326/files |
20:13:46 | * | Jesin joined #nim |
20:16:44 | Araq | and now here is what you need to do: |
20:17:00 | Araq | - write a test case that uses your set of options and checks the produced HTML code |
20:18:11 | Araq | that's what most developers seem to not understand. These switches cause on-going costs unless you don't care all that much about quality. Which is kinda what we did in the past, before I really understood the problem. |
20:18:11 | FromGitter | <kaushalmodi> The Nim testing infrastructure is too scary to me; I don' |
20:18:43 | FromGitter | <kaushalmodi> don't know how to create a test for this; I can provide the reference generated .html and .idx, but where do I commit them .. |
20:19:04 | FromGitter | <kaushalmodi> .. let me try grepping at the current test suite for tests similar to the one this needs |
20:19:23 | Araq | nimdoc/testproject has a test for the docgen |
20:19:45 | Araq | including how to setup stuff. |
20:20:21 | Araq | and don't get me wrong, I will accept the PR as is as long as the existing tests are still green. But if you want --out to stay, write a decent test for --out :-) |
20:20:43 | Araq | same for the "read from stdin" junk |
20:20:50 | FromGitter | <kaushalmodi> found it |
20:21:07 | Araq | if it's not covered by tests, it's broken or it'll bitrot until it's broken |
20:21:29 | Araq | same for our lovely Visual C++ support. :-) |
20:21:36 | FromGitter | <kaushalmodi> thanks; should I just add another execShellCmd in `if execShellCmd("nim doc --project --index:on -o:$1/htmldocs $1/testproject.nim" % dir) != 0:`? |
20:21:46 | Araq | that's one way |
20:21:47 | FromGitter | <kaushalmodi> or just add `--out:` there? |
20:22:33 | FromGitter | <kaushalmodi> hmm, `-o` is already there .. |
20:23:17 | FromGitter | <kaushalmodi> let me just add another little testproject in there |
20:23:27 | FromGitter | <kaushalmodi> that way I won't have to touch the --project testing |
20:26:49 | * | kapilp quit (Quit: Connection closed for inactivity) |
20:31:58 | Araq | sounds good |
20:34:04 | * | a_b_m quit (Quit: Leaving) |
20:35:00 | * | nsf quit (Quit: WeeChat 2.4) |
20:41:43 | * | lritter quit (Ping timeout: 245 seconds) |
20:48:10 | * | pyotr joined #nim |
20:51:52 | * | pyotr quit (Client Quit) |
20:52:07 | * | luis_ joined #nim |
20:53:50 | * | rnrwashere joined #nim |
20:55:45 | * | rnrwashere quit (Remote host closed the connection) |
20:57:14 | * | rnrwashere joined #nim |
21:01:21 | luis_ | Hi everyone, is there language server protocol support for nim currently? |
21:01:53 | narimiran | luis_: https://github.com/PMunch/nimlsp |
21:02:49 | luis_ | this is awesome! Thank you!! |
21:05:45 | FromGitter | <kaushalmodi> Araq: Turns out that that PR of mine causes a regression :( But on the positive side, I refactored the nim doc tester to make it extensible |
21:13:08 | * | arecaceae quit (Remote host closed the connection) |
21:13:27 | * | arecaceae joined #nim |
21:15:22 | FromGitter | <Vindaar> Just played around calling Nim from C++. Sort of expected that handing a variant kind to C++ wouldn't work, but it does |
21:21:24 | * | luis_ quit (Ping timeout: 272 seconds) |
21:29:47 | * | narimiran quit (Ping timeout: 268 seconds) |
21:39:54 | FromGitter | <iffy> What's the koch command I can use to build a version of nim without stomping on my already-built version? |
21:40:03 | FromGitter | <alehander42> temp? |
21:40:39 | FromGitter | <iffy> aha, yes |
21:40:41 | FromGitter | <iffy> thank you! |
21:40:46 | FromGitter | <alehander42> not sure i dont use it |
21:40:50 | FromGitter | <alehander42> but hope its this one! |
21:55:10 | * | solitudesf quit (Ping timeout: 246 seconds) |
21:58:33 | * | rnrwashere quit (Remote host closed the connection) |
22:12:31 | * | natrys quit (Quit: natrys) |
22:25:14 | * | Trustable quit (Remote host closed the connection) |
22:28:53 | * | oscar___ joined #nim |
22:33:25 | * | oscar___ quit (Ping timeout: 256 seconds) |
22:33:31 | Araq | kaushalmodi: meh, please don't "refactor" stuff, I already can program and the programs I write are written exactly as I like them to be written |
22:33:37 | * | stefanos82 quit (Remote host closed the connection) |
22:34:48 | FromGitter | <kaushalmodi> Araq: the refactoring was to allow the expected vs created docs check extend to the new test |
22:35:03 | FromGitter | <kaushalmodi> else I would have needed to copy paste most of the existing code |
22:36:10 | FromGitter | <kaushalmodi> The "refactor" term was not meant to offend anyone |
22:39:41 | * | mosORadi joined #nim |
22:41:23 | Araq | to prevent the copy&paste write a const array and have the tester iterate over it, "data driven design" or something |
22:43:03 | FromGitter | <Vindaar> @kaushalmodi I just pushed the ggplotnim (https://github.com/Vindaar/ggplotnim) and the package I build that on top (https://github.com/Vindaar/ginger). But it'll be a few weeks probably before I'd recommend anyone cloning this :D |
22:54:10 | Araq | wow my gensym-refactoring works surprisingly well. better than the old implementation... |
22:58:32 | * | krux02 quit (Remote host closed the connection) |
23:02:48 | FromGitter | <kaushalmodi> Araq: I am doing about the same what you said; just that there are more variables involved. See just the last commit that add the new test: https://github.com/nim-lang/Nim/commit/80440328293ef026e89346c5450be954fd94e42c#diff-4f7c0cc51009eb64f446379068396ad1 |
23:04:19 | Araq | hmm ok |
23:04:21 | FromGitter | <kaushalmodi> Things that change between the 2 tests: dir name, Nim prj name, Nim doc switches |
23:05:02 | xace | Vindaar: That is awesome, I'm keeping my eyes on the project. looking forward to render my data in a decent manner with nim :) |
23:14:57 | FromGitter | <kaushalmodi> @Vindaar awesome! Can you also commit the example code to generate the plots you have in README.org? |
23:16:59 | * | rnrwashere joined #nim |
23:21:31 | * | rnrwashere quit (Ping timeout: 248 seconds) |
23:21:52 | FromGitter | <Vindaar> the code to generate the plots is also still at the bottom of the `ggplotnim.nim` file: https://github.com/Vindaar/ggplotnim/blob/master/ggplotnim.nim#L358-L370 ⏎ Unless you mean the actual drawing part, which is currently still handled in `ggsave` above that |
23:28:32 | * | jasper joined #nim |
23:48:45 | * | rnrwashere joined #nim |