00:01:29 | * | thomasross is now known as Guest50548 |
00:01:29 | * | thomasross_ joined #nim |
00:01:29 | * | Guest50548 quit (Killed (card.freenode.net (Nickname regained by services))) |
00:01:29 | * | thomasross_ is now known as thomasross |
00:06:03 | xace | if ext not in [ ".jpg", ".png" ]: # is there a way to use `not` in this scenario? |
00:06:18 | disruptek | try notin |
00:06:33 | xace | thanks, that worked |
00:16:07 | * | sentreen_ quit (Ping timeout: 268 seconds) |
00:29:43 | * | sentreen_ joined #nim |
00:30:18 | * | krux02_ joined #nim |
00:34:17 | * | krux02 quit (Ping timeout: 265 seconds) |
00:44:02 | * | krux02_ quit (Remote host closed the connection) |
00:48:59 | * | clyybber quit (Quit: WeeChat 2.6) |
01:09:29 | * | uu91 quit (Ping timeout: 250 seconds) |
01:10:14 | * | uu91 joined #nim |
01:24:55 | FromDiscord_ | <Winton> who is encouraged to create a Emulator Server |
01:28:21 | disruptek | not me. |
01:28:58 | madprops | is there a needed web service missing on mim? Like what the playground, docs, etc are. I could help on that |
01:29:03 | madprops | nim* |
01:30:04 | zedeus | maybe you could help improve the nimble directory? https://github.com/FedericoCeratto/nim-package-directory |
01:45:32 | disruptek | if my name were martin, i'd be in the olympics. |
01:45:39 | disruptek | just think about that. |
02:04:29 | * | ponyrider joined #nim |
02:04:36 | * | ponyrider quit (Client Quit) |
02:25:04 | * | sealmove quit (Quit: WeeChat 2.6) |
02:31:47 | FromDiscord_ | <Xydium> I'm trying to learn Nim by writing a state-search library, but I'm not sure if my design (https://pastebin.com/rxg28B9n) is simple/efficient. Anyone have any advice? |
02:32:45 | * | waterthese joined #nim |
02:33:26 | * | waterthese left #nim (#nim) |
02:34:26 | disruptek | xydium: https://github.com/Xe/mapatei/blob/master/src/mapatei/fsm.nim |
02:48:59 | * | uu91 quit (Read error: Connection reset by peer) |
02:49:13 | * | uu91 joined #nim |
03:11:36 | FromDiscord_ | <Rika> madprops, no I don't think so |
03:39:18 | * | endragor joined #nim |
04:08:53 | * | tklohna quit (Ping timeout: 276 seconds) |
04:09:16 | * | tklohna joined #nim |
04:14:16 | * | chemist69 quit (Ping timeout: 252 seconds) |
04:14:19 | * | uu91 quit (Read error: Connection reset by peer) |
04:14:35 | * | uu91 joined #nim |
04:16:09 | * | chemist69 joined #nim |
04:18:25 | * | tklohna quit (Ping timeout: 250 seconds) |
04:19:56 | * | tklohna joined #nim |
04:31:25 | * | rockcavera quit (Remote host closed the connection) |
04:38:21 | * | nsf joined #nim |
04:38:51 | * | tklohna quit (Ping timeout: 265 seconds) |
04:39:23 | FromGitter | <zacharycarter> @mratsim ooh good tip - thanks! |
04:40:29 | * | tklohna joined #nim |
04:43:57 | * | dddddd quit (Remote host closed the connection) |
04:55:59 | FromGitter | <s0kil> How could I tell `proc debug[T](x: T) {.importc: "console.log", varargs.}` to use cstring, so I don't get output like this when trying to print a string: ⏎ `[82, 101, 113, 117, 101, 115, 116, 105, 110, 103, 32, 82, 111, 117, 116, 101, 58, 32] "about"` |
04:58:55 | FromGitter | <s0kil> I'm using it as: `debug("Requesting Route: ", href)` |
05:14:57 | * | njoseph quit (Ping timeout: 240 seconds) |
05:18:26 | * | tklohna quit (Ping timeout: 276 seconds) |
05:18:52 | * | tklohna joined #nim |
05:23:50 | * | tklohna quit (Ping timeout: 268 seconds) |
05:24:17 | * | uu91 quit (Ping timeout: 276 seconds) |
05:24:38 | * | uu91 joined #nim |
05:26:40 | * | tklohna joined #nim |
05:29:25 | * | njoseph joined #nim |
05:31:58 | * | tklohna quit (Ping timeout: 245 seconds) |
05:32:34 | * | cherrypie joined #nim |
05:32:44 | * | cherrypie is now known as blueberrypie |
05:34:35 | * | bacterio joined #nim |
05:37:24 | * | tklohna joined #nim |
05:45:57 | * | tklohna quit (Ping timeout: 240 seconds) |
05:46:23 | * | tklohna joined #nim |
05:48:58 | * | Araq quit (*.net *.split) |
05:48:59 | * | acidx quit (*.net *.split) |
05:49:00 | * | gsingh93 quit (*.net *.split) |
05:54:54 | * | Araq joined #nim |
05:54:54 | * | acidx joined #nim |
05:54:54 | * | gsingh93 joined #nim |
06:08:22 | * | nif quit (Quit: ...) |
06:08:29 | * | ltriant quit (Quit: leaving) |
06:08:31 | * | nif joined #nim |
06:12:28 | * | narimiran joined #nim |
06:14:49 | * | nif quit (Quit: ...) |
06:14:58 | * | nif joined #nim |
06:31:03 | * | njoseph quit (Ping timeout: 268 seconds) |
06:32:05 | * | bacterio quit (Read error: Connection reset by peer) |
06:37:05 | * | njoseph joined #nim |
06:37:30 | * | bacterio joined #nim |
06:42:27 | madprops | trying to figure out how to get an instance of Ipc_perm from the posix module |
06:46:56 | * | njoseph quit (Ping timeout: 265 seconds) |
06:47:05 | * | tklohna quit (Ping timeout: 268 seconds) |
06:47:29 | * | tklohna joined #nim |
06:52:50 | * | njoseph joined #nim |
06:58:11 | * | njoseph quit (Ping timeout: 268 seconds) |
07:02:18 | * | njoseph joined #nim |
07:09:19 | * | LargeEpsilon joined #nim |
07:09:24 | * | solitudesf- joined #nim |
07:21:17 | * | njoseph quit (Ping timeout: 276 seconds) |
07:28:30 | * | njoseph joined #nim |
07:28:58 | * | clyybber joined #nim |
07:40:37 | * | njoseph quit (Ping timeout: 240 seconds) |
07:41:56 | * | njoseph joined #nim |
07:47:56 | * | njoseph quit (Ping timeout: 276 seconds) |
07:52:14 | * | PMunch joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:40 | * | njoseph joined #nim |
08:01:50 | FromDiscord_ | <itmuckel> Hey guys! When I use `glGetString(GL_VERSION)` I get a `ptr GLubyte`. How do I turn that into a string? 🤔 |
08:03:04 | * | nif quit (Quit: ...) |
08:03:14 | * | nif joined #nim |
08:05:03 | * | gmpreussner joined #nim |
08:06:23 | clyybber | cast it to a cstring |
08:08:43 | lqdev[m] | var str = newString(openGlStringLen); copyMem(str[0].unsafeAddr, openGlString[0].unsafeAddr, openGlStringLen) |
08:09:19 | lqdev[m] | if the string is null-terminated, you can simply $cast[cstring](openGlString) |
08:13:24 | lqdev[m] | @itmuckel |
08:17:03 | * | LargeEpsilon quit (Remote host closed the connection) |
08:17:23 | * | LargeEpsilon joined #nim |
08:20:52 | clyybber | glGetString does return a null terminated string |
08:21:10 | clyybber | Also tagging doesn't work from IRC to discord |
08:21:41 | FromDiscord_ | <Clyybber> have to do it in discord itself |
08:21:45 | FromDiscord_ | <Clyybber> @itmuckel |
08:22:10 | FromDiscord_ | <itmuckel> 😲 |
08:22:49 | * | njoseph quit (Ping timeout: 250 seconds) |
08:23:36 | FromDiscord_ | <itmuckel> Thanks! Directly casting to cstring did the job. 👌 |
08:23:38 | Araq | fix the wrapper already so that it returns a 'cstring' |
08:29:41 | PMunch | Hmm, is there a way to make Nim generate code like "const unsigned char PROGMEM background[] = {1, 2, 3, 4}" as a top level statement? |
08:32:45 | PMunch | I have tried "let background {.codegenDecl: "const $# PROGMEM $#".}: array[10, cuchar] = [1.cuchar, 2.cuchar, 3.cuchar, 4.cuchar]" but that doesn't work as it generates the x variable as a top level statement with the correct type, and then another top level statement with "NIM_CONST tyArray TM = {1, 2, 3, 4}" and then in NimMainModule it does a nimCopyMem to copy one over to the other |
08:32:52 | PMunch | Which of course is completely pointless |
08:43:19 | Araq | it's an important feature request, I'll do a live coding session about it |
08:47:34 | Zevv | PMunch: right, that is what I was suggesting yesterday. |
08:48:02 | Zevv | but you would still need all the nonportable hassle to do memcpys from progmem to ram |
08:48:11 | * | ng0 joined #nim |
08:48:40 | Zevv | it would be pretty cool if nim could abstract that away, make some data type that allows mapping const objects on progmem and use the objects just as if the were in ram |
08:51:38 | PMunch | Wait, you suggested this yesterday? |
08:52:16 | PMunch | For the specific thing I wanted to do right now it's not a huge issue. I'm writing a macro that allows you to write "sprites" directly in your code for the Arduboy |
08:52:41 | PMunch | So since it's a macro I can just manually generate the emit statement |
08:55:24 | Zevv | good enough |
08:55:43 | clyybber | PMunch, Araq: How should it look like? `const {.addressable.}` or just a global let? |
08:57:37 | Araq | global let |
08:58:42 | clyybber | But that means that global lets wont work at runtime anymore, would it? |
09:00:26 | FromDiscord_ | <mratsim> @Xydium: https://nimble.directory/pkg/negamax |
09:01:52 | FromDiscord_ | <mratsim> seems like it's really simple |
09:06:37 | * | floppydh joined #nim |
09:07:58 | FromGitter | <zacharycarter> mratsim: probably going to try out your union approach this evening - although it will be interesting to see how the union makes it to the shader from the vertex buffer |
09:08:29 | FromGitter | <zacharycarter> the whole problem is a bit weird - I'm setting up the vertex buffer attribute as four float values |
09:09:03 | FromGitter | <zacharycarter> I need the values to not be interpolated, so on the shader side of things I'm using vec4s with the flat attribute so no interpolation is performed per fragment / vertex |
09:09:46 | FromGitter | <zacharycarter> originally I had the varyings in the vertex / fragment shaders as ivec4s - but metal doesn't like the fact that the vertex buffer attribute is four floats, and that the varyings in the shader are ivec4s |
09:10:08 | FromGitter | <zacharycarter> so I tried changing the ivec4 to a vec4, and then manually constructing an ivec4 in the vertex shader using the values from the vec4 varying |
09:10:18 | FromGitter | <zacharycarter> but in the fragment shader, the values all come through as zeros for the ivec4 |
09:10:29 | FromGitter | <zacharycarter> weird shaiba |
09:13:51 | FromGitter | <zacharycarter> and all this hooplah because bgfx doesn't support int32/uint32 vertex buffer attributes |
09:15:20 | * | fredrik92 quit (Quit: Client disconnecting) |
09:18:44 | clyybber | Why not just open an issue on bgfx? |
09:22:18 | FromGitter | <zacharycarter> well - I'm in their gitter as well |
09:22:39 | FromGitter | <zacharycarter> I might just be doing something stupid - not sure if there's any actual issue or not, most likely it's me doing something stupid |
09:23:07 | FromGitter | <zacharycarter> how's the vulkan stuff going? |
09:25:07 | clyybber | Working on something else ATM, but Kaynato has done some GPU compute stuff with my bindings lately |
09:26:25 | FromGitter | <zacharycarter> nice |
09:27:01 | * | luis_ joined #nim |
09:31:58 | * | bacterio quit (Read error: Connection reset by peer) |
09:32:31 | PMunch | Hmm, how can I importc the variable I created with "emit"? |
09:33:59 | PMunch | So my macro spits out: {.emit: "/*VARSECTION*/\nconst unsigned char PROGMEM mySprite[] = {4, 5, 233, 158, 144};".} |
09:34:23 | PMunch | And I want to be able to pass that as a ptr uint8 in my program |
09:35:40 | FromDiscord_ | <mratsim> @Clyybber but now he is stuck in making Arraymancer or Arrayfire or any tensor library work on Cuda windows :/ |
09:36:40 | clyybber | mratsim: That was the motivation to use vulkan compute |
09:37:29 | * | chemist69 quit (Quit: WeeChat 2.6) |
09:38:24 | * | chemist69 joined #nim |
09:43:56 | * | Vladar joined #nim |
09:45:04 | * | njoseph joined #nim |
09:45:44 | PMunch | Hmm, is this not possible? |
09:50:12 | FromGitter | <zacharycarter> PMunch: https://play.nim-lang.org/#ix=231Z |
09:50:30 | FromGitter | <zacharycarter> apparently this works too: https://play.nim-lang.org/#ix=2320 |
09:50:59 | FromGitter | <zacharycarter> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-emit-pragma - is where `NIM_EXTERNC` is described |
09:52:11 | PMunch | Ahh |
09:52:20 | PMunch | Hmm, it creates a new symbol though.. |
09:52:40 | PMunch | Which is why it was failing for me |
09:53:18 | PMunch | It creates a "extern NU8* mySprite;" when I give it "var mySprite: ptr uint8" |
09:53:30 | PMunch | Oops, with {.importc.} of course |
09:53:49 | * | njoseph quit (Ping timeout: 250 seconds) |
09:54:16 | * | jeyr joined #nim |
09:55:33 | * | luis_ quit (Ping timeout: 250 seconds) |
09:55:52 | PMunch | Hmm, so I guess it's because I'm unable to create the correct type.. |
09:57:43 | * | njoseph joined #nim |
10:03:04 | PMunch | var mySprite {.codegenDecl: "#define $2 mySprite //".}: ptr uint8 |
10:03:22 | PMunch | I this is my ugliest hack to date :P |
10:03:52 | PMunch | (By the way the // is to ignore the ; that Nim appends to these strings) |
10:04:32 | PMunch | Is it pretty? Hell no! Does it work? Surprisingly yes :) |
10:05:59 | * | jeyr quit (Quit: jeyr) |
10:07:30 | * | njoseph quit (Ping timeout: 268 seconds) |
10:09:10 | * | njoseph joined #nim |
10:13:11 | FromDiscord_ | <mratsim> Did you feel the force of the SQL injection when you did this hack? |
10:14:39 | * | luis_ joined #nim |
10:18:59 | madprops | how much does the GC affects performance realistically? |
10:20:11 | PMunch | mretsim, haha this should actually be fairly safe |
10:20:42 | PMunch | The $2 is the only thing that is injected, and it is a Nim-obfuscated variable name |
10:20:46 | FromDiscord_ | <itmuckel> Hey guys! Using `opengl 1.2.3` I get a black screen on Linux, but not on Windows. I got the latest mesa driver and context creation works and all. Anyone had the problem too? I use sdl2 for context creation, but everything works fine, like I said. |
10:20:47 | FromDiscord_ | <itmuckel> |
10:20:47 | FromDiscord_ | <itmuckel> Are there alternatives? I tried generating gl bindings with the `glad` webservice, but that `gl.nim` file gives me compiler errors for example for `GL_TIMEOUT_IGNORED*: uint64 = uint64(0xFFFFFFFFFFFFFFFF)`. 🤔 |
10:22:53 | Araq | madprops, it's almost always an issue and why I'm looking forward to --gc:arc so much |
10:22:54 | FromDiscord_ | <itmuckel> Oh, the context is OpenGL 4.5 |
10:23:50 | Araq | not because --gc:arc is faster. because it gives us much of the control back that we need to |
10:24:19 | Araq | have in order to optimize the code to the levels we want to |
10:24:35 | madprops | not sure what arc is |
10:25:26 | madprops | but im guessing some why to establish intelligent algorithms to make gc kick in at good times |
10:25:35 | madprops | way* |
10:25:54 | Araq | no, it's refcounting optimized via Nim's move semantics |
10:26:41 | madprops | idk but that kinda sounds like rust's borrowing system? |
10:27:07 | madprops | that would be interesting |
10:27:09 | Araq | no, Rust's move semantics are orthogonal to Rust's borrowing system |
10:27:34 | Araq | and C++ has them too |
10:27:51 | Araq | Nim's design is actually closer to C++'s, I think |
10:28:03 | Araq | except that we do it better ;-) |
10:31:30 | FromDiscord_ | <00imvj00> Hello, just wanted to say hello to nim community. new user here. |
10:31:55 | FromDiscord_ | <00imvj00> How is the async story for Nim? i really want to explore for communication services. |
10:34:12 | Araq | well we have async in the core and the next "generation" via 'Chronos' |
10:34:29 | * | thomasross_ joined #nim |
10:34:29 | * | thomasross quit (Killed (wolfe.freenode.net (Nickname regained by services))) |
10:34:29 | * | thomasross_ is now known as thomasross |
10:37:10 | Araq | it works well. |
10:51:08 | * | dv` joined #nim |
10:52:30 | dv` | Is there an easy way to run a command at compile time and store the output in a string? I tried eg. const version = execProcess "git describe --tags" but I get a compile error saying that importc can't be used at compile time |
10:55:29 | * | Perkol joined #nim |
10:56:37 | * | solitudesf- quit (Ping timeout: 240 seconds) |
10:57:40 | FromDiscord_ | <mratsim> staticExec / gorge |
10:58:07 | FromDiscord_ | <mratsim> not sure you can store the output directly, you would have to put it in a file and staticRead/slurp it |
10:58:42 | FromDiscord_ | <mratsim> for compiletime FFI there is a hidden flag, look for compiletime ffi on the tracker, it was added by timotheecour |
10:58:52 | dv` | Oh great, that looks like what I want. Thanks |
10:59:29 | Araq | const gitHash = gorge("git log -n 1 --format=%H").strip |
10:59:32 | FromDiscord_ | <mratsim> so what's the status of araqsgc vs gc:arc? |
10:59:36 | Araq | is what the Nim compiler itself uses |
11:01:03 | Araq | mratsim: gc:arc is easier to develop as it's not a hybrid solution |
11:04:25 | FromDiscord_ | <mratsim> btw, I used a mix of mimalloc and snmalloc design (message-passing based Microsoft allocators) for my new thread-safe memory pools |
11:04:28 | madprops | wondering if there's a built in way to walk inside a directory recursively, to check total size |
11:04:58 | * | couven92 joined #nim |
11:04:58 | madprops | not sure if walkdirs does it |
11:05:08 | madprops | but maybe /some/dir/* ? |
11:05:16 | clyybber | Araq: Why are extra opCodes needed for addr(a.x) ? Does the VM not have the concept of Lvalues? |
11:05:36 | FromDiscord_ | <mratsim> available here: https://github.com/mratsim/weave/blob/memory-pool/weave/memory/memory_pools.nim |
11:08:53 | FromDiscord_ | <Lantos> Hey guys trying to use nim at work. Stuck behind a proxy. |
11:08:53 | FromDiscord_ | <Lantos> I can access npm through the proxy with |
11:08:53 | FromDiscord_ | <Lantos> http_proxy=http://domain%5cusername:password@proxy:port |
11:08:54 | FromDiscord_ | <Lantos> |
11:08:54 | FromDiscord_ | <Lantos> Trying nimble with the following in the nimble.ini |
11:08:54 | FromDiscord_ | <Lantos> Httpproxy= "http://domain\\username: password@proxy:port" |
11:08:55 | FromDiscord_ | <Lantos> |
11:08:58 | FromDiscord_ | <Lantos> Is failing the domain\\user is doing some odd encoding see with npm I am running %5c to represent \ |
11:08:59 | FromDiscord_ | <Lantos> |
11:09:00 | FromDiscord_ | <Lantos> Any ideas? |
11:09:26 | * | FromGitter quit (Read error: Connection reset by peer) |
11:09:44 | * | FromGitter joined #nim |
11:10:27 | FromDiscord_ | <mratsim> you managed to get through the proxy for npm? |
11:14:09 | FromDiscord_ | <Lantos> Yeah |
11:14:12 | * | luis_ quit (Quit: luis_) |
11:14:15 | Araq | clyybber, think about it |
11:14:33 | FromDiscord_ | <Lantos> It was a pain. The windows domain is the issue |
11:14:40 | Araq | here is what you cannot do for 'addr(obj.field)': |
11:14:58 | Araq | - evaluate obj.field, store it as 'tmp' |
11:15:05 | Araq | - take the address of 'tmp'. |
11:15:24 | FromDiscord_ | <Lantos> The windows name domain\username |
11:15:24 | FromDiscord_ | <Lantos> Is causing an issue withe the backslash I think |
11:15:45 | Araq | 'addr' is a very unusual function |
11:16:04 | Araq | so it needs special opcodes |
11:17:56 | Araq | btw clyybber we don't destroy nkObjDownConv(f(...)) properly |
11:18:01 | Araq | :-( |
11:18:13 | Araq | because of that non-sense p vs pArg split |
11:18:23 | clyybber | damn |
11:18:43 | clyybber | do you want to unify it or shall I try? |
11:19:23 | Araq | there is really only 2 different cases: we construct a thing and know where it will end up (moveOrCopy) or we need to bind it to a temporary (p/pArg) |
11:20:32 | Araq | clyybber, please give it a try, test program: |
11:20:35 | FromGitter | <alehander92> Araq how would arc help with async |
11:21:27 | FromGitter | <alehander92> i was just looking at some of its internals and tried to see where it fits |
11:22:19 | ehmry | FWIW I started writing a networking frontend to replace sockets https://git.sr.ht/~ehmry/nim_taps, the abstract interface is coming from the IETF and there should be an RFC for it next year |
11:22:33 | FromGitter | <alehander92> also, is there any possibility to optimize out closures |
11:22:43 | FromGitter | <alehander92> if e.g. one can detect the future cant outlive |
11:22:47 | Araq | https://github.com/nim-lang/Nim/issues/12758 |
11:22:49 | disbot | ➥ --gc:arc wrong refcounting @11Araq; snippet at https://play.nim-lang.org/#ix=232p 😏 |
11:22:50 | FromGitter | <alehander92> the data it depends on |
11:23:45 | Araq | clyybber, why can't I assign you to the issue? |
11:23:48 | clyybber | Araq: Ok, will do. Btw, since you marked 12282 as easy, do you have a fix? |
11:23:51 | clyybber | Araq: Dunno |
11:24:03 | Araq | wanna be a core deve? |
11:24:14 | clyybber | o/ yes |
11:24:45 | narimiran | woohoo, welcome clyybber! :) |
11:25:09 | FromGitter | <alehander92> finally ! |
11:25:17 | clyybber | :D |
11:25:45 | Araq | is your nick the same on github? two y and two b? |
11:25:50 | clyybber | Yeah |
11:25:50 | FromDiscord_ | <mratsim> @alehander42 for my multithreading runtime I use lazyFutures, they are stack allocated via alloca https://github.com/mratsim/weave/blob/memory-pool/weave/datatypes/flowvars.nim#L61-L68 |
11:25:50 | FromDiscord_ | <mratsim> And when I detect that they will escape because they will be stolen by another thread, I heap allocate them lazily: https://github.com/mratsim/weave/blob/memory-pool/weave/victims.nim#L164-L201 |
11:26:00 | FromGitter | <alehander92> btw "# TODO: Once https://github.com/nim-lang/Nim/issues/5617 is fixed. ⏎ ⏎ ```# TODO: Add line info to the complete() call!" in asyncdispatch``` [https://gitter.im/nim-lang/Nim?at=5ddfaec8114bb60b7870a26b] |
11:26:01 | disbot | ➥ Ability to set a NimNode's lineinfo @11dom96 |
11:26:15 | FromGitter | <alehander92> this issue is fixed, is this a problem anyone experienced |
11:26:21 | FromGitter | <alehander92> because then it can be fixed i guess |
11:26:23 | * | Vladar quit (Quit: Leaving) |
11:26:51 | Araq | alehander92: closures can be optimized much like other "partial object constructions" |
11:27:19 | FromGitter | <alehander92> mratsim nice |
11:27:22 | Araq | but in Nim most closures do escape when they don't, Nim offers the 'mapIt' etc constructs |
11:27:26 | FromGitter | <alehander92> but is this applicable to single-threaded async |
11:27:45 | Araq | and even worse, closures in Nim introduce memory cycles |
11:27:48 | FromGitter | <alehander92> Araq yeah i wondered specifically about async |
11:27:58 | FromGitter | <alehander92> because it seemed harder to me to detect those cases |
11:28:16 | Araq | async is all about moving stuff from the stack to the heap and to nuke the stack |
11:28:29 | FromGitter | <alehander92> which doesnt sound great to me :D |
11:28:52 | * | rockcavera joined #nim |
11:28:53 | clyybber | Araq: Nice, it worked. Assigned myself |
11:29:12 | Araq | it's the point of async, otherwise we would be talking about "coroutines" |
11:30:32 | Araq | but here is what --gc:arc does: it avoids an entire subsystem of Nim, the conversative stack tracing |
11:30:36 | FromGitter | <alehander92> hm, i wonder if one can implement async sugar on top of coroutines |
11:30:45 | FromGitter | <alehander92> i am not sure how other "partial object constructions" are optimized |
11:30:58 | Araq | so you can have as many stacks as you want to |
11:31:29 | Araq | and so coroutines become much easier and than you can build async on top of coroutines |
11:31:41 | FromGitter | <alehander92> does this mean you can have a bigger stack |
11:31:45 | FromGitter | <alehander92> or just many smaller stacks |
11:32:09 | Araq | the "GC" doesn't need to understand/know about the involved stacks |
11:32:20 | Araq | so you can do the usual setcontext hacks |
11:32:46 | FromDiscord_ | <mratsim> @alehander42 I don't know, if it can be adapted. Maybe, but what makes it possible is that I package everything into a task and a Flowvar is just a channel |
11:33:35 | FromGitter | <alehander92> so does this mean |
11:34:09 | FromGitter | <alehander92> sorry i dont understand most of it |
11:34:12 | FromGitter | <alehander92> but i'll learn |
11:34:38 | FromGitter | <alehander92> ok, so those stacks are the existing stacks of previous calls and you jump between them |
11:34:58 | FromDiscord_ | <mratsim> regarding other super low-level closures and stack management. This repo is very impressive, the overhead is very very low, and "closures" are saved and restored from any thread: https://github.com/chaoran/fibril/blob/master/src/fibrili.c#L29-L73 |
11:35:04 | * | LargeEpsilon quit (Ping timeout: 268 seconds) |
11:35:09 | FromDiscord_ | <mratsim> also the code is minimal |
11:35:54 | FromDiscord_ | <mratsim> I still can't reach it's performance on silly fib(40) (40% more overhead), but I have 25% less overhead that the next best |
11:36:46 | FromDiscord_ | <mratsim> Paper should be applicatble to coroutines as well: https://github.com/chaoran/fibril/blob/master/src/fibrili.c#L29-L73 |
11:36:56 | FromDiscord_ | <mratsim> sorry: http://chaoran.me/assets/pdf/ws-spaa16.pdf |
11:37:46 | FromDiscord_ | <mratsim> and I explain the challenges of "cactus stacks" here: https://github.com/mratsim/weave/blob/memory-pool/weave/memory/multithreaded_memory_management.md#the-cactus-stack |
11:40:48 | * | Perkol quit (Remote host closed the connection) |
11:41:36 | FromDiscord_ | <mratsim> A basic closure stack that you can save/restore would probably be awesome for both async and threading |
11:43:20 | * | uu91 quit (Read error: Connection reset by peer) |
11:43:38 | * | uu91 joined #nim |
11:51:41 | * | thomasross quit (Ping timeout: 250 seconds) |
11:51:59 | * | thomasross joined #nim |
11:52:52 | Araq | clyybber, the *real* question is why the VM doesn't need a special opcode for 'addr obj.field.field' ;-) |
11:52:53 | * | uu91 quit (Read error: Connection reset by peer) |
11:53:28 | Araq | and it's because 'let tmp = obj.field; addr(tmp.field)' is good enough due to the PNode representation in the VM |
11:53:41 | clyybber | ah, I was wondering about that |
11:54:02 | * | uu91 joined #nim |
11:54:35 | clyybber | Araq: Does the VM have a different representation of var as opposed to a hidden pointer? |
11:56:47 | clyybber | I was wondering, because your PR says its `var T` improvements too |
11:57:05 | Araq | var T is mapped to 'addr' in the frontend |
11:57:11 | Araq | quite early |
11:57:20 | Araq | (bad idea but it's a legacy) |
11:57:27 | clyybber | Agh, so we need extra op codes for #12282 too? |
11:57:29 | disbot | https://github.com/nim-lang/Nim/issues/12282 -- 3var param with type conversion doesn't work in VM @11Clyybber; snippet at 12https://play.nim-lang.org/#ix=22XY 😏 |
11:57:48 | Araq | clyybber, no why, as I said 'var T' is mapped to 'addr' |
11:58:37 | clyybber | yeah, so its essentially `addr SomeTaintedString.string` |
11:58:40 | Araq | the issue is "easy" because inside the VM we must not lose lvalue-ness accross type conversions |
11:58:48 | clyybber | Ah |
11:58:51 | clyybber | Right. |
12:00:31 | Araq | in the vmgen you can add a check for "trivial distinctness type conversions" |
12:01:36 | Araq | the C codegen does it too |
12:03:09 | clyybber | nice, might want to tell that to krux02 because I think he attempted to solve that issue too, didn't he? |
12:03:25 | clyybber | I will try to fix it after the gc:arc thingy |
12:03:34 | Araq | no, he worked on something else |
12:05:03 | clyybber | ah, right, that was the thing that was fixed with the new opcodes. |
12:10:53 | Araq | unfortunately it doesn't fix "mitems at compile-time" |
12:11:03 | Araq | we'll get there |
12:20:38 | madprops | is there a lib for iterating inside directory's content recursively? I just want to get the total size of directories |
12:20:48 | madprops | like 4mb or whatever |
12:22:52 | madprops | oh wait im getting somewhere with */* |
12:22:56 | madprops | but i wonder if that's just 1 level |
12:23:44 | * | LargeEpsilon joined #nim |
12:23:57 | madprops | hmm yeah doesn't work |
12:26:07 | PMunch | Hmm, can't methods be used on compile-time? |
12:26:38 | PMunch | I'm trying to read PNG files on compile-time and convert them to an internal representation byte array |
12:27:19 | FromGitter | <alehander92> when you debug your code |
12:27:23 | FromGitter | <alehander92> trying to understand what is missing |
12:27:36 | FromGitter | <alehander92> you fix some stuff which actually might be a bug as well and you get to |
12:27:54 | FromGitter | <alehander92> <actualmethod which does the important stuff>: discard |
12:28:32 | * | LargeEpsilon quit (Ping timeout: 252 seconds) |
12:29:04 | madprops | ok got it. i can do it with walkDirRec |
12:32:25 | * | LargeEpsilon joined #nim |
12:42:04 | FromDiscord_ | <mratsim> @PMunch methods are for dynamic types |
12:42:16 | FromDiscord_ | <mratsim> types at compile-time are staic |
12:42:43 | FromGitter | <alehander92> but they can still be "dynamic" in theory |
12:43:01 | FromGitter | <alehander92> you can implement inheritance/methods in the vm |
12:43:10 | FromGitter | <alehander92> i am not sure if it would make sense |
12:43:15 | PMunch | Hmm, so there is no way to run nimPNG on compile-time then.. |
12:43:43 | FromGitter | <alehander92> think vm, not comptime imo |
12:43:57 | PMunch | Same difference |
12:44:16 | FromGitter | <alehander92> it even seems that there should be inheritance support in vm ? |
12:45:13 | PMunch | Ugh, I really didn't feel like creating my own PNG parser atm.. |
12:46:36 | FromDiscord_ | <mratsim> @alehander42: https://danielkorn.io/images/debugging-xkcd.png (can't find the original xkcd) |
12:47:19 | PMunch | https://xkcd.com/1722/ |
12:51:06 | * | eys joined #nim |
12:52:08 | PMunch | Damn it nimBMP uses addr so that doesn't work either.. |
12:59:14 | FromGitter | <alehander92> mratsim sorry |
12:59:22 | FromGitter | <alehander92> debugging is bizarre |
12:59:26 | FromGitter | <alehander92> yeahh |
13:00:11 | FromGitter | <alehander92> and i dont even usually debug directly low level asm stuff as some of you guys :D |
13:00:33 | FromGitter | <alehander92> what was the hardest bug to debug for any of you |
13:03:22 | PMunch | Oh, streams don't work on compile-time.. |
13:04:45 | clyybber | They do, parts of them |
13:05:22 | PMunch | Well, "newStringStream" and readStr(2) didn't work.. |
13:06:07 | clyybber | newStringStream *should* work |
13:06:29 | clyybber | see its in the tests: https://github.com/nim-lang/Nim/pull/12284/files#diff-93574743bf0f766ad08398709499ef6aR15 |
13:06:31 | disbot | ➥ More of StringStream now works at compile time @11Clyybber |
13:08:48 | * | lritter joined #nim |
13:10:13 | * | krux02 joined #nim |
13:14:54 | * | LEdoian[m] quit (Read error: Connection reset by peer) |
13:14:56 | * | Manny8888 quit (Read error: Connection reset by peer) |
13:14:56 | * | joachimschmidt55 quit (Read error: Connection reset by peer) |
13:14:56 | * | isaac[m]1 quit (Read error: Connection reset by peer) |
13:15:00 | * | d-nice2[m] quit (Write error: Connection reset by peer) |
13:15:03 | * | shashlick[m] quit (Remote host closed the connection) |
13:15:04 | * | GitterIntegratio quit (Write error: Connection reset by peer) |
13:15:05 | * | Connor[m] quit (Read error: Connection reset by peer) |
13:15:08 | * | zielmicha[m]1 quit (Remote host closed the connection) |
13:15:11 | * | spymasterd[m] quit (Read error: Connection reset by peer) |
13:15:12 | * | macsek1911[m] quit (Write error: Connection reset by peer) |
13:15:15 | * | Balu[m] quit (Remote host closed the connection) |
13:15:17 | * | TheManiac[m] quit (Write error: Connection reset by peer) |
13:15:18 | * | Mike[m]2 quit (Read error: Connection reset by peer) |
13:15:18 | * | skrylar[m] quit (Read error: Connection reset by peer) |
13:15:18 | * | nc-x[m] quit (Read error: Connection reset by peer) |
13:15:21 | * | lqdev[m] quit (Remote host closed the connection) |
13:15:21 | * | salotz[m] quit (Remote host closed the connection) |
13:15:22 | * | xomachine[m] quit (Remote host closed the connection) |
13:15:24 | * | k0mpjut0r quit (Read error: Connection reset by peer) |
13:15:24 | * | planetis[m] quit (Remote host closed the connection) |
13:15:24 | * | Asbrn[m] quit (Remote host closed the connection) |
13:15:24 | * | zacharycarter[m] quit (Remote host closed the connection) |
13:15:27 | * | yglukhov[m] quit (Remote host closed the connection) |
13:15:27 | * | M948e5[m] quit (Remote host closed the connection) |
13:15:27 | * | leorize[m] quit (Remote host closed the connection) |
13:15:28 | * | Demos[m] quit (Remote host closed the connection) |
13:15:28 | * | BitPuffin quit (Remote host closed the connection) |
13:15:29 | * | Miguelngel[m] quit (Remote host closed the connection) |
13:15:29 | * | pigmej quit (Write error: Connection reset by peer) |
13:15:30 | * | meff[m] quit (Read error: Connection reset by peer) |
13:15:32 | * | nergal[m]1 quit (Remote host closed the connection) |
13:15:32 | * | lasso[m] quit (Remote host closed the connection) |
13:18:31 | * | endragor quit (Remote host closed the connection) |
13:27:18 | * | eys quit (Quit: eys) |
13:29:20 | PMunch | clybber, weird I just get the `addr` has limited support in VM |
13:29:44 | PMunch | When I try to do var myStr = staticRead("somefile"); var myStream = newStringStream(myStr) |
13:31:42 | PMunch | https://play.nim-lang.org/#ix=232D |
13:32:13 | FromGitter | <alehander92> can you call |
13:32:15 | FromGitter | <alehander92> staticExec |
13:32:19 | FromGitter | <alehander92> and serialize the output |
13:32:34 | PMunch | Huh? |
13:32:45 | FromGitter | <alehander92> for example |
13:32:47 | FromGitter | <alehander92> call a program |
13:32:48 | * | Hideki_ joined #nim |
13:32:52 | FromGitter | <alehander92> which does the nim image thing |
13:32:57 | FromGitter | <alehander92> and returns a serialized data structure |
13:33:02 | FromGitter | <alehander92> and deserialize it on compile time |
13:33:06 | FromGitter | <alehander92> this is sometimes a workaround |
13:33:09 | FromGitter | <alehander92> for ct code |
13:33:19 | PMunch | Sure.. |
13:33:20 | FromGitter | <alehander92> basically wrapping nim runtime code to run on ct |
13:33:27 | PMunch | But then I need to write a little program and stuff |
13:33:33 | FromGitter | <alehander92> imo one can write it as a lib |
13:33:38 | FromGitter | <alehander92> and reuse it for many cases |
13:33:41 | FromGitter | <alehander92> something like |
13:33:51 | FromGitter | <alehander92> staticRunMyType ("module") |
13:34:30 | FromGitter | <alehander92> `staticRun[MyType]("module")` |
13:34:37 | PMunch | Better yet, staticRun(myProc) which takes the implementation and writes it to a file, then compile and run it, and deserelises the output |
13:35:00 | FromGitter | <alehander92> yes thats very smart :P |
13:35:21 | PMunch | Hmm, can I echo without newline on compile-time? |
13:35:26 | PMunch | stdout.write doesn't work.. |
13:35:42 | FromGitter | <alehander92> but it needs to cache the compiled helper preferrably somehow |
13:35:49 | PMunch | Would need to grab all imports and such as well.. |
13:35:49 | FromGitter | <alehander92> but otherwise i love it :D |
13:35:50 | * | tklohna quit (Ping timeout: 265 seconds) |
13:36:08 | PMunch | And some kind of marshaller for the type |
13:36:16 | FromGitter | <alehander92> well you should be able to reuse |
13:36:22 | FromGitter | <alehander92> some of the json libs |
13:36:26 | FromGitter | <alehander92> if any of them works on CT |
13:36:38 | FromGitter | <alehander92> it has serious limitations of course |
13:36:56 | PMunch | Yeah, that one I'm less worried about |
13:37:14 | FromGitter | <alehander92> you can have a pragma staticRun |
13:37:25 | FromGitter | <alehander92> which lists the import deps |
13:37:35 | PMunch | Hmm, that could work |
13:37:37 | FromGitter | <alehander92> and then transforms the call to a function which calls staticExec |
13:37:45 | FromGitter | <alehander92> like a decorator |
13:37:51 | PMunch | Is it possible to grab all the imports from a file? :P |
13:38:21 | FromGitter | <alehander92> i guess the problem is there might be (??) imports after your expansion |
13:38:27 | FromGitter | <alehander92> or as a result of other macro expansion |
13:38:31 | PMunch | Nim should know where each procedure comes from, so theoretically it should be possible to implement a "grab all needed imports" thing |
13:38:45 | PMunch | Yeah that's true |
13:39:15 | FromGitter | <alehander92> but the top imports sure |
13:39:20 | FromGitter | <alehander92> i guess this should be possible in theory |
13:39:27 | FromGitter | <alehander92> if someone exposes it |
13:39:51 | FromGitter | <alehander92> of course it is possible PMunch |
13:39:53 | FromGitter | <alehander92> even know |
13:40:01 | PMunch | Everything is possible :) |
13:40:04 | FromGitter | <alehander92> you just load the nim file using currentSourcePath |
13:40:07 | FromGitter | <alehander92> and parse it |
13:40:12 | FromGitter | <alehander92> using parseStmt or similar |
13:40:16 | FromGitter | <alehander92> so its doable |
13:40:21 | PMunch | I once wrote a macro that would read the code of the program it was in to grab some context :P |
13:40:29 | FromGitter | <alehander92> yeah the same ! |
13:40:31 | FromGitter | <alehander92> wow |
13:40:31 | PMunch | Oh yeah :P |
13:40:40 | FromGitter | <alehander92> so indeed this is true i wondereda bout it |
13:40:48 | FromGitter | <alehander92> we can write macros aware of their expansion context now |
13:40:54 | FromGitter | <alehander92> Araq would be not happy |
13:40:59 | PMunch | Haha, I mean it is possible, but it's not pretty... |
13:41:38 | FromGitter | <alehander92> but yeah this way i think staticRun can work |
13:41:41 | FromGitter | <alehander92> without anything special |
13:41:59 | FromGitter | <alehander92> and not on javascript backend of course |
13:42:07 | clyybber | PMunch: Try it in a static: block |
13:42:38 | clyybber | oh, nevermind |
13:42:40 | FromGitter | <alehander92> back to jumps |
13:43:57 | PMunch | alehander92, want to give it a go? |
13:44:50 | FromDiscord_ | <Lantos> Hey Araq who is in charge of the discord? |
13:44:50 | FromDiscord_ | <Lantos> I'd like to make some suggestions with the discord server |
13:45:39 | PMunch | "fun" fact, BMPs are stored upside down.. |
13:49:19 | * | tklohna joined #nim |
13:52:49 | FromGitter | <alehander92> PMunch well no time :( |
13:52:54 | FromGitter | <alehander92> but its a fun idea |
13:53:40 | PMunch | Haha, that's why I didn't want to give it a go :P |
13:57:02 | * | solitudesf- joined #nim |
13:57:09 | FromGitter | <alehander92> i think its relatively easy to make a prototype |
13:57:15 | FromGitter | <alehander92> but dont lose your time with it |
13:59:05 | FromDiscord_ | <python273> I have 2 threads: |
13:59:05 | FromDiscord_ | <python273> 1. async websockets server (`ws` module) |
13:59:05 | FromDiscord_ | <python273> 2. another thread that produces messages |
13:59:06 | FromDiscord_ | <python273> |
13:59:06 | FromDiscord_ | <python273> How do I pass messages from 2 thread to websocket connections in thread 1? |
13:59:06 | FromDiscord_ | <python273> |
13:59:09 | FromDiscord_ | <python273> For passing data from 1 to 2 I can use `Channel`, but I'm not sure how to listen to channel messages and pass it to websocket connections, since it's async |
13:59:09 | FromDiscord_ | <python273> |
13:59:11 | FromDiscord_ | <python273> code: https://pastebin.com/raw/YxGPb6YK |
14:06:48 | * | tklohna quit (Ping timeout: 246 seconds) |
14:07:11 | * | tklohna joined #nim |
14:10:28 | Araq | Lantos: I don't know... |
14:20:06 | FromDiscord_ | <python273> figured out https://pastebin.com/raw/jRwg3mC1 |
14:21:32 | PMunch | Hmm, I checked out the v1.0.4 branch from GitHub and but trying to build with koch or build_all.sh just gives me this: http://ix.io/232P/ |
14:22:40 | narimiran | PMunch: you sure that's the correct link? |
14:22:43 | * | couven92 quit (Quit: Client disconnecting) |
14:23:26 | PMunch | Oh woops, wasn't meat to be a link: Error: implementation of 'system.*(x: int64, y: int64) [declared in /home/peter/Projects/nim/nim/lib/system.nim(1304, 8)]' expected |
14:24:03 | PMunch | That is an example of my little Arduboy macro that writes images as the internal Sprite representation on compile-time |
14:24:19 | narimiran | i think you would see that if you try to build older nim (e.g. 1.0.4) with a newer one (e.g. devel) |
14:24:33 | PMunch | So you don't have to convert the sprites with an online tool into C code and paste that into your editor |
14:25:18 | narimiran | but building from csources should work.... :/ |
14:25:21 | PMunch | Trying to build 1.0.4 with 1.0.4: http://ix.io/232R/ |
14:27:59 | narimiran | you sure choosenim isn't interfering somehow and `nim` used is not the one you expect? |
14:28:28 | PMunch | I think the issue was that build_all checks if things exists.. |
14:28:30 | narimiran | i know i had some similar problems until i decided to remove choosenim and just use git repo |
14:30:04 | disruptek | yeah, before build_all it's a good idea to blow away your binaries. i remove the sources as well, 'cause i don't think there's a `make clean` that works. |
14:31:48 | * | dddddd joined #nim |
14:31:57 | * | lqdev[m] joined #nim |
14:31:58 | * | M948e5[m] joined #nim |
14:31:58 | * | GitterIntegratio joined #nim |
14:31:58 | * | BitPuffin joined #nim |
14:31:58 | * | salotz[m] joined #nim |
14:31:58 | * | Demos[m] joined #nim |
14:31:58 | * | leorize[m] joined #nim |
14:31:59 | * | k0mpjut0r joined #nim |
14:31:59 | * | LEdoian[m] joined #nim |
14:31:59 | * | isaac[m]1 joined #nim |
14:32:00 | * | nergal[m]1 joined #nim |
14:32:03 | * | joachimschmidt55 joined #nim |
14:32:04 | * | Connor[m] joined #nim |
14:32:04 | * | lasso[m] joined #nim |
14:32:04 | * | Mike[m]2 joined #nim |
14:32:04 | * | planetis[m] joined #nim |
14:32:04 | * | skrylar[m] joined #nim |
14:32:04 | * | zacharycarter[m] joined #nim |
14:32:04 | * | zielmicha[m]1 joined #nim |
14:32:04 | * | yglukhov[m] joined #nim |
14:32:04 | * | spymasterd[m] joined #nim |
14:32:05 | * | xomachine[m] joined #nim |
14:32:05 | * | Asbrn[m] joined #nim |
14:32:05 | * | TheManiac[m] joined #nim |
14:32:05 | * | nc-x[m] joined #nim |
14:32:06 | * | pigmej joined #nim |
14:32:06 | * | Miguelngel[m] joined #nim |
14:32:06 | * | Manny8888 joined #nim |
14:32:06 | * | shashlick[m] joined #nim |
14:32:06 | * | macsek1911[m] joined #nim |
14:32:06 | * | meff[m] joined #nim |
14:32:06 | * | d-nice2[m] joined #nim |
14:32:07 | * | Balu[m] joined #nim |
14:32:13 | * | LargeEpsilon quit (Remote host closed the connection) |
14:32:32 | * | LargeEpsilon joined #nim |
14:39:23 | * | thomasross quit (Ping timeout: 276 seconds) |
14:42:58 | * | thomasross joined #nim |
14:54:37 | * | ng0_ joined #nim |
14:56:36 | * | ng0 quit (Ping timeout: 260 seconds) |
14:56:54 | * | ng0_ is now known as ng0 |
14:59:28 | * | thomasross quit (Ping timeout: 245 seconds) |
15:00:23 | * | thomasross joined #nim |
15:05:57 | * | PMunch quit (Quit: Leaving) |
15:13:37 | * | thomasross quit (Ping timeout: 240 seconds) |
15:23:15 | disruptek | shashlick, Araq: how do you expect pre-1.1 nim to handle $nimbleDir when it finds it in a nim.cfg path statement? |
15:23:33 | * | NimBot joined #nim |
15:27:38 | FromDiscord_ | <Lantos> Okay r.i.p. I'll try do a post on the forums then later tonight |
15:33:56 | * | Vladar joined #nim |
15:54:37 | * | Hideki_ quit (Remote host closed the connection) |
16:06:37 | * | M948e5[m] left #nim ("Kicked by @appservice-irc:matrix.org : User has been idle for 30+ days.") |
16:08:57 | * | Asbrn[m] quit (Quit: User has been idle for 30+ days.) |
16:09:34 | * | nif quit (Quit: ...) |
16:09:38 | * | blueberrypie quit (Quit: leaving) |
16:09:44 | * | nif joined #nim |
16:09:56 | * | cherrypie joined #nim |
16:10:00 | * | cherrypie quit (Client Quit) |
16:10:32 | * | blueberrypie joined #nim |
16:30:21 | Araq | disruptek, I expect /nimbledeps to win and then all the --paths are relative anyway |
16:31:17 | disruptek | i'm saying it needs to be backported, else we'll end up with nim.cfg in repos that earlier nim pukes on. |
16:32:18 | disruptek | nimph won't produce $nimbleDir paths because they are ambiguous, but it'll consume them, angrily. |
16:33:01 | disruptek | nimbledeps shouldn't win -- having multiple nimblePath statements is useful. |
16:33:08 | disruptek | even if one of them is nimbledeps. |
16:34:45 | Araq | maybe, we'll see. Now that I think of it maybe a more general $variable mechanism for --path would have been desirable |
16:35:35 | Araq | where $variable is not a list of dirs, but a single one |
16:35:44 | disruptek | it doesn't take much imagination to see how multiple --nimblePath statements are useful. |
16:36:06 | disruptek | especially before the compiler supports following .nimble-link files outside --nimblePath. |
16:37:26 | * | nsf quit (Quit: WeeChat 2.6) |
16:40:56 | * | LargeEpsilon quit (Ping timeout: 268 seconds) |
16:43:38 | * | Trustable joined #nim |
16:46:36 | * | floppydh quit (Quit: WeeChat 2.6) |
16:51:28 | * | leorize joined #nim |
16:53:47 | Araq | disruptek, all I'm saying is that it's too early to backport it IMO |
16:54:07 | Araq | once we tried it a little in the real world we can backport it |
16:54:30 | disruptek | well, it cannot be tried in the real world without causing earlier compilers to puke on it. |
16:54:45 | disruptek | but, whatever. i can handle it. |
16:55:28 | Araq | I'm talking about days here, the feature got merged today |
16:55:55 | Araq | I merged it in order to unblock shashlick_'s work on Nimble |
16:56:03 | disruptek | i understand. |
16:56:36 | Araq | for example, I think we can merge lazyPaths and nimblePaths internally in the compiler as you said |
16:56:51 | Araq | after a little bit of refactoring |
16:58:04 | disruptek | what does that buy us? we kinda need the separation between .nimblePaths and .lazyPaths because they mean different things. |
16:58:35 | disruptek | we can't even remove .nimblePaths from .lazyPaths because sometimes you need to --nimblePath a single directory, like that of the compiler when installed via `nimble develop`. |
16:58:48 | Araq | they do? how so? |
16:59:11 | Araq | lazyPaths was created for --nimblePath |
16:59:23 | disruptek | .nimblePaths holds the inputs, .lazyPaths holds the targets. what the compiler found when walking the inputs. |
17:00:33 | disruptek | if we remove .lazyPaths from the compiler, package managers will just have to walk .nimblePaths and build their own list. i don't mind that, but i'm not sure what it buys us. it's handy to share the compiler's knowledge; it prevents bugs. |
17:05:08 | Araq | IMO that's pretty much the package manager's job. we can add a stdlib API for getting the path walking right |
17:05:33 | disruptek | agree. |
17:05:40 | * | bacterio joined #nim |
17:06:23 | Araq | I don't mind adding stuff to the stdlib for easier interop, that's pretty much the stdlib's job. but I do mind my compiler knowing about version handling |
17:06:29 | disruptek | (as long as the compiler uses the same api) |
17:06:51 | disruptek | i agree that the compiler trying to manage versions is a liability, not an asset. |
17:08:44 | FromGitter | <deech> Does the magic pragma here ( `type ... int {.magic: Int.}` ) in `system.nim` mean that I can make a completely separate type like ( `type ... foo {.magic: Int.}` ) that has the same semantics as `int`? |
17:11:29 | disruptek | well, pathSubs needs to support $nimbleDir and currently does not. |
17:18:40 | Yardanico | https://github.com/nim-lang/Nim/pull/12760 does Nim actually support 16-bit CPUs? I was surprised to see that |
17:18:42 | disbot | ➥ Fix for 16 bit platforms @11PMunch |
17:21:01 | * | thomasross joined #nim |
17:24:22 | Araq | Yardanico, it does support them |
17:24:26 | Yardanico | woah |
17:24:47 | Araq | deech: you can but only for some magics |
17:24:56 | Araq | Int should be among them |
17:25:05 | Araq | I wouldn't rely on it though :P |
17:30:41 | * | krux02 quit (Remote host closed the connection) |
17:32:52 | * | bacterio quit (Read error: Connection reset by peer) |
17:41:32 | clyybber | Araq: Is the expected output for #12758 "no leak: 0" ? |
17:41:34 | disbot | https://github.com/nim-lang/Nim/issues/12758 -- 3--gc:arc wrong refcounting @11Araq; snippet at 12https://play.nim-lang.org/#ix=232p 😏 |
17:42:04 | clyybber | I've gotten it to "no leak: 7872" but I think thats still a leak, no? |
17:43:20 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
17:48:09 | clyybber | valgrind says no leak, but I don't see where those 7872bytes would come from |
17:57:49 | * | rockcavera quit (Remote host closed the connection) |
18:00:37 | * | abm joined #nim |
18:04:43 | FromDiscord_ | <yewpad> is the arc gc based on referencing counting_ |
18:04:53 | FromDiscord_ | <yewpad> *is the arc gc based on reference counting |
18:05:00 | FromDiscord_ | <yewpad> ? |
18:10:51 | leorize | yep |
18:11:11 | leorize | the current gc is also refcount based |
18:11:20 | leorize | but afaik arc simplify that |
18:17:04 | njoseph | Is there a no-newline-at-the-end version of "echo" ? |
18:17:15 | * | ng0 joined #nim |
18:20:15 | * | Vladar quit (Quit: Leaving) |
18:20:25 | narimiran | njoseph: stdout.write |
18:23:28 | njoseph | narimiran: Thanks. That's similar to Python's sys.stdout.write. I think I'll remember it. |
18:24:59 | FromGitter | <deech> Are there any examples of mixing ref counting gc and destructors? I want some small resources to be refcounted but use destructors for the rest of it. |
18:27:26 | * | nsf joined #nim |
18:28:12 | clyybber | deech: destructors for ref do refcount with --gc:destructors/arc |
18:28:29 | clyybber | Also in --newruntime for unowned refs |
18:30:38 | clyybber | deech: You can also implement your own ref counting using destructors |
18:31:36 | FromGitter | <deech> Nice thanks! |
18:34:01 | * | Trustable quit (Remote host closed the connection) |
18:45:52 | Araq | clyybber, there is some memory because of os.paramStr caching |
18:46:02 | Araq | so to check for leaks use this idiom: |
18:46:08 | Araq | let mem = getOccupiedMem() |
18:46:11 | Araq | main() |
18:46:26 | Araq | echo "MEM ", getOccupiedMem() - mem # should be 0 |
18:46:47 | clyybber | I put a echo getOccupiedMem() at the start of the file |
18:46:51 | clyybber | it output 0 |
18:47:18 | Araq | anyway I'm fixing the bug too but your refactoring will be welcome |
18:47:28 | Araq | I'm finding more bugs |
18:47:42 | clyybber | I too just found one :p |
18:48:39 | clyybber | the optimization for f([...]) was never working correctly for `sink array[]` and the like |
18:49:01 | clyybber | meaning it just didn't optimize anything. |
18:50:32 | Araq | yeah I know |
18:50:41 | Araq | but i found different bugs :P |
18:54:55 | clyybber | nice |
19:09:12 | * | uu91 quit (Ping timeout: 246 seconds) |
19:10:35 | * | uu91 joined #nim |
19:39:05 | * | solitudesf-- joined #nim |
19:41:58 | * | solitudesf- quit (Ping timeout: 245 seconds) |
19:43:53 | * | LargeEpsilon joined #nim |
19:48:46 | * | rockcavera joined #nim |
19:50:09 | * | LargeEpsilon quit (Ping timeout: 246 seconds) |
19:52:37 | * | clyybber quit (Ping timeout: 240 seconds) |
20:01:09 | * | Ven`` joined #nim |
20:07:33 | * | solitudesf-- quit (Quit: Leaving) |
20:07:49 | FromGitter | <zacharycarter> mratsim: the unions worked perfectly - I guess the only issue is on the shader side I don't know whether they were passed as big or little endian |
20:08:00 | * | solitudesf joined #nim |
20:08:03 | FromGitter | <zacharycarter> so which component to apply the shift to is somewhat dicey |
20:09:28 | FromGitter | <zacharycarter> I'll worry about it when / if it actually becomes a problem |
20:09:35 | FromGitter | <zacharycarter> for now this should solve my metal woes |
20:10:54 | * | njoseph quit (Ping timeout: 252 seconds) |
20:13:50 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:19:15 | FromDiscord_ | <Lantos> Could an forum admin please un moderate me, I've just made a forum account :_) |
20:19:18 | FromDiscord_ | <Lantos> Could an forum admin please un moderate me, I've just made a forum account 🙂 |
20:20:07 | * | njoseph joined #nim |
20:28:51 | FromDiscord_ | <IanIAnIAN> finally something in stb_image worked for me |
20:29:36 | disruptek | showoff. |
20:31:59 | FromGitter | <zacharycarter> time to do animated skeletal meshes |
20:32:03 | FromGitter | <zacharycarter> tomorrow... |
20:32:37 | FromGitter | <zacharycarter> I'm trying to find a game to play but every game I look at, I don't want to play |
20:32:39 | FromGitter | <zacharycarter> I think I'm getting old |
20:34:34 | FromDiscord_ | <IanIAnIAN> play Go then |
20:35:59 | FromGitter | <zacharycarter> Go? |
20:36:08 | FromGitter | <zacharycarter> I think I'm going to install TF2 and play that |
20:36:20 | Yardanico | he probably meant https://en.wikipedia.org/wiki/Go_(game) :P |
20:36:57 | FromGitter | <zacharycarter> seems like a popular game amongst Nim users / programmers |
20:38:10 | FromGitter | <zacharycarter> too much thinking for me though right now |
20:45:10 | FromDiscord_ | <IanIAnIAN> if you use an AI you don't have to think |
20:45:17 | FromDiscord_ | <IanIAnIAN> you also win a lot more |
20:45:38 | FromGitter | <zacharycarter> this sounds less fun than TF2 |
20:45:44 | FromGitter | <zacharycarter> and TF2 barely sounds fun right now |
20:46:33 | FromDiscord_ | <IanIAnIAN> careful though, the man who made Idris plays Go |
20:47:58 | * | nsf quit (Quit: WeeChat 2.6) |
20:51:16 | FromGitter | <zacharycarter> well good thing I've never heard of Idris before |
20:51:47 | FromDiscord_ | <IanIAnIAN> Time you watched Ivor the Engine then |
20:57:15 | * | thomasross quit (Ping timeout: 250 seconds) |
21:02:14 | * | thomasross joined #nim |
21:04:11 | * | narimiran quit (Ping timeout: 276 seconds) |
21:11:54 | * | clyybber joined #nim |
21:18:17 | * | uu91 quit (Read error: Connection reset by peer) |
21:18:36 | * | uu91 joined #nim |
21:39:32 | * | lritter quit (Quit: Leaving) |
21:42:33 | * | uu91 quit (Ping timeout: 265 seconds) |
21:43:31 | * | uu91 joined #nim |
21:55:17 | * | MnlPhlp joined #nim |
22:11:19 | * | uu91 quit (Read error: Connection reset by peer) |
22:11:34 | * | uu91 joined #nim |
22:27:30 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:44:12 | disruptek | !repo msgpack4nim |
22:44:13 | disbot | https://github.com/jangko/msgpack4nim -- 11 MessagePack serializer/deserializer implementation for Nim / msgpack.org[Nim] 8 64⭐15 10🍴 7& 2 more... |
22:58:08 | disruptek | yep, devel is completely broken wrt path handling now. |
22:58:29 | * | abm quit (Quit: Leaving) |
22:59:38 | disruptek | i have --clearNimblePath and --nimblePath="$home/git/shashtree/deps/pkgs" and yet my searchPaths includes paths from .nimble, /opt/nimble, and shashtree. shashlick Araq |
23:01:02 | disruptek | nimph can't even fix it because there's nothing to fix -- no configuration to remove or adjust, and no way to determine where these paths are coming from. |
23:01:44 | shashlick_ | are you printing out searchPaths? what does it show |
23:02:09 | disruptek | 🐞 search: /home/adavidoff/git/shashtree/deps/pkgs/regex-#v0.13.0/src/ |
23:02:09 | disruptek | 🐞 search: /home/adavidoff/.nimble/pkgs/regex-#v0.13.0/src/ |
23:02:10 | disruptek | 🐞 search: /opt/nimble/pkgs/regex-#v0.13.0/src/ |
23:02:17 | * | uu91 quit (Ping timeout: 240 seconds) |
23:02:27 | * | uu91 joined #nim |
23:02:47 | disruptek | ie. this for every single path in my --nimblePath that points to the tree where i keep all your projects. |
23:04:27 | disruptek | hmm, what else is different between 1.0 and devel? |
23:09:29 | disruptek | it must be my fault but somehow the inputs are differing. maybe it's the nim.cfg reorder. |
23:11:45 | shashlick_ | i just tested and this doesn't show up in searchPaths |
23:11:50 | shashlick_ | are you printing lazyPaths? |
23:12:43 | disruptek | omg it's nimbledir. |
23:12:59 | disruptek | nevermind, i forgot i turned it on to test it. my bad. |
23:13:08 | disruptek | i guess it's working perfectly. perfectly stupidly. |
23:13:22 | shashlick_ | okay glad, not the day to debug anything |
23:14:03 | disruptek | have a good one, shashlick. sorry to interrupt. |
23:15:04 | shashlick_ | no problem |
23:16:53 | * | krux02 joined #nim |
23:17:37 | * | shashlick_ quit (Quit: quit) |
23:18:28 | * | shashlick joined #nim |
23:32:11 | * | MnlPhlp quit (Remote host closed the connection) |
23:33:25 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
23:48:13 | * | krux02 quit (Remote host closed the connection) |