00:07:27 | dom96 | https://forum.nim-lang.org/t/3426 |
00:14:52 | * | yglukhov quit (Read error: Connection reset by peer) |
00:15:35 | * | yglukhov joined #nim |
00:25:51 | * | MJCaley joined #nim |
00:33:02 | * | yglukhov quit (Read error: Connection reset by peer) |
00:33:39 | * | yglukhov joined #nim |
00:34:58 | * | Leeky_ quit (Quit: Page closed) |
01:03:10 | * | vivus quit (Quit: Leaving) |
01:05:21 | FromGitter | <kayabaNerve> How can I pass a Nim function's pointer to a C dll? |
01:10:21 | dom96 | addr func |
01:11:43 | FromGitter | <kayabaNerve> Thanks |
01:15:20 | * | yglukhov quit (Remote host closed the connection) |
01:36:59 | * | vlad1777d_ quit (Ping timeout: 252 seconds) |
01:37:17 | * | RushNY joined #nim |
01:40:27 | * | RushNY left #nim ("Leaving") |
01:43:06 | FromGitter | <kayabaNerve> dom96: addr(myProc) Error: expression has no address |
01:43:35 | FromGitter | <kayabaNerve> The proc is defined as `proc handleOutput(output: string, size, nmemb: uint; userdata: pointer): uint =` ABOVE the addr() line, in the same file. |
01:43:40 | * | happycoder joined #nim |
01:46:15 | * | happycoder quit (Read error: Connection reset by peer) |
01:47:26 | * | nyeaa quit (Quit: leaving) |
01:47:50 | * | Serenit0r joined #nim |
01:48:07 | FromGitter | <kayabaNerve> {.procvar.} does not help either... |
01:50:05 | FromGitter | <kayabaNerve> It also appears that may be the default. |
01:50:57 | * | Serenitor quit (Ping timeout: 240 seconds) |
01:55:34 | FromGitter | <kayabaNerve> NVM. Solution was just to remove addr() and just the function name. |
01:56:17 | * | dddddd quit (Remote host closed the connection) |
02:04:52 | * | chemist69 quit (Ping timeout: 255 seconds) |
02:18:30 | * | chemist69 joined #nim |
02:50:43 | * | marenz_ quit (Read error: Connection reset by peer) |
02:52:59 | * | noonien quit (Quit: Connection closed for inactivity) |
03:03:03 | * | chemist69 quit (Ping timeout: 272 seconds) |
03:06:33 | * | marenz_ joined #nim |
03:15:57 | * | yglukhov joined #nim |
03:16:45 | * | chemist69 joined #nim |
03:19:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:20:14 | * | SenasOzys joined #nim |
03:38:06 | * | marenz__ joined #nim |
03:42:04 | * | marenz_ quit (Ping timeout: 268 seconds) |
03:45:08 | * | radagast quit (Ping timeout: 252 seconds) |
03:57:36 | * | MJCaley quit (Quit: MJCaley) |
04:09:03 | * | Serenit0r quit (Quit: Leaving) |
05:05:32 | FromGitter | <tekjar> Hi. |
05:05:48 | FromGitter | <tekjar> Is anyone using nim on microcontrollers? |
05:06:27 | FromGitter | <tekjar> Any blog/repo links please |
05:09:01 | * | marenz__ quit (Ping timeout: 260 seconds) |
05:27:57 | Tanger | @tekjar http://disconnected.systems/blog/nim-on-adruino/ https://forum.nim-lang.org/t/658 |
05:28:07 | Tanger | @tekjar https://github.com/gokr/ardunimo |
05:28:13 | Tanger | Some resources that might get you started |
05:28:48 | Tanger | Oooh, and https://github.com/Dhertz/AkaPi apparently runs on rPi |
06:16:40 | * | nsf joined #nim |
06:31:09 | * | Elronnd quit (Quit: be right back...) |
06:32:10 | * | elronnd joined #nim |
06:33:08 | * | elronnd is now known as Elronnd |
07:23:30 | * | yglukhov joined #nim |
07:28:23 | * | yglukhov quit (Ping timeout: 268 seconds) |
07:34:32 | FromGitter | <tekjar> Tanger: Thanks :). May be there should be a nostd section in awesome-nim |
07:35:13 | Tanger | No worries! I can't vouch for how much you'll get from them, but from the looks of it it should be a starting point at the very least :) |
07:35:31 | Tanger | Could be like a dev-driven list of articles and libs |
07:47:49 | * | skrylar joined #nim |
07:48:17 | * | solitudesf joined #nim |
08:06:14 | * | Ven`` joined #nim |
08:09:49 | * | Ven`` quit (Read error: No route to host) |
08:10:15 | * | Ven`` joined #nim |
08:18:35 | skrylar | successfully got a nim subclass of a fltk widget last night |
08:18:53 | skrylar | It's a little jenky though :( |
08:19:37 | skrylar | nim stable docs imply it is safe to use emit to create a type in C++ land, then import on nim land. while true, exporting that type from one module to another results in Badness because it tries to use a type that doesn't exist |
08:20:49 | * | claudiuinberlin joined #nim |
08:22:19 | * | Trustable joined #nim |
08:24:41 | * | PMunch joined #nim |
08:25:37 | * | Ven`` quit (Ping timeout: 248 seconds) |
08:27:31 | * | Trustable quit (Remote host closed the connection) |
08:28:14 | * | Trustable joined #nim |
08:30:13 | FromGitter | <mratsim> @dom96 Nim at FOSDEM, awesome! I’ll see if I can be there. |
08:30:37 | * | yglukhov joined #nim |
08:35:51 | * | yglukhov quit (Remote host closed the connection) |
08:45:36 | * | floppydh joined #nim |
08:47:46 | * | Jesin quit (Ping timeout: 260 seconds) |
08:50:22 | Araq | skrylar: it's just an example in the docs, it doesn't claim to work out in practice :P |
08:53:05 | FromGitter | <konqoro> Hey being porting some fortan code to nim. For a |
08:54:08 | FromGitter | <konqoro> Array 1000 , what is prefered in nim? A seq or array? |
09:04:08 | * | gmpreussner quit (Ping timeout: 252 seconds) |
09:05:15 | * | vlad1777d_ joined #nim |
09:05:19 | * | gmpreussner joined #nim |
09:06:35 | * | dddddd joined #nim |
09:06:46 | Araq | depends |
09:06:57 | Araq | start with the array version |
09:25:50 | ftsf | hmm is there a way to debug a template to see what nim code is generated? |
09:28:53 | * | solitudesf quit (Ping timeout: 252 seconds) |
09:30:48 | * | Arrrr joined #nim |
09:31:12 | FromGitter | <andreaferretti> Something like this should do (warning: untested) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3cd0df5355812e57067c49] |
09:31:40 | FromGitter | <andreaferretti> there is also `macros.expandMacro` which may as well work on templates |
09:32:23 | ftsf | thanks! |
09:33:27 | ftsf | \o/ |
09:40:10 | * | Jesin joined #nim |
09:41:59 | PMunch | dom96, yeah really nice to see that Nim will be at FOSDEM. I would love to be there but it seems that plane tickets are pretty expensive.. |
09:45:54 | * | yglukhov joined #nim |
09:47:42 | ftsf | yay! just made my code so much nicer with some templates |
09:49:02 | FromGitter | <mratsim> @konqoro array will be faster if you don't need the dynamic stuff from seq, only caveat is your stack size. |
09:54:38 | FromGitter | <mratsim> @Araq if there I have 2 types `Node -> Foo` and `Foo -> Node` describing a DAG, where should I put the {.acyclic.} pragma, on both types? |
10:00:23 | Araq | yeah |
10:03:03 | Araq | .acyclic is ignored btw |
10:09:38 | FromGitter | <mratsim> Ugh ><, I wanted to remodel my parent-child relationships in my NN graph by using weak reference (ptr) and strong reference (ref) to make sure I avoid the cycle collector. |
10:11:29 | FromGitter | <mratsim> Btw I give up on trying to reproduce the allocator issue with setters like proc `data=`, spend ~3 evenings trying. I'll work around it by not using setters. |
10:17:46 | Araq | setters are irrelevant |
10:18:14 | Araq | you had a corruption, corruptions are non local and can be hard to reproduce |
10:18:21 | Araq | but need to be fixed |
10:19:24 | Araq | ptr / ref works without .acyclic and to avoid the cycle collector disable it |
10:20:09 | Araq | thinking about it ... we could detect the need for the cycle collector and disable it automatically but it would add some tracking costs |
10:24:01 | * | vlad1777d_ quit (Ping timeout: 260 seconds) |
10:25:53 | * | nyeaa joined #nim |
10:29:16 | yglukhov | mratsim: do you have a stack trace? |
10:29:26 | yglukhov | because i have relevant issues |
10:31:22 | FromGitter | <mratsim> Lots. |
10:31:43 | Araq | stack traces are irrelevant too ;-) |
10:31:53 | Araq | they point to the crash but not to the cause |
10:34:14 | FromGitter | <mratsim> Sorry it's a bit of a mess it was so frustrating to try to get a minimum test case without Arraymancer-only procs/datastructure and have the crash disappear for seemingly dumb modifications: https://github.com/mratsim/Arraymancer/issues/178 |
10:35:09 | * | kunev quit (Ping timeout: 264 seconds) |
10:38:00 | FromGitter | <mratsim> @yglukhov : there are some other stacktraces on dealloc and addChunkToMatrix in the IRC logs from the last 4 days. |
10:38:08 | Araq | er do you use || without protection? |
10:38:39 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:39:47 | FromGitter | <mratsim> Only for non-GC-ed types. |
10:40:04 | * | sz0 quit (Quit: Connection closed for inactivity) |
10:41:56 | Araq | ok |
10:42:42 | FromGitter | <mratsim> ref/string/ptr types have a different code path for higher order functions like map/fold, for the function in my report I didn't put the T: SomeReal because it was for benchmarks, I was lazy ;), and exp, `/` are not defined for anything else than SomeReal by default. |
10:42:55 | skrylar | Araq, examples should always work or else contain notes about caveats, but in this particular case i mad eit work by telling importcpp to pretend its the base class, and use emit to typecast at in C++ |
10:43:05 | skrylar | since the whole interface is just routing some virtual calls from cc to nim |
10:54:42 | * | kunev joined #nim |
10:58:59 | * | solitudesf joined #nim |
11:03:35 | skrylar | securehash really should be deprecated and renamed imo |
11:03:47 | skrylar | i just saw it was moved back. SHA1 is useful, it's just not secure |
11:04:00 | * | radagast joined #nim |
11:09:43 | skrylar | oh i get why its named that. kind of |
11:10:58 | * | marenz__ joined #nim |
11:17:08 | * | radagast quit (Quit: radagast) |
11:17:26 | * | radagast joined #nim |
11:21:40 | * | radagast quit (Client Quit) |
11:21:53 | * | radagast joined #nim |
11:29:16 | * | Yardanico joined #nim |
11:29:37 | * | marenz__ quit (Ping timeout: 248 seconds) |
11:38:34 | * | dddddd quit (Remote host closed the connection) |
11:42:25 | skrylar | pushed the custom widget support for nfltk online |
11:57:52 | * | Vladar joined #nim |
12:05:22 | FromGitter | <mratsim> Comparison between ref objects is done by comparing pointer adress or is it deep? |
12:07:15 | Araq | pointer address |
12:23:26 | skrylar | mratsim: so here's an amusing puzzle; segmenting words in to phonemes without black boxes :) |
12:24:21 | skrylar | Araq, came across this, you might find it neat if you haven't already https://swtch.com/~rsc/regexp/regexp1.html |
12:26:14 | FromGitter | <mratsim> @skrylar, you’ll pry my black boxes from my dead hands |
12:26:21 | * | mostly-harmless joined #nim |
12:27:48 | * | Snircle joined #nim |
12:27:59 | skrylar | mratsim: eh well in this case i have a partial solution (for segmenting ex. cmudict) |
12:28:27 | skrylar | mostly involves nudging borders and checking, although still have to work out 3+ symbol cases and ambiguities |
12:31:28 | skrylar | actually the ambiguity case can probably be solved as "if no band can be moved to create a solution, then fork" |
12:32:13 | PMunch | mratsim, I looked into getting colours into drawille and I don't think it's going to be as trivial as I was expecting.. |
12:33:26 | PMunch | I might be able to get around it by requiring that you also specify the color to remove when you want to unset a pixel. But otherwise I'd have to change how the entire system works.. |
12:33:31 | * | endragor joined #nim |
12:36:13 | FromGitter | <mratsim> don’t worry, it’s not my priority |
12:36:41 | FromGitter | <mratsim> I think I’ll add OpenCL to Arraymancer in the coming month. It’s been itching me. |
12:37:18 | skrylar | what is drawille and also i have some color code lying around |
12:41:08 | skrylar | probably should put that on github as well; have done some color space conversion and it was using type safety to prevent accidental mixes across RGB/HSL/HSV |
12:42:03 | skrylar | allegedly you can also do color spaces with Adaptively Sampled Distance Fields, which collapses the weird geometry in to an octree |
12:44:44 | * | endragor quit (Remote host closed the connection) |
12:45:11 | * | endragor joined #nim |
12:45:35 | skrylar | mratsim: opencl has been a thing i'm curious about for quite some time, although it is less than easy to get into |
12:46:08 | FromGitter | <mratsim> Yeah, Cuda seems much easier, I read some OpenCL but the enqueue/dequeue + context management ugh ... |
12:48:01 | skrylar | boilerplate is macro fodder |
12:48:11 | skrylar | CUDA is the easier option but i prefer nvidia not be too comfortable |
12:48:38 | skrylar | though opencl also runs on CPU, as well as it runs on FPGAs now |
12:49:07 | FromGitter | <mratsim> Argh, seems like the dereference operator is broken when you have a template `[]` that accepts varargs[untyped]: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3cff425355812e57077092] |
12:49:16 | skrylar | the A-something company that makes one model of them, they added an OpenCL input for their logic synthesizer. So it will convert a kernel to (almost) hardware, albeit less efficiently than verilog |
12:49:37 | FromGitter | <mratsim> AMD added “Hip" |
12:50:01 | skrylar | fpgas are a thing i want, but they are all super proprietary ;_; |
12:50:10 | FromGitter | <mratsim> Hip can compile to AMD ROCm or OpenCL for CPU or Nvidia/AMD GPU (but not Intel GPU …) |
12:50:59 | FromGitter | <mratsim> Also it’s easy to port Cuda to Hip, just replace cuda/cu by hip —> cudaMalloc, HipMalloc |
12:51:16 | skrylar | Discovered the Any type. will have to see hwo well that boxes and unboxes |
12:51:28 | skrylar | Cobweb is theoretically useful but has the issue of it currently relies on JsonNode |
12:52:46 | skrylar | the macro for flatbuffers shouldn't be TOO hard |
12:53:05 | * | endragor quit (Remote host closed the connection) |
12:54:54 | skrylar | kind of terrified at the state of computer engineering |
12:55:25 | skrylar | reading these 15+ year old books and articles on "how to store THINGS in piece tables and weird trees" |
12:55:29 | * | endragor joined #nim |
12:56:29 | skrylar | http://doc.cat-v.org/plan_9/4th_edition/papers/sam/ admittedly, almost everything about plan 9 is gold |
12:57:27 | * | nyeaa quit (Quit: leaving) |
12:58:13 | * | arecacea1 quit (Remote host closed the connection) |
12:58:32 | * | arecacea1 joined #nim |
13:03:22 | skrylar | https://www.mythic-beasts.com/order/rpi ... lol? |
13:07:41 | * | endragor quit (Remote host closed the connection) |
13:09:12 | * | floppydh quit (Quit: WeeChat 2.0) |
13:10:09 | * | Ven`` joined #nim |
13:12:22 | skrylar | mratsim: do you think there should be a warning against using types like "int" |
13:12:45 | skrylar | intuition says it should complain if you do, because those types might change size and thus brick your flatbuffer compat |
13:14:39 | * | happycoder joined #nim |
13:14:41 | * | endragor_ joined #nim |
13:17:16 | * | kunev quit (Ping timeout: 260 seconds) |
13:18:57 | * | endragor_ quit (Ping timeout: 240 seconds) |
13:23:54 | * | yglukhov_ joined #nim |
13:24:22 | * | skelett quit (Ping timeout: 255 seconds) |
13:25:10 | * | freevryheid joined #nim |
13:25:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
13:26:19 | * | freevryheid left #nim (#nim) |
13:26:37 | * | fvs joined #nim |
13:26:41 | GitDisc | <NopeDK> skrylar, while the iCE40 is still a proprietary chip, they have reverse engineered the synthesis and have a fully open source software chain for development if you don't mind using Verilog. |
13:29:35 | skrylar | ah, lattice. i heard about them once or twice |
13:31:23 | PMunch | skrylar, drawille is using unicode braille symbols to draw things in a terminal |
13:31:35 | PMunch | Basically turns every character into a 2x4 grid of pixels |
13:35:26 | federico3 | nice |
13:38:08 | PMunch | https://github.com/asciimoo/drawille |
13:38:22 | PMunch | It's pretty cool, and I implemented it a while back for Nim |
13:42:53 | * | Ven`` quit (Ping timeout: 256 seconds) |
13:45:57 | * | Jesin quit (Quit: Leaving) |
13:47:23 | * | nsf quit (Quit: WeeChat 1.9.1) |
13:58:27 | * | happycoder quit (Ping timeout: 240 seconds) |
14:05:42 | Arrrr | this looks great |
14:06:09 | Arrrr | Ah, yours is here https://github.com/PMunch/drawille-nim |
14:06:20 | PMunch | Yup |
14:06:36 | PMunch | It's mostly the same thing, but completely re-implemented |
14:06:43 | PMunch | And it supports layers :) |
14:07:51 | FromGitter | <Varriount> PMunch: No colors? |
14:08:23 | ftsf | coloured braille, sounds like a great invention =) |
14:08:24 | PMunch | Not yet, working on it now :) |
14:08:55 | skrylar | i hav a feeling that color would look like the ZX Spectrum more than anything else. |
14:09:07 | skrylar | Speccy could only apply color in 8x8 pixel regions |
14:09:42 | ftsf | making a simple Entity Component Architecture system for my game engine and adding networking to it now via enet. Kinda works =) |
14:12:24 | PMunch | skrylar, yeah this would apply a color to each 2x4 region. |
14:12:45 | PMunch | But it's going to store all the colours and generate an average |
14:13:09 | skrylar | enet can be neat. |
14:13:19 | ftsf | it's pretty nice to use |
14:13:21 | skrylar | not doing anything nearly so fun :/ dealnig with flu, and macros to serialize flatbuffers |
14:13:23 | ftsf | but networking is still hard |
14:13:24 | PMunch | ftsf, enet? |
14:13:38 | skrylar | enet is a TCP layer over UDP and was made for Cube/Sauebraten |
14:13:44 | PMunch | skrylar, did you see my binary parser? |
14:13:46 | ftsf | https://github.com/fowlmouth/nimrod-enet http://enet.bespin.org/ |
14:13:51 | skrylar | PMunch, i hven't |
14:13:56 | skrylar | the same guy (Wouter) also wrote the spec for flatbuffers |
14:14:07 | PMunch | https://github.com/PMunch/binaryparse |
14:14:32 | PMunch | Usage example: https://github.com/PMunch/binaryparse/blob/master/binaryparse.nim#L623 |
14:14:59 | ftsf | my problem currently is when a player connects to the server, the server needs to tell it to spawn all the existing objects. but doesn't know which info is important to send. |
14:15:23 | ftsf | wonder if i can annotate that somehow |
14:15:55 | skrylar | the wonders of modern entity systems are neat to develop with, but the old school arena blobs are better to run :| |
14:16:16 | ftsf | need to serialize all the component variables and send them over to the client |
14:17:04 | ftsf | I guess the component can know which variables need to be serialized |
14:17:34 | ftsf | I'd want to mark them via a pragma in the type perhaps. |
14:18:40 | skrylar | that would be neat if you could put user pragmas on fields :) |
14:18:55 | ftsf | impossible? |
14:18:55 | skrylar | you have to eat the whole type section in a macro to do that ._. |
14:19:00 | ftsf | =( |
14:19:02 | ftsf | dang |
14:19:35 | skrylar | i found i didn't NEED pragmas for flatbuffers, so i got by without it. although it occurs to me that one can also just use a macro to hold field layout, which might happen in a later version |
14:19:41 | ftsf | I guess just a serialize method on the component will do |
14:20:16 | skrylar | right now if you delete a field or re-order in the obejct, you break your compatability (the AST order is used) while having the user specify the order in a separate macro violates dry, it lets you order a struct for yourself and force an order on the wire |
14:36:59 | PMunch | Crap, I just remembered that terminals are dumb when it comes to colour.. |
14:37:38 | dom96 | ftsf: enet? Why not try using Nim's sockets? :) |
14:38:31 | ftsf | dom96, should probably have a look at those in the future |
14:38:34 | ftsf | but enet is working nice for now |
14:39:35 | ftsf | enet has some nice features, but probably easy enough to implement myself over UDP |
14:40:41 | dom96 | hopefully in the future you'll be able to switch over to Nim's sockets |
14:40:52 | dom96 | admittedly UDP support is still not the best for async |
14:41:09 | ftsf | will likely be using sync |
14:45:09 | dom96 | ahh, then it should work perfectly |
14:47:25 | PMunch | Hmm, can I upconvert an object to an object that inherits from that object? |
14:48:17 | ftsf | cat = Cat(animal) ? |
14:50:05 | PMunch | result = ColourCanvas(newCanvas(x, y)) # Illegal object conversion |
14:50:32 | ftsf | is ColourCanvas a ref? |
14:53:37 | * | marenz joined #nim |
14:57:50 | * | dddddd joined #nim |
14:58:01 | dom96 | yeah, needs to be a ref |
14:58:14 | dom96 | the error message for that should be improved :) |
15:00:24 | * | byte512 quit (Ping timeout: 268 seconds) |
15:01:08 | FromGitter | <mratsim> @skrylar yes flatbuffer should store as int64 / float64 |
15:05:13 | FromGitter | <mratsim> Any serializer with schema should do that actually. |
15:15:59 | * | Arrrr1 joined #nim |
15:15:59 | * | Arrrr quit (Disconnected by services) |
15:16:05 | * | Arrrr1 quit (Client Quit) |
15:17:15 | * | happycoder joined #nim |
15:19:52 | * | happycoder quit (Remote host closed the connection) |
15:20:15 | * | happycoder joined #nim |
15:25:06 | * | Jesin joined #nim |
15:27:42 | * | Jesin quit (Remote host closed the connection) |
15:29:24 | * | Jesin joined #nim |
15:29:36 | PMunch | Oh, it has to be a ref? |
15:30:03 | dom96 | yep |
15:30:07 | dom96 | because all refs are the same size |
15:30:13 | PMunch | Ah |
15:30:15 | dom96 | but non-ref objects can have varying sizes |
15:30:15 | PMunch | Of course |
15:30:44 | PMunch | That reminds me I should fix up my Reddit post on refs and objects and post it |
15:33:32 | PMunch | Huh: http://ix.io/Dij/ |
15:33:37 | PMunch | Compiler made me some illegal code |
15:33:58 | dom96 | bug report |
15:36:34 | Araq | already reported, I bet |
15:40:47 | Yardanico | yes |
15:41:00 | PMunch | What's cousing it? |
15:41:08 | PMunch | causing* |
15:44:22 | Araq | don't use 'var ref Subtype' |
15:46:08 | PMunch | Hmm |
15:46:18 | PMunch | How do I do that then? |
15:47:31 | * | yglukhov_ quit (Remote host closed the connection) |
15:47:52 | PMunch | Never mind, figured out how to get around it |
15:48:22 | * | yglukhov joined #nim |
15:48:33 | * | yglukhov quit (Remote host closed the connection) |
15:48:48 | * | yglukhov joined #nim |
16:15:43 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
16:25:19 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
16:29:17 | PMunch | Okay, now drawille-nim has colour support |
16:29:46 | PMunch | It's got a bug where fields with only a single character doesn't show anything but apart from that I think it should work pretty well |
16:29:48 | * | PMunch quit (Quit: Leaving) |
16:41:34 | * | xet7 quit (Ping timeout: 252 seconds) |
16:42:36 | * | xkapastel joined #nim |
16:45:02 | * | happycoder quit (Ping timeout: 252 seconds) |
16:54:42 | * | xet7 joined #nim |
17:03:57 | * | marenz quit (Ping timeout: 264 seconds) |
17:04:53 | skrylar | meh. auto-serialization is half done :\ |
17:05:16 | * | happycoder joined #nim |
17:11:00 | * | claudiuinberlin joined #nim |
17:16:15 | * | happycoder quit (Ping timeout: 248 seconds) |
17:16:43 | * | marenz joined #nim |
17:51:54 | * | yglukhov quit (Remote host closed the connection) |
18:04:47 | * | sendell joined #nim |
18:12:47 | * | gangstacat quit (Quit: Ĝis!) |
18:22:18 | * | yglukhov joined #nim |
18:24:05 | * | gangstacat joined #nim |
18:25:45 | * | solitudesf quit (Ping timeout: 268 seconds) |
18:27:01 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:41:00 | * | sendell quit (Remote host closed the connection) |
18:41:47 | * | Arrrr joined #nim |
18:46:18 | * | cspar joined #nim |
18:53:46 | * | natrys joined #nim |
18:58:00 | Arrrr | pull request queue is shrinking |
18:58:32 | * | sendell joined #nim |
18:59:25 | sendell | is there a way to print call site line in callstacks? |
18:59:58 | skrylar | writestackstrace()? |
19:01:17 | sendell | i mean on SIGSEV on unchatched exceptions |
19:01:58 | sendell | uncatched* :) |
19:02:41 | dom96 | Just don't compile with -d:release |
19:02:57 | sendell | printed line numbers seems to be called proc first line, not call site line |
19:04:13 | sendell | my question was about line numbers, not enabling or printing call stacks ahah, sorry if unclear :) |
19:05:13 | Araq | that's just a bug, I think |
19:06:06 | sendell | oh it might be, I was surprised to not have noticed it earlier |
19:09:05 | sendell | works as expected on a simple example, so yeah it's a bug |
19:10:57 | * | yglukhov joined #nim |
19:11:36 | sendell | is it a known bug? should I try to report it? |
19:12:06 | Araq | yeah that would be nice |
19:13:09 | sendell | i'll try to do that :) |
19:13:16 | sendell | brb |
19:13:31 | * | sendell quit (Remote host closed the connection) |
19:15:44 | * | yglukhov quit (Remote host closed the connection) |
19:16:02 | * | yglukhov joined #nim |
19:19:30 | dom96 | I wonder why there is so much kitchen sink spam: https://i.imgur.com/NxW5hmN.png |
19:20:36 | * | yglukhov quit (Read error: Connection reset by peer) |
19:21:12 | * | yglukhov joined #nim |
19:21:45 | * | cspar quit (Ping timeout: 256 seconds) |
19:32:51 | federico3 | that would be a good name for the pkg directory |
19:33:30 | dom96 | hah |
19:33:37 | dom96 | That's true :) |
19:41:36 | FromGitter | <mratsim> @Araq will we have ``opt`` in 0.18? |
19:47:04 | Arrrr | "keep up the great work" that's encouraging |
19:47:15 | Arrrr | I need motivational spam in my life |
19:55:26 | * | solitudesf joined #nim |
20:03:10 | * | sendell joined #nim |
20:04:01 | * | scriptum joined #nim |
20:04:37 | Araq | dom96, probably because one of my blog posts uses 'sink' |
20:06:48 | Araq | mratsim, no. |
20:07:22 | Yardanico | Araq, btw, will 1.0 be after 0.18.0? after new year it seems? |
20:07:42 | FromGitter | <mratsim> ok |
20:07:59 | Yardanico | Well 1.0 doesn't really matter for me, I'm just asking |
20:08:34 | FromGitter | <tim-st> Is there a way I can use namedtuple B which has all named fields like namedtuple A but more types than namedtuple A for a proc that takes only namedtuple of type A ? |
20:09:12 | dom96 | Yardanico: Even Araq doesn't know an answer to this. |
20:09:29 | dom96 | not 100% at least :) |
20:09:51 | dom96 | tim-st: nope |
20:10:05 | FromGitter | <tim-st> hm, ok, thanks. |
20:10:05 | Yardanico | dom96, yeah, I know, there's too many different things that need to be taken into consideration |
20:11:00 | FromGitter | <tim-st> @dom96 Is that a feature, or not implemented yet? atleast it should work, or not? |
20:11:12 | Yardanico | I don't think it should work |
20:11:36 | FromGitter | <tim-st> That would allow easy inheritance for final types |
20:11:36 | dom96 | It shouldn't work. |
20:11:40 | Araq | subtyping only really works with pointers, tuples are not pointers |
20:11:56 | Yardanico | tim-st: tuple is just a struct at C level |
20:11:58 | dom96 | You can write a macro that makes it work if you wish |
20:12:46 | FromGitter | <tim-st> @Yardanico yes, I know, that make me wonder why my scenario didn't work, now I need inherited object, which is not constant |
20:13:46 | dom96 | The reason primarily is that Nim is statically and strongly typed |
20:14:40 | FromGitter | <tim-st> @dom96 Ok, that was my assumption, but it could work at least in theory |
20:15:27 | * | natrys quit (Ping timeout: 248 seconds) |
20:15:33 | Araq | yeah FP languages tend to support it |
20:24:59 | * | Vladar quit (Quit: Leaving) |
20:26:33 | FromGitter | <nitely> @tim-st you can always have just one tuple and a `kind` field for storing the sub "type". That's if you really need const |
20:28:38 | * | natrys joined #nim |
20:28:40 | FromGitter | <nitely> just fill the expected fields for each `kind` |
20:30:10 | dom96 | You can also just use a hash table |
20:30:57 | FromGitter | <nitely> kinda like having a object variant, except those don't work with const AFAIK |
20:31:09 | * | Yardanico quit (Quit: Leaving) |
20:31:34 | * | Yardanico joined #nim |
20:36:27 | skrylar | i remember somenoe made a spec for "rebol object notation" |
20:36:47 | skrylar | it was kind of neat. |
20:36:58 | FromGitter | <tim-st> ok, thanks will try it; yes object variants cannot be const. I had an idea how my scenario could be supported: if all fields in tuple B are in tuple A than the proc can take tuple B too, when the compiler copies internally the proc with type A and just changes the type to tuple B, like internal overloading |
20:38:41 | dom96 | Are you sure object variants cannot be const? |
20:39:20 | FromGitter | <tim-st> yes, I tried it. Otherwise I wouldnt switch from object to tuple |
20:39:28 | FromGitter | <nitely> I tried and they work in the global scope but not inside procs if IIRC |
20:39:33 | GitDisc | <NopeDK> Is there any way to have inheritance in the project.nim.cfg files? I am thinking something like an include statement or multiple files so you can separate changeable parameters from dynamically created ones. |
20:41:10 | Araq | use project.nims and Nim's include statement |
20:43:01 | GitDisc | <NopeDK> Thanks, will look into those. |
20:43:29 | sendell | shouldnt consts behave exactly the same in global and proc scopes? the only difference being visibility restrictions |
20:45:45 | FromGitter | <nitely> AFAIK yes. I'll try again on devel. Maybe I tried on stable where objects didn't work at all... |
20:46:03 | FromGitter | <nitely> *for consts |
20:46:44 | FromGitter | <tim-st> are const objects supported in a development release? |
20:47:50 | FromGitter | <tim-st> I mean const inherited objects, const object without inheritance work |
20:48:08 | * | marenz quit (Ping timeout: 252 seconds) |
20:48:39 | FromGitter | <nitely> I just tried it on devel and I get `Error: invalid type for const`, so object variant can't be consts |
20:49:02 | FromGitter | <tim-st> Yes, I got the same error when I tried it |
20:49:34 | Yardanico | yes, they still can't be constants and there's an issue about that on github |
20:50:55 | FromGitter | <tim-st> For me it would be good enough if "tuple inheritance" as described would work |
20:51:12 | FromGitter | <nitely> @tim-st when I say devel I mean the unreleased/in development version of Nim. That version supports object const |
20:51:25 | sendell | btw what would be the practical differences if using a let object instead of const object? |
20:51:38 | sendell | of using* |
20:51:46 | FromGitter | <tim-st> @nitely Yes, I know, I took the wrong word unfortunately |
20:51:54 | Yardanico | sendell, https://nim-lang.org/docs/manual.html#statements-and-expressions-const-section |
20:52:05 | Yardanico | about constants :) |
20:52:08 | sendell | thx |
20:52:25 | Yardanico | well for example compiler can inline a lot of things |
20:53:11 | Yardanico | docs are a bit outdated though (because they're for 0.17.2) |
20:54:41 | dom96 | why do you even need a const for this? |
20:57:08 | FromGitter | <nitely> In my case, I want to compile regexes at compile time. And store the AST as a seq of Nodes (use indices for children nodes) |
20:57:32 | * | nsf joined #nim |
21:01:41 | sendell | Yardanico: ok for compile time evaluation, that's a requirement. But I guess the compiler could inline let object too? |
21:01:47 | * | marenz joined #nim |
21:02:28 | Yardanico | sendell, "let" means that object is constructed at runtime AFAIK |
21:02:46 | Yardanico | well C compiler can inline a lot of things too |
21:07:07 | sendell | yeah but its adress is known at compile time, so member addresses can be inlined, whether its constructed at compile or runtime. I might have missunderstood what you meant by "inlining" |
21:09:03 | * | xkapastel quit (Quit: Connection closed for inactivity) |
21:09:37 | dom96 | nitely: that's a good use case, and we should ping Araq about it |
21:10:19 | dom96 | nitely: how is the regex engine going otherwise? |
21:10:28 | dom96 | Is the source code in a repo somewhere? |
21:10:42 | FromGitter | <nitely> almost done |
21:10:50 | FromGitter | <nitely> nop |
21:11:48 | Yardanico | nitely: so it's pure nim? |
21:11:51 | FromGitter | <nitely> I mean almost in usable state :D |
21:12:09 | FromGitter | <nitely> yes, it's pure nim |
21:12:29 | Yardanico | wow, nice |
21:13:07 | * | xkapastel joined #nim |
21:14:06 | Araq | hmm? what feature? I don't understand |
21:14:55 | Yardanico | Araq, compile-time object variants |
21:14:59 | * | scriptum quit (Quit: Leaving) |
21:15:03 | Yardanico | I mean constants |
21:17:10 | FromGitter | <nitely> btw, I don't really need those, I can use plain objects or tuples. They would be nice though |
21:19:23 | GitDisc | <NopeDK> The question is, what benefit does regex have over the already pure pegs? (Except syntax and non greedy behavior) |
21:21:23 | Yardanico | people are used to regexes :P |
21:21:30 | Araq | ^^ yup. |
21:22:58 | FromGitter | <alehander42> I really hate that there hasn't been solidified some kind of semi standard grammar syntax |
21:23:20 | FromGitter | <alehander42> each parser generator and parser lib uses its own dsl or dialect of something kinda like ebnf |
21:23:54 | GitDisc | <NopeDK> Good point. Was actually gunning for pegs to remain semi pure in my wip module but if regex is what the people want and use... |
21:23:58 | * | sendell quit (Remote host closed the connection) |
21:27:55 | Araq | regexes really suck though, does '.' match a newline or not, why can't I use spaces to make things more readable ugh, I cannot even match balanced brackets |
21:29:10 | FromGitter | <alehander42> that's one of the things I liked about perl6, they had some kind of grammar literals |
21:29:17 | FromGitter | <alehander42> maybe if they had them in 1990 |
21:29:23 | FromGitter | <alehander42> people would be more open |
21:38:41 | radagast | Policy based design (Traits) and Curiously Recurring Template Patterns are the two weapons for solving the overhead involving dynamic dispatch |
21:53:18 | dom96 | ooh, the elapsed time shown in testament is sexy |
21:56:08 | * | Yardanico quit (Read error: Connection reset by peer) |
21:56:25 | * | Arrrr quit (Quit: Leaving.) |
21:56:30 | dom96 | nitely: do you plan on making the source code available? |
21:59:24 | FromGitter | <nitely> yes! |
22:00:40 | FromGitter | <nitely> next week probably |
22:02:23 | * | vlad1777d_ joined #nim |
22:03:01 | dom96 | awesome, ping me when you do :) |
22:08:31 | FromGitter | <Varriount> radagast: I dare you to say "Curiously Recurring Template Patterns" 10 time fast. :P |
22:15:53 | GitDisc | <NopeDK> Any pics of testament's output? |
22:19:25 | * | Jesin quit (Quit: Leaving) |
22:20:32 | dom96 | you can see it here https://travis-ci.org/nim-lang/Nim/jobs/320402543#L2566 |
22:20:50 | dom96 | I love it |
22:24:35 | GitDisc | <NopeDK> Damn, that is indeed nice looking |
22:29:01 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:29:53 | * | solitudesf quit (Ping timeout: 256 seconds) |
22:33:58 | * | arthurz quit (Quit: Leaving) |
22:38:46 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
22:42:44 | * | Trustable quit (Remote host closed the connection) |
22:43:48 | * | SenasOzys quit (Remote host closed the connection) |
22:50:09 | radagast | @Varriount CRTP CRTP CRTP CRTP CRTP CRTP CRTP CRTP CRTP CRTP :D |
23:11:48 | * | happycoder joined #nim |
23:12:07 | GitDisc | <NopeDK> So with a project.nims I can define a "task build" with whatever I want in the body for switches and when someone runs "Nim build"(or does it need " project"?) it would execute the script and underlying commands? And end it with "setCommand c" for it to automatically compile the project? |
23:36:37 | dom96 | you might want to consider using Nimble for that. |
23:39:57 | * | MJCaley joined #nim |
23:40:12 | * | MJCaley quit (Client Quit) |
23:53:27 | * | happycoder quit (Ping timeout: 240 seconds) |
23:57:46 | * | marenz quit (Ping timeout: 260 seconds) |
23:58:53 | * | derlafff quit (Remote host closed the connection) |
23:59:33 | * | derlafff joined #nim |