00:02:51 | FromGitter | <naelt> hello, im new to learn nim. i try some examples from nim in action on openbsd 6.2. i get a error message "Error: execution of an external compiler program 'gcc -c -w -pthread", when i try spawn a thread in a really simple example like let name = spawn stdin.readLine() . in the compilation step i set also --threads:on. i did not try it on other os, because openbsd is my target. it may be this a specific bsd error? |
00:05:48 | * | laas quit (Quit: WeeChat 1.9.1) |
00:15:19 | * | jinshil joined #nim |
00:20:00 | * | def-pri-pub joined #nim |
00:27:13 | FromGitter | <naelt> nim version 0.17.2 |
00:28:13 | FromGitter | <techate> that's not a BSD-specific error message, it's not some kind of weird OpenBSD security f.e. that's just the error message provided when the command it calls to compile some code fails |
00:28:37 | FromGitter | <techate> it's probably that you need -pthreads instead of -pthread, or something. I remember that OpenBSD had special flags there. |
00:30:45 | FromGitter | <techate> with ktrace/kdump you might see the error provided by gcc itself, which might be more helpful: http://www.dotresults.com/2010/03/21/openbsd-strace-equivalent/ |
00:31:04 | FromGitter | <naelt> thank you very much :) |
00:35:15 | * | endragor quit (Remote host closed the connection) |
00:35:41 | * | endragor joined #nim |
00:38:46 | * | astronavt joined #nim |
00:39:21 | * | endragor_ joined #nim |
00:40:11 | * | endragor quit (Ping timeout: 255 seconds) |
00:43:45 | * | endragor_ quit (Ping timeout: 248 seconds) |
00:43:47 | * | astronavt quit (Ping timeout: 255 seconds) |
00:44:23 | * | astronavt joined #nim |
00:44:28 | * | astronavt quit (Client Quit) |
00:46:38 | * | astronavt joined #nim |
00:49:50 | * | def-pri-pub quit (Quit: Leaving.) |
00:59:02 | FromGitter | <naelt> your answer lead me in the right direction, upgrading gcc solve my problem. thank you |
01:08:33 | FromGitter | <techate> cool. thanks for letting us know how you fixed it |
01:08:33 | * | yglukhov joined #nim |
01:15:17 | * | yglukhov quit () |
01:47:57 | * | MJCaley joined #nim |
01:59:05 | * | vivus quit (Quit: Leaving) |
02:10:21 | * | rbrt quit (Quit: Oíche mhaith) |
02:19:34 | * | rbrt joined #nim |
02:26:35 | * | vlad1777d quit (Ping timeout: 240 seconds) |
02:33:03 | * | marenz__ quit (Ping timeout: 248 seconds) |
02:55:38 | * | chemist69 quit (Ping timeout: 255 seconds) |
03:09:45 | * | chemist69 joined #nim |
03:21:37 | * | arecaceae quit (Remote host closed the connection) |
03:21:56 | * | arecaceae joined #nim |
03:25:59 | * | def-pri-pub joined #nim |
03:40:50 | * | def-pri-pub quit (Quit: Leaving.) |
03:56:54 | * | rbrt quit (Quit: Oíche mhaith) |
03:59:48 | * | mr_yogurt joined #nim |
04:02:08 | * | rbrt joined #nim |
04:05:07 | * | astronavt quit (Disconnected by services) |
04:05:37 | * | astronavt joined #nim |
04:06:25 | * | astronavt quit (Disconnected by services) |
04:07:56 | * | astronav_ joined #nim |
04:10:39 | * | astronav_ quit (Remote host closed the connection) |
04:11:59 | FromGitter | <zacharycarter> I almost have my game graphics situation figured out |
04:12:05 | FromGitter | <zacharycarter> stumbling on the last bit |
04:14:38 | * | MJCaley quit (Quit: MJCaley) |
04:18:05 | FromGitter | <kdheepak> Does anyone know if I use Nim to create a touch bar application? |
04:21:21 | * | astronav_ joined #nim |
04:34:16 | mr_yogurt | is version 1.0 supposed to be 'soon |
04:34:28 | mr_yogurt | *'soon'? |
04:34:33 | * | rbrt quit (Quit: Oíche mhaith) |
04:36:36 | * | jinshil left #nim ("Good-bye!") |
04:37:12 | FromGitter | <techate> latest that I've seen: https://forum.nim-lang.org/t/3337#21029 |
04:38:57 | mr_yogurt | also, do plans exist for a major backwards-compatibility-breaking update sometime in the future? (is 1.0 supposed to be that update?) |
04:44:44 | * | onionhammer quit (Quit: WeeChat 1.9.1) |
04:45:20 | * | onionhammer joined #nim |
04:46:24 | * | SenasOzys quit (Remote host closed the connection) |
04:48:00 | * | rbrt joined #nim |
04:49:22 | * | SenasOzys joined #nim |
05:07:06 | * | rbrt quit (Quit: Oíche mhaith) |
05:12:30 | * | rbrt joined #nim |
05:12:54 | * | dddddd quit (Remote host closed the connection) |
05:22:52 | * | rbrt quit (Quit: Oíche mhaith) |
05:26:04 | * | rbrt joined #nim |
05:40:53 | * | skrylar joined #nim |
05:47:14 | skrylar | boop. |
05:51:58 | * | astronav_ quit (Remote host closed the connection) |
06:03:16 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
06:10:42 | * | SenasOzys_ joined #nim |
06:11:17 | * | SenasOzys quit (Read error: Connection reset by peer) |
06:25:24 | * | def-pri-pub joined #nim |
06:26:11 | * | def-pri-pub left #nim (#nim) |
06:30:44 | FromGitter | <mratsim> @mr_yogurt 2.0 at the earliest |
06:32:17 | FromGitter | <mratsim> For now the only major change planned is destructors for seq/string but interface will stay the same |
06:32:27 | * | rbrt quit (Quit: Oíche mhaith) |
06:35:52 | FromGitter | <mratsim> @kdheepak you can probably use it, Nim compiles to Objective C and can import objective C libraries. |
06:36:48 | * | nsf joined #nim |
06:45:00 | * | endragor joined #nim |
06:49:27 | * | endragor quit (Ping timeout: 240 seconds) |
07:01:05 | * | endragor joined #nim |
07:01:58 | * | endragor quit (Remote host closed the connection) |
07:02:46 | * | endragor joined #nim |
07:15:23 | * | bluenote joined #nim |
07:18:27 | * | m712 quit (Ping timeout: 246 seconds) |
07:21:25 | * | m712 joined #nim |
07:27:49 | * | mr_yogurt quit (Ping timeout: 260 seconds) |
07:33:51 | * | gokr joined #nim |
07:35:06 | * | endragor quit (Remote host closed the connection) |
07:46:19 | * | endragor joined #nim |
07:50:22 | * | Ven joined #nim |
07:50:46 | * | Ven is now known as Guest85501 |
07:54:48 | * | PMunch joined #nim |
08:00:47 | * | endragor quit (Remote host closed the connection) |
08:04:11 | * | Guest85501 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:08:49 | * | Ven joined #nim |
08:08:57 | * | Vladar joined #nim |
08:09:12 | * | Ven is now known as Guest409 |
08:10:25 | skrylar | thinking about adopting debian's policy on what 'stable means' |
08:10:34 | skrylar | well, mostly the "if there are no bugs in ten days" part |
08:12:22 | * | Guest409 quit (Client Quit) |
08:13:28 | * | Ven joined #nim |
08:13:52 | * | Ven is now known as Guest63647 |
08:16:42 | * | miran joined #nim |
08:18:43 | * | vlad1777d joined #nim |
08:19:50 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:21:16 | * | endragor joined #nim |
08:24:59 | * | bluenote quit (Ping timeout: 260 seconds) |
08:26:33 | * | endragor quit (Ping timeout: 268 seconds) |
08:31:17 | * | claudiuinberlin joined #nim |
08:31:30 | skrylar | On a downside, it seems ibus input modes don't work in EFL/FLTK |
08:33:00 | * | vlad1777d quit (Ping timeout: 246 seconds) |
08:34:43 | * | voidspacexyz joined #nim |
08:38:20 | * | sz0 joined #nim |
08:38:39 | PMunch | Hmm, is there any functional difference between result = Something and just an implicit return of Something? |
08:38:56 | * | endragor joined #nim |
08:39:34 | PMunch | I think Araq mentioned something about result directly populating the memory of the return value, instead of first constructing an object and then returning it. Is this true for imlicit returns as well? |
08:42:36 | * | Arrrr joined #nim |
08:42:36 | * | Arrrr quit (Changing host) |
08:42:36 | * | Arrrr joined #nim |
08:44:46 | * | PMunch quit (Remote host closed the connection) |
08:46:08 | * | PMunch joined #nim |
08:53:08 | skrylar | PMunch, sounds about right |
08:53:34 | skrylar | assuming the return value is an object, and not a ref/ptr/something that has to be new/make'd anyway |
09:02:39 | PMunch | Why wouldn't a ref/ptr work the same way? |
09:03:02 | PMunch | I mean putting the ref directly into the return position, obviously not the object itself |
09:07:50 | skrylar | because if result is a pointer, you have to assign it to an allocated object |
09:08:19 | skrylar | if result is just regular old data, then making a local one and copying it to result might save time (assuming it doesn't get optimized away) |
09:08:29 | skrylar | *avoiding |
09:08:53 | skrylar | ref types might get auto allocated too, not sure. |
09:22:58 | FromGitter | <Varriount> Return values are usually inefficient and/or inflexible. "Out" parameters allow the caller to do things like reuse memory. |
09:31:36 | skrylar | don't out and var become pointers in c? |
09:31:40 | skrylar | i know var does |
09:32:32 | skrylar | i looked at efl again earlier. embedded systems people seem to like it for making like.. car UIs apparently |
09:36:14 | FromGitter | <Varriount> Var becomes a pointer to the stack location |
09:39:28 | * | Guest63647 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:41:33 | * | Ven joined #nim |
09:41:57 | * | Ven is now known as Guest85201 |
09:46:45 | * | dexterk joined #nim |
09:51:09 | PMunch | Varriount, really? |
09:51:31 | PMunch | So if I pass a var int to a procedure it will directly modify that position in my stack frame? |
09:53:24 | FromGitter | <andreaferretti> I hope so! |
09:53:40 | FromGitter | <Varriount> Yes. |
09:54:26 | FromGitter | <Varriount> That's the most efficient way to make the "assigning to the parameter changes the source value" work. |
09:54:57 | PMunch | Huh, neat! |
09:57:00 | * | Guest85201 quit (Read error: Connection reset by peer) |
09:57:07 | skrylar | out and var are synonymous afaik |
09:57:16 | skrylar | i've read from 'out' parameters and it wasn't an error |
09:57:32 | * | Ven joined #nim |
09:57:55 | * | Ven is now known as Guest16662 |
09:58:56 | * | Ven joined #nim |
09:58:56 | * | Guest16662 quit (Read error: Connection reset by peer) |
09:59:19 | * | Ven is now known as Guest4030 |
10:00:41 | * | floppydh joined #nim |
10:28:25 | * | arnetheduck joined #nim |
10:46:17 | * | sz0 quit (Quit: Connection closed for inactivity) |
10:54:45 | * | Guest4030 quit (Read error: Connection reset by peer) |
10:55:15 | * | Ven joined #nim |
10:55:39 | * | Ven is now known as Guest21780 |
10:56:05 | * | salewski joined #nim |
10:58:10 | salewski | Note: gintro package is now using files from oldgtk3 instead repositories from ngtk3 for bootstrapping. |
10:58:16 | * | Guest21780 quit (Read error: Connection reset by peer) |
10:58:32 | * | Ven_ joined #nim |
10:59:12 | salewski | This gives fewer warnings during install, and I may be able to completely delete deprected ngtk3 soon. |
10:59:46 | salewski | In case it should not work for you, then let me know. Bye. |
11:00:28 | * | salewski quit (Client Quit) |
11:04:19 | Arrrr | How do you turn {.experimental.} on in every nim file? |
11:07:18 | * | Senketsu quit (Remote host closed the connection) |
11:13:08 | FromGitter | <mratsim> I hate working with error code as return values :/ Give me a pretty exception instead of "CUDNN_STATUS_NOT_SUPPORTED" or "CUDNN_STATUS_BAD_PARAM" ... |
11:16:41 | FromGitter | <andreaferretti> yeah, it's really frustrating when some CUDA code gives you an opaque error like this |
11:21:42 | * | xkapastel joined #nim |
11:27:32 | skrylar | mratsim: that has been a topic of debate for the firebird wrapper |
11:28:14 | skrylar | though exceptions are nightmares across language bounds |
11:29:06 | skrylar | i recall one of the major reasons Go lacks them is because of the plumbing they require, and how despite java/c#/c++ having them for 20 years the plumbing isn't even standardized |
11:29:07 | FromGitter | <mratsim> The worse thing is I get cudnn_status_not_supported for a proc that shouldn't return that :/ |
11:29:45 | FromGitter | <mratsim> Nice discussion on exception including for go: https://stackoverflow.com/questions/1736146/why-is-exception-handling-bad |
11:30:37 | skrylar | I rather like Lisp error handling admittedly |
11:30:46 | skrylar | exceptions are also one place that are simplified with a GC |
11:31:09 | skrylar | you just longjmp to a handler and the gc sorts it later. ref systems have to inject book-keeping |
11:31:59 | skrylar | if some experimental ocaml programmers are to be believed, jamming the cpu / cache /etc all the time for that book keeping is *worse* than properly used GC |
11:33:35 | skrylar | I may have to open an issue on github and leave it for a few days, about if interbase/firebird users want exceptions. i can see the appeal, although people also don't tend to check every error code |
11:33:46 | FromGitter | <mratsim> By the way @andreaferretti are you still working on linear algebra/machine learning stuff? |
11:39:38 | FromGitter | <alehander42> the glang faq `[excptions] They are, by definition, exceptional ` |
11:40:22 | FromGitter | <alehander42> I hate when people use semantic accidents to prove their point |
11:41:08 | FromGitter | <alehander42> exceptions are errors, when you e.g. have a parser for something, getting an error is extremely un-exceptional |
11:41:21 | skrylar | https://github.com/Skrylar/firebird/issues/6 |
11:41:46 | * | MJCaley joined #nim |
11:42:01 | skrylar | well, i find exceptions useful for fatal errors only |
11:42:35 | skrylar | also writing tons of try/catch is quite annoying |
11:42:47 | FromGitter | <alehander42> you don't have to write a ton of try/catch-s |
11:43:01 | FromGitter | <alehander42> and this is very dependent on the usecase |
11:43:11 | FromGitter | <alehander42> in some cases they're very useful for non-fatal errors too |
11:43:35 | FromGitter | <alehander42> the ability to propagadate them to a single place of checking and continuing is very powerful |
11:43:59 | skrylar | i dislike them for nonfatal errors because there is no adequate restart system |
11:44:14 | FromGitter | <alehander42> you write the restart system |
11:44:26 | skrylar | in the case of lisp (or some custom try/catches in C) there is a formal way to communicate nonfatal errors, i do like those |
11:44:37 | FromGitter | <alehander42> e.g. the parser example, you catch exceptions in your parseLine function, and you add them to error list, and continue with next parseLine |
11:44:41 | skrylar | otherwise its back to many try/catches :) |
11:44:48 | FromGitter | <alehander42> this is *one* try catch |
11:45:06 | skrylar | in that specific example it is |
11:45:13 | FromGitter | <alehander42> well there are many possible examples |
11:45:18 | FromGitter | <mratsim> Agree with alehander42, exceptions are just to handle error, say you pass a 3d Tensors to something that only accepts a 2d matrix? Exceptional? No, should be warned? Yes, should the proc automatically handle it? How it doesn't have the context ===> Exception. Obviously it should be done before any side effects happen. |
11:45:35 | skrylar | in the case of ex.dealing with a database, you need one for the overall connect/query/close and then another one for say if a single record update is being weird |
11:45:53 | skrylar | so you end up with try {stuff} try {update record} except {record is busy} | except {database is borked} |
11:46:14 | FromGitter | <alehander42> well that's the whole point, you have the choise |
11:46:23 | FromGitter | <alehander42> if you need granularity, you do several except-s |
11:46:36 | FromGitter | <alehander42> but often you just need to catch all db exceptions and print something generic |
11:46:40 | FromGitter | <mratsim> What is lisp way of handling? An "Either" type which returns (Result, Option[Exception]) ? |
11:46:58 | FromGitter | <alehander42> and you can do with one try catch and many excepts your example |
11:47:01 | skrylar | mratsim: they have exceptions like c++/nim and they also have restart handlers |
11:47:39 | skrylar | the db code can issue a nonfatal exception "record update failed" and a handler can choose one of the restarts ex. "retry, abort, change query and run again" where the last one might be used in a REPL |
11:48:07 | skrylar | or in a system i worked on very briefly, if a texture had an issue the restarts could be "load a different one, load a smaller mipmap, load a generic placeholder" |
11:48:11 | FromGitter | <alehander42> well you can implement such a handler in several lines yourself |
11:48:24 | skrylar | you can do everything yourself, always. |
11:48:26 | * | skrylar rolls eyes |
11:48:30 | FromGitter | <mratsim> Rust way is not bad too, it allows function chaining as well. |
11:48:43 | FromGitter | <alehander42> but it's so much easier to do it on top of exceptions than on top of just error codes :D |
11:48:57 | FromGitter | <alehander42> of course restart handlers are cool, but they're just extra |
11:49:00 | FromGitter | <mratsim> Depends on pattern matching I'd say. |
11:49:11 | skrylar | pattern matching is neat |
11:49:18 | FromGitter | <alehander42> yeah I like it too |
11:49:32 | skrylar | you can pass in closures to functions to immitate restarts |
11:49:41 | skrylar | it's just that people aren't familiar with that pattern in the first place |
11:50:11 | skrylar | just like people aren't generally aware of call/cc :p |
11:52:26 | * | MJCaley quit (Quit: MJCaley) |
11:52:34 | skrylar | bleh. embarcadero's site appears to be collapsing on itself |
11:52:47 | skrylar | doc wiki is down and funny sentences like this: "For upgrade and other InterBase licenses please reach out to your EMB_TEXT_SALES_REPRESENTATIVE or EMB_TEXT_LOCAL_EMBARCADERO_RESELLER partner for details." |
11:55:10 | FromGitter | <alehander42> wow embarcadero were the delphi ide guys right |
11:55:18 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:55:34 | FromGitter | <alehander42> distant memories of their delphi ide |
11:55:35 | skrylar | yea |
11:55:43 | skrylar | i was using them to figure out how firebird worked |
11:56:34 | * | Ven joined #nim |
11:56:59 | * | Ven is now known as Guest96202 |
12:09:00 | Araq | I don't like exceptions either :-) but my alternative, "better API design" doesn't convince anybody |
12:09:25 | Araq | and Rust and Golang are bad examples of how to not include exceptions |
12:10:27 | Araq | exceptions really feel like a dated solution though in a world where message passing is so important |
12:11:26 | * | Guest96202 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:13:55 | FromGitter | <mratsim> Well as long as you can give fine-grained error message like “Issue, shape %i from param %d is incompatible with shape %i from param %d” % (foo_shape, foo, bar_shape, bar) instead of “BAD_PARAMETER” I’m fine with any solution |
12:15:07 | skrylar | there is the hell that interbase uses :) |
12:15:23 | skrylar | a 20-word vector that is written to in magic pairs that have to be matched against documentation to figure out wat |
12:17:52 | FromGitter | <alehander42> I do like return-based errors with sum types and pattern matching, but it's good to have some `escalate` option |
12:20:20 | * | ttoe joined #nim |
12:20:28 | FromGitter | <alehander42> eg I do `a = weirdOperation() # must handle error case` ⏎ `a = weirdOperation?() # must be in Result<> function if error escalate it to the parent call otherwise unwrap` |
12:23:52 | ttoe | Hi. I ran the parallel example from the manual: https://nim-lang.org/docs/manual.html#parallel-spawn-parallel-statement |
12:24:56 | ttoe | Weirdly I get the same result instantaneously whatever number i run the function "pi" with |
12:25:20 | ttoe | and i have no chance to observe if anything happened in parallel... |
12:25:46 | Araq | ttoe it's just a toy examples, FP precision could prevent any real observations |
12:26:16 | ttoe | Araq: ah ok, thanks |
12:27:14 | FromGitter | <mratsim> This line will probably be slower than serial by the way due to false sharing: ⏎ ⏎ ```ch[k] = spawn term(float(k))``` [https://gitter.im/nim-lang/Nim?at=5a12ca22ba39a53f1ac130b5] |
12:28:53 | FromGitter | <andreaferretti> @mratsim Unfortunately my work on Nim in general has stalled due to other things at work :-( |
12:29:07 | FromGitter | <andreaferretti> Hopefully I will be able to contribute a little more after december |
12:31:45 | FromGitter | <mratsim> argh :/ |
12:32:14 | FromGitter | <mratsim> well at least your workplace is supporting and using Nim :) |
12:38:50 | * | voidspace_xyz joined #nim |
12:41:36 | * | voidspacexyz quit (Ping timeout: 248 seconds) |
12:58:18 | Araq | interestingly even Erlang has exceptions |
12:58:55 | Araq | with its supervisor trees and tiny processes they still felt the need for exceptions |
13:00:21 | skrylar | mratsim: https://arxiv.org/abs/1711.02213 |
13:02:10 | FromGitter | <alehander42> erlang's throw is perfect example of the `escalate` thing |
13:02:32 | FromGitter | <alehander42> it's basically a non-local return |
13:02:45 | FromGitter | <alehander42> and you're supposed to deal with it inside your module/process usually |
13:05:10 | * | voidspace_xyz quit (Ping timeout: 264 seconds) |
13:05:33 | * | voidspacexyz joined #nim |
13:05:38 | Arrrr | is cast really caster than type() ? |
13:05:41 | Arrrr | *faster |
13:09:40 | Araq | Arrrr, depends on the involved types. |
13:10:03 | Araq | but it's not the same, there is no speed tradeoff here, they do different things? |
13:10:41 | Arrrr | say a conversion between different integer types. |
13:13:49 | skrylar | Araq, it might be necessary to have a nim.cfg option to add things for staticexec's path |
13:14:29 | skrylar | we're running in to a strange situation where ex. firebird on SuSE puts fb_config somewhere silly, which means PATH has to be edited to find it |
13:14:40 | skrylar | although in debian/arch its in a normal place, so it works fine with a nimble install |
13:14:58 | Araq | who uses SuSE anyway :P |
13:15:04 | skrylar | qqtop does apparently |
13:16:31 | Araq | it's a valid point though |
13:16:44 | Araq | path support staticExec sounds like a useful thing to have |
13:21:09 | * | dddddd joined #nim |
13:23:29 | FromGitter | <mratsim> @skrylar, funny someone sent me Flexnet PDF on Slack just 1 hour ago :p |
13:24:08 | Araq | http://www.erlang.se/euc/04/carlsson_slides.pdf claims 'throw/catch' is not widely used |
13:25:58 | FromGitter | <mratsim> For me exceptions are like GC, when Nim 1.0 will be posted, I bet that there will be a thread "Nim has GC so it's bad" and another "Nim has exceptions so it's bad". |
13:26:11 | FromGitter | <mratsim> On HN* |
13:26:49 | skrylar | mratsim: Import AI just mentioned it |
13:27:01 | dom96 | kdheepak: You can most definitely create an app that makes use of the touch bar on the new MBPs using Nim |
13:27:16 | skrylar | how can gc and exceptions be bad on hackernews. that place was founded by lispers and lisp does both of those things |
13:28:07 | * | d10n-work joined #nim |
13:28:09 | FromGitter | <mratsim> The bare-metal crowd, spear-headed by C/Rust and a bit less C++ people. |
13:32:24 | FromGitter | <mratsim> Mmm author of ZeroMQ says he should have use C + error codes instead of C++ + exceptions: http://250bpm.com/blog:4 |
13:36:12 | FromGitter | <mratsim> (I'm not convinced) |
13:36:23 | FromGitter | <alehander42> Araq: but error/exit (the process exceptions) are more used ? |
13:36:55 | * | ttoe quit (Quit: Page closed) |
13:37:45 | * | Jesin quit (Quit: Leaving) |
13:39:51 | * | cspar_ joined #nim |
13:42:28 | * | cspar quit (Ping timeout: 240 seconds) |
13:50:07 | Araq | I don't know |
13:54:32 | * | sz0 joined #nim |
13:55:06 | * | SenasOzys_ quit (Remote host closed the connection) |
13:55:31 | * | SenasOzys_ joined #nim |
13:59:46 | Araq | erlang uses tail recursions instead of looping so what is 'break' in Nim becomes "ugh" in Erlang |
14:04:09 | PMunch | Wouldn't break just be return with tail end recursion? |
14:04:21 | PMunch | Since you're reusing the stack frame |
14:05:08 | Araq | how so? return would be a local return, you would need some propagation mechanism |
14:09:09 | FromGitter | <techate> since you're tail-recurring there's nothing to propagate to |
14:09:48 | Araq | I think it means your tail recursion becomes a real recursion |
14:10:09 | Araq | not that "return" suddenly does the proper thing for you and leaves the loop |
14:10:09 | FromGitter | <techate> but it depends on how you do it. can't just reuse one of the existing tail-recursive functions in the language and expect your provided fun to break for you |
14:11:15 | PMunch | Wait, what are you discussing? |
14:11:56 | FromGitter | <techate> Erlang not having break as a subtopic of exceptions vs. other error handling |
14:12:44 | PMunch | Ah right |
14:14:57 | * | MJCaley joined #nim |
14:15:02 | * | LyndsySimon left #nim (#nim) |
14:19:21 | * | nsf quit (Quit: WeeChat 1.9.1) |
14:22:49 | FromGitter | <techate> https://gist.github.com/techate/4ff55eae9c7c4d40b102137bd5276fa3 f.e. |
14:23:25 | FromGitter | <techate> eh the 'echo n' should de-indented fully. copy&paste error. |
14:23:55 | * | fvs joined #nim |
14:24:23 | FromGitter | <techate> you don't need to do anything special to exit the loop. just stop looping. |
14:28:47 | FromGitter | <krux02> I saw the changes section for the 0.18 Version of Nim. Looks really good to me, I like it :D |
14:31:47 | * | crem quit (Ping timeout: 258 seconds) |
14:33:10 | FromGitter | <krux02> Nim is really developing Nicely into a good language |
14:33:30 | * | crem joined #nim |
14:37:25 | PMunch | krux02, link? |
14:39:42 | * | ftsf quit (Ping timeout: 260 seconds) |
14:44:09 | FromGitter | <krux02> PMunch: https://github.com/nim-lang/Nim/blob/devel/changelog.md |
14:44:34 | PMunch | Thanks :) |
14:47:17 | PMunch | Nice, I like the changes to the JSON module |
14:47:26 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:47:31 | PMunch | But what's the difference between getBiggestInt and getInt? |
14:50:48 | euantor | BiggestInt = 64 bit always IIRC, int is platform dependent |
14:50:52 | PMunch | Haha GitHub markdown didn't like the ..code-block:: nim stuff :P |
14:51:57 | FromGitter | <mratsim> It's not Nim it's reStructured |
14:52:12 | PMunch | Hmm |
14:52:24 | * | PMunch quit (Quit: Leaving) |
14:52:48 | Araq | yeah I'll never get used to markdown :P RST is just superior |
14:53:36 | * | claudiuinberlin joined #nim |
14:54:20 | * | MJCaley quit (Quit: MJCaley) |
14:55:35 | * | Jesin joined #nim |
15:00:34 | FromGitter | <krux02> what is so much better with RST compared to markdown? |
15:00:43 | FromGitter | <krux02> I really have no opinion, for me it is just differnet |
15:01:19 | FromGitter | <krux02> also was hast du so zu sagen? |
15:01:35 | FromGitter | <krux02> sorry wrong chat |
15:02:09 | Araq | RST has more features and trailing whitespace is not significant |
15:03:23 | skrylar | well markdown was intended to be a way to format the way people wrote emails in to html |
15:03:33 | * | SenasOzys__ joined #nim |
15:03:35 | skrylar | it wasn't built to make docbooks |
15:03:38 | Araq | also RST was carefully designed for documenting (Python) source code, markdown feels more like a hack for "I need a syntax for my forum software" |
15:04:03 | skrylar | i sort of like texinfo. asciidoc is ok |
15:04:15 | skrylar | but texinfo has roughtly 3 elements of syntax, and asciidoc has many |
15:05:08 | skrylar | only used rst briefly with sphinx |
15:05:17 | * | ftsf joined #nim |
15:05:26 | FromGitter | <krux02> I us rst only in the Nim forum |
15:05:39 | * | SenasOzys_ quit (Ping timeout: 250 seconds) |
15:06:31 | FromGitter | <krux02> I read that rst is a remake of structured text, but with a specification first |
15:06:59 | FromGitter | <krux02> could be that Nim has that Future, too. Some reNim |
15:07:05 | FromGitter | <krux02> with specification first |
15:07:28 | Araq | planned for Nim v2 :P |
15:07:50 | Araq | though specs are hard to write and the ultimate form of a spec is an executable spec |
15:07:56 | Araq | also known as "program" |
15:08:23 | FromGitter | <krux02> well yea, but a specification is kind of helpful |
15:08:57 | FromGitter | <krux02> and it helps to decide if something is a bug or a feature |
15:12:57 | Araq | specs come after successes |
15:13:19 | Araq | it's hard to find many cases where the spec came first |
15:15:28 | FromGitter | <krux02> Algol 68 |
15:15:40 | FromGitter | <krux02> But you can't really speak from success :P |
15:15:57 | crem | Often idea looks good until you try to use it, that's the problem with spec-first languages. Spec-last is much more live and malleable. |
15:16:10 | FromGitter | <krux02> And Plankalkül has the spec first |
15:16:39 | crem | C++ is kind of spec-first, especially in 90s. |
15:16:53 | * | nsf joined #nim |
15:17:52 | FromGitter | <krux02> Well, not really. There are a lot of c++ implementations all implementing non-spec features that then develop into the spec |
15:17:55 | FromGitter | <krux02> same with OpenGL |
15:18:11 | FromGitter | <krux02> (not a programming language, but same development process) |
15:18:50 | Araq | I don't really know, but I bet the first Ansi C++ standard came after "C with classes version 1" |
15:20:43 | crem | For modern C++, usually features are tested before including into the standard. But in 90s, there were all those template exporting, weird throw definitions for functions, etc, which were not viable. |
15:20:45 | FromGitter | <krux02> Araq: I would really like to talk again about ``getImpl`` again and the non-symbol identifiers for the arguments |
15:21:11 | Araq | don't talk about it, fix it |
15:21:26 | FromGitter | <krux02> well ok I plan to actually do it |
15:21:28 | Araq | but document this breaking change |
15:21:35 | FromGitter | <krux02> but I don't know where the ast is created |
15:21:45 | FromGitter | <krux02> in changes.md? |
15:21:48 | Araq | semtypes.nim |
15:21:55 | Araq | yes, in changes.md |
15:22:02 | FromGitter | <krux02> ok |
15:22:29 | FromGitter | <krux02> I take it as `green light` for the change |
15:22:40 | * | Senketsu joined #nim |
15:24:43 | FromGitter | <krux02> Araq: semtypes is long, can you tell me how and when in the compilation the implementation ast is constructed |
15:25:09 | Araq | well it isn't, which is your problem |
15:25:20 | Araq | the original AST is not touched in this case |
15:25:33 | Araq | instead the type is constructed |
15:26:11 | FromGitter | <krux02> all I found out so far is, that when I call get Impl it returns the ast node that is stored in the symbol node |
15:26:25 | FromGitter | <krux02> but that means that the ast at that point in time is already existent |
15:28:26 | FromGitter | <krux02> I would like to know how and where that node with the ast is created |
15:30:46 | * | voidspace_xyz joined #nim |
15:32:50 | Araq | semstmts.nim line 1465 |
15:32:54 | Araq | s.ast = n |
15:33:06 | Araq | as well as in a few other places |
15:33:23 | FromGitter | <krux02> ok thanks I will look into that |
15:33:31 | FromGitter | <krux02> and probably have problems |
15:33:55 | * | skrylar mutters that everything that isn't the common lisp hyperspect is probably waste material |
15:34:08 | * | voidspacexyz quit (Ping timeout: 240 seconds) |
15:34:10 | * | SenasOzys__ quit (Remote host closed the connection) |
15:34:30 | * | SenasOzys__ joined #nim |
15:34:31 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
15:34:33 | FromGitter | <krux02> well I don't know common lisp hyperspect |
15:34:39 | skrylar | funny to think people used to deride common lisp for "having a hundred pages of spec", yet the C++ drinking game is every time something is "implementation specific" or "undefined" |
15:34:49 | skrylar | its called the hyperspec, i just mispelled it |
15:35:08 | Araq | skrylar common lisp misses the "linear Lisp" features though |
15:35:26 | skrylar | it also misses the compiler that lets you use it for games :| |
15:35:27 | FromGitter | <krux02> there is also unspecified |
15:35:42 | FromGitter | <krux02> for example the type for a lambday expression in c++ is unspecified |
15:35:45 | skrylar | yea but the thing is people were being rude towards lisp because "the c++ spec is shorter therefore c++ is good" |
15:35:55 | skrylar | But the Common Lisp hyperspec leaves almost nothing undefined. |
15:36:47 | FromGitter | <krux02> there was a lisp assembler hybrid invented by naughty dog in the PS2 Aera |
15:36:59 | skrylar | it does seem to be best to have some amount of people working on random stuff, then coalesce the working parts of those random stuff in to a well specified core with extension points |
15:37:33 | FromGitter | <krux02> Emacs Lisp will rule all the Lisp implementations :P |
15:37:52 | skrylar | i would have kept using lisp if it was viable :p |
15:38:17 | FromGitter | <krux02> I would have kept using C++ if it was viable |
15:38:35 | skrylar | its just that, for some reason, none of the lispers who do free things seem to care. even though they keep getting people saying they'd use it if they could run a game engine on it, they just get told "well the 80mb should be acceptable" |
15:38:36 | FromGitter | <krux02> or Go, or Scala |
15:39:04 | FromGitter | <krux02> none the less each of those languages left something in our Mind that we just liked |
15:39:24 | skrylar | i don't know if smalltalk/lisp people are fundamentally derp or if they're just dead |
15:39:30 | * | fvs joined #nim |
15:41:34 | FromGitter | <krux02> well the one thing smalltalk people love is this change of the running program |
15:41:58 | FromGitter | <krux02> and I think the code exploration |
15:42:16 | skrylar | there are commercial lisps that will treeshake and give you <10mb distributables |
15:42:35 | skrylar | there used to be those for smalltalk but i dunno |
15:42:49 | skrylar | for some reason the unix world decided to use the worst language they could find instead of the good ones |
15:42:55 | skrylar | and then everyone copied this decision |
15:43:00 | FromGitter | <krux02> well I honestly think that the future for commercial programming languaes is very bad |
15:43:04 | Araq | I don't use Lisp because I like static type checking |
15:43:34 | Araq | and the ((())) is just too optimized for parser simplicity for my taste |
15:43:52 | skrylar | allegedly there was going to be a real syntax but people got used to the parens before it was done |
15:43:54 | FromGitter | <krux02> I don't think C is the worst language |
15:44:09 | FromGitter | <alehander42> exactly, people love to boast how "you write directly ast", but that's actually tedious |
15:44:25 | skrylar | i think someone said the syntax was going to be what haskell ended up using, or similar |
15:44:29 | skrylar | but it just never happened |
15:44:50 | * | rbrt joined #nim |
15:44:53 | FromGitter | <krux02> my two cents, I think in the future we won't have syntax trees in text form anymore |
15:44:59 | skrylar | smalltalk would probably be a fun scripting language in nim. if nothing else because ST-80 takes like no effort to teach noobs |
15:45:12 | FromGitter | <krux02> will take a long time until we are there, but text editors will just become less important |
15:45:15 | FromGitter | <alehander42> @krux02 I've played a lot with that idea |
15:45:27 | skrylar | source-code-in-database is an old thing |
15:45:37 | FromGitter | <krux02> I don't mean in database |
15:45:40 | Araq | C is not the worst language but all its innovations turned out to be misguided |
15:45:46 | skrylar | there's also job automation. lol |
15:45:47 | FromGitter | <alehander42> on one hackathon I implemented something like a central format with a bidirectional grammar and realtime translator between user definable syntaxes |
15:46:03 | skrylar | well c is sold as a readable assembler |
15:46:04 | Araq | arrays decoy into pointers, type definitions reflect an expression's usage |
15:46:08 | skrylar | but you don't write all your shit in assembly |
15:46:37 | Araq | assembly has far fewer corner cases and a dead simple syntax, not a syntax that is dynamite |
15:47:01 | skrylar | would rather just do what red did |
15:47:02 | Araq | where you can leave out a * and introduce a backdoor |
15:47:10 | FromGitter | <krux02> I mean that instead of writing text and thinking an ast, and the computer then parses that ast hopefully in the same way as thought. I think the future will give us programming languages where the ast is presented to us in some form and we an operato on the ast, not text. |
15:47:25 | skrylar | "heres the lisp dialect for make run fast and the lisp dialect for i want to keep my hair attached" |
15:47:49 | FromGitter | <alehander42> the point was to have different "views" on the ast (even ui) |
15:47:56 | FromGitter | <krux02> there is scratch (programming for children) doing that, and there is a jetbrains project reseraching in that direction |
15:47:59 | FromGitter | <alehander42> and operate on them on need |
15:48:05 | FromGitter | <krux02> yes |
15:49:07 | FromGitter | <alehander42> isn't paredit something in that direction? basically you mostly need powerful text-like editing for trees |
15:49:19 | FromGitter | <alehander42> what's the jetbrains project |
15:49:28 | Araq | alehander42 sounds like the Nim design I started with |
15:49:59 | * | tefter quit (Remote host closed the connection) |
15:51:06 | FromGitter | <krux02> https://www.jetbrains.com/mps/?fromMenu |
15:51:09 | skrylar | wonder how the htmlparser package compares to ex gumbo |
15:51:21 | FromGitter | <alehander42> https://github.com/alehander42/hivemind the examples in the readme illustrate the idea (they define the syntaxes), but it's not easy to make something like that be robust and well defined in each case |
15:51:24 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:51:37 | FromGitter | <alehander42> was that the idea behind filter Araq? |
15:52:29 | skrylar | there was this http://ohayo.computer/landing.html but they seem to have rebranded to make dashboards instead of just being a tree ide |
15:52:43 | * | Jesin quit (Quit: Leaving) |
15:53:51 | Araq | alehander42: source code filters? I introduced them for code generation purposes like 'niminst' uses them |
15:54:37 | Araq | I wanted a templating system that is simple to understand and so I mostly switched the defaults around |
15:55:07 | Araq | instead of quoting to get a verbatim string, you quote to get a non-verbatim expression |
15:55:47 | Araq | and since that's quite pervasive, it is done on the file level |
15:56:17 | * | sz0 quit (Quit: Connection closed for inactivity) |
15:56:46 | Araq | not much to say about it really, if your templating solution doesn't support for loops or conditionals, rethink your solution |
15:57:15 | crem | Araq: any update on nim code formatter? After being spoiled with C++ and Python code formatted, I'm missing the same for nim very much. :) |
15:57:34 | Araq | because "separation of concerns" is never a good reason to cripple a notation. |
15:58:19 | Araq | crem, I prefer to work on Nim version 1 instead or on --newruntime |
15:58:48 | crem | :( |
15:58:52 | * | Jesin joined #nim |
15:59:17 | FromGitter | <alehander42> I see, makes sense, I have to look at them |
15:59:43 | FromGitter | <alehander42> is the idea behind the code formatter to just pretty print PNode-s according to configurable style object ? |
15:59:53 | FromGitter | <alehander42> (I am trying to see how it is diff than repr |
16:00:07 | Araq | except for the "configurable" part, yes |
16:00:24 | Araq | I don't plan to support configurations, there is one style to rule them all |
16:00:34 | FromGitter | <alehander42> so how is it different than repr :D |
16:00:50 | crem | If that default style will have 80 column code width limit, I'm fine. :) |
16:01:08 | Araq | crem, it has, lol |
16:01:34 | Araq | alehander42: it isn't, repr uses compiler/renderer.nim and so does 'nimpretty' once it is finished |
16:02:47 | FromGitter | <alehander42> so probably what I don't get is |
16:03:31 | FromGitter | <alehander42> isn't the process just parse Nim -> prettypring it back, why can't it be done right now with parse + repr |
16:04:35 | Araq | because it eats your non-doc comments. |
16:05:49 | * | claudiuinberlin joined #nim |
16:06:05 | FromGitter | <alehander42> auch |
16:09:11 | * | claudiuinberlin quit (Client Quit) |
16:10:17 | * | claudiuinberlin joined #nim |
16:13:55 | * | claudiuinberlin quit (Client Quit) |
16:15:12 | * | claudiuinberlin joined #nim |
16:16:01 | * | rbrt quit (Quit: Oíche mhaith) |
16:16:38 | * | nsf quit (Quit: WeeChat 1.9.1) |
16:17:30 | * | claudiuinberlin quit (Client Quit) |
16:18:10 | * | claudiuinberlin joined #nim |
16:19:37 | onionhammer | in |
16:21:19 | planetis[m] | hey! in macros there is toNimIdent() newIdentNode() ident() (and formely ! operator) to construct and NimNode. what method is prefered? |
16:21:35 | * | claudiuinberlin quit (Client Quit) |
16:21:50 | * | floppydh quit (Quit: WeeChat 1.9.1) |
16:22:11 | * | floppydh joined #nim |
16:22:50 | Araq | ident() |
16:27:51 | * | claudiuinberlin joined #nim |
16:27:55 | * | claudiuinberlin quit (Client Quit) |
16:29:07 | FromGitter | <krux02> Araq: well I kind of have no progress at all understanding that code in symtypes.nim |
16:29:30 | FromGitter | <krux02> can you explain me a bit of context? |
16:29:59 | FromGitter | <krux02> I tried to run that code with the debugger a bit and set breakpoints and display stuff |
16:30:03 | FromGitter | <krux02> just to understand that code |
16:31:09 | FromGitter | <krux02> what is ``semTypeNode`` supposed to do? |
16:31:20 | FromGitter | <krux02> what are it's arguments |
16:31:28 | FromGitter | <krux02> and what should it return? |
16:32:24 | * | Trustable joined #nim |
16:32:25 | planetis[m] | oh newIdentNode constructs a NimNode from a NimIdent the rest construct a NimIdent from a string |
16:33:37 | * | rbrt joined #nim |
16:33:40 | planetis[m] | and toNimIdent is not on the documentation in https://nim-lang.org/docs/macros.html was it added recently? |
16:36:47 | * | JappleAck quit (Ping timeout: 248 seconds) |
16:36:50 | FromGitter | <krux02> I recommend ``ident"someName"`` |
16:37:08 | FromGitter | <krux02> creates an identifier node the shortest wad |
16:37:09 | FromGitter | <krux02> way |
16:39:49 | planetis[m] | thanks krux02 |
16:41:56 | * | elrood joined #nim |
16:48:49 | crem | In nimble, can i make project depend on another local package? I have a library i want two projects to depend on. |
16:51:19 | Araq | local package? it needs to have an URL otherwise it doesn't exist |
16:51:28 | dom96 | that's false |
16:51:58 | dom96 | You can depend on it. Just need to install each dependency separately. |
16:52:07 | dom96 | (or better, use `develop`) |
16:53:49 | * | JappleAck joined #nim |
16:57:09 | * | JappleAck quit (Client Quit) |
17:00:21 | FromGitter | <krux02> Araq: I debugged the compiler for a while now. I came to the conclusion that the position semtypes.nim:1466 is not called at all from my testfile |
17:00:57 | FromGitter | <krux02> Araq: So where and how is getImpl implemented? |
17:01:17 | Araq | well you keep changing the question |
17:01:28 | FromGitter | <krux02> no I don't |
17:01:31 | * | rbrt quit (Quit: Oíche mhaith) |
17:01:38 | Araq | getImpl is different from your "parameters are not syms" problem |
17:02:10 | FromGitter | <krux02> well for me it is not different, because I don't know the implementation details and differences |
17:02:28 | Araq | proc getImpl*(s: NimSym): NimNode {.magic: "GetImpl", noSideEffect.} |
17:02:50 | Araq | gg mGetImpl compiler |
17:02:50 | Araq | compiler\ast.nim |
17:02:50 | Araq | 639: mEqIdent, mEqNimrodNode, mSameNodeType, mGetImpl, |
17:02:50 | Araq | compiler\vmgen.nim |
17:02:51 | Araq | 1025: of mGetImpl: genUnaryABC(c, n, dest, opcGetImpl) |
17:02:55 | FromGitter | <krux02> that get imple I alredy inspected |
17:03:04 | FromGitter | <krux02> it is a dead end |
17:03:23 | FromGitter | <krux02> it just returns an ast that is already constructed at the point when getImpl is called |
17:03:36 | Araq | yes, exactly |
17:03:41 | FromGitter | <krux02> so I need to change the code that constructs that AST the is returned from getImpl |
17:03:42 | Araq | so you're on the right track |
17:03:58 | Araq | however, you can also patch opcGetImpl |
17:04:13 | Araq | that has less devastating effects |
17:04:26 | FromGitter | <krux02> well I can imagine that |
17:04:45 | FromGitter | <krux02> but I also need the symbols in the do expression we talked about |
17:05:02 | FromGitter | <krux02> weet to be honest the ``do`` expression is what is important to me |
17:05:31 | FromGitter | <krux02> I am working on a nim to glsl compiler and I write the parts that are glsl in a do block, so that I can inline them |
17:07:39 | FromGitter | <krux02> for example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a130bdbf257ad9109bac1d8] |
17:08:12 | FromGitter | <krux02> this is then compiled into fragmentshader, vertexshader, varyings attributes, and uniforms |
17:08:32 | FromGitter | <krux02> ``mvp`` is a symbol that is used in that code block |
17:09:07 | FromGitter | <krux02> because it does not come from the arguments ``v`` or ``gl``, it has to be a uniform |
17:10:11 | FromGitter | <krux02> this means, that I have to check if any symbol that is used in that ast is actually one of the argument symbols or a locally defined symbol |
17:10:49 | Araq | krux02: semProcTypeNode |
17:11:19 | Araq | semtypes.nim, line 996 creates the parameter symbol |
17:11:40 | FromGitter | <krux02> ok, thank you |
17:11:41 | Araq | after its contruction try |
17:11:51 | Araq | a.sons[j] = newSymNode(arg) |
17:12:00 | Araq | to patch the original AST |
17:12:35 | FromGitter | <krux02> ok I will try to understand that part of the compiler and do what you said |
17:12:41 | Araq | I don't know how debugging would have ever got you there, as I said you want to know why something is **not** changed |
17:12:42 | * | rbrt joined #nim |
17:12:57 | Araq | so my advice, nag me more instead of debug more |
17:13:03 | * | voidspace_xyz quit (Ping timeout: 248 seconds) |
17:21:18 | FromGitter | <krux02> ok |
17:21:26 | FromGitter | <krux02> but that nagging only works when you are there, too |
17:21:40 | FromGitter | <krux02> I mean you are there a lot, but no always |
17:21:45 | FromGitter | <krux02> the debugger is there always |
17:23:43 | crem | Hmm. So I have a nim library which I don't want to publish (I'm fine with uploading it into private bitbucket repo if it helps), and want to use it in several of my toy projects, what's the best way to arrange that? Just have a symlink to a directory of that library from my project dirs? |
17:23:57 | * | voidspacexyz joined #nim |
17:24:14 | crem | Ah, maybe nimble develop is indeed what I need. |
17:24:33 | FromGitter | <krux02> you can call nimble install |
17:25:36 | crem | I guess I don't fully understand what nimble does, will read the doc and come back. :) |
17:25:59 | FromGitter | <krux02> crem: nimble just puts the source of tha project into a common path |
17:26:16 | FromGitter | <krux02> well kind of |
17:27:11 | crem | If I just do 'nimble init' for several packages, will they see each other? |
17:27:49 | * | SenasOzys_ joined #nim |
17:28:24 | crem | Doesn't seem like that.. |
17:28:33 | * | SenasOzys__ quit (Ping timeout: 248 seconds) |
17:29:31 | crem | So I have ~/dev/mylib and ~/dev/myproj, both started with `nimble init`, never uploaded to any external repo. What's the easiest way to make myproj see mylib? |
17:33:23 | * | floppydh quit (Quit: WeeChat 1.9.1) |
17:33:24 | crem | Hm, probably I should not use nimble at all for personal projects.. |
17:37:14 | crem | What's the most recent recommendation for project structure? Nimbook suggests src/, nimble reference suggests puttings sources to the root. |
17:48:57 | * | xkapastel quit (Quit: Connection closed for inactivity) |
17:49:35 | * | voidspacexyz quit (Ping timeout: 258 seconds) |
17:52:08 | Araq | crem, check Nimble's documentation |
17:52:53 | crem | Reading.. seems that I have to create a custom packages.json, and point nimble.ini's [PackageList] section to it. :-\ |
17:53:25 | FromGitter | <Varriount> Wait what? Can't you just make a nimble file? |
17:54:38 | crem | To make one non-public package depend on another non-public package. |
17:55:14 | crem | Both of them do have .nimble files. |
17:55:34 | crem | But without custome packages.json I don't see a way to make them depend on each other. |
18:00:34 | * | nhywyll joined #nim |
18:02:57 | FromGitter | <Varriount> Ah. |
18:03:59 | FromGitter | <Varriount> Well, I don't know of a package manager that has any easier mechanism for this kind of situation |
18:04:13 | * | claudiuinberlin joined #nim |
18:04:32 | * | sendell joined #nim |
18:05:01 | FromGitter | <Varriount> Python's pip requires a package index (which needs to be a webserver!) |
18:06:46 | crem | Go forced all packages to be in one source tree, so they see each other easily. I cannot say though that I like that. |
18:07:08 | FromGitter | <krux02> crem: I like that |
18:08:05 | FromGitter | <Varriount> What do you mean? They all have to be public? |
18:09:06 | * | bluenote joined #nim |
18:11:56 | sendell | is there already a nim library abstracting over WebGL and OpenGL (and possibly other graphics API) usable with the js target? Or is opengl+emscripten the way to go? :) |
18:16:12 | FromGitter | <krux02> webgl is opengl |
18:16:44 | FromGitter | <krux02> sendell, yes I think there is someone who did something like that |
18:17:03 | FromGitter | <krux02> but I am sorry I can't remember the name at the moment |
18:18:16 | sendell | no problem, maybe someone else will :) good to hear that it exists already |
18:18:38 | FromGitter | <krux02> but I think it works with emscripten |
18:19:43 | sendell | probably. might help with js target restrictions too i guess |
18:21:01 | dom96 | crem: Like I said, just use `nimble develop` on your local package's |
18:21:08 | dom96 | add them normally as a dependency |
18:21:16 | dom96 | You can just use their name's |
18:21:22 | dom96 | requires "myPkg" |
18:23:36 | crem | dom96: indeed, that works! Thanks. Before that, I tried "nimble develop mylib" from mylib/.. and that didn't work. |
18:24:43 | FromGitter | <krux02> the experience "./koch temp c /tmp/scratch.nim" add debug statement "./koch temp c /tmp/scratch.nim" is realld not good |
18:38:08 | Araq | krux02: hmm? |
18:39:32 | * | MJCaley joined #nim |
18:48:21 | * | ShalokShalom joined #nim |
19:05:32 | bluenote | @Araq: Yesterday I spend some time trying to convert a NimNode (from a getType expression) into the corresponding typedesc, and I couldn't find a solution. |
19:05:58 | bluenote | Did I miss something obvious or would it make sense to have a feature request for a NimNode -> typedesc proc in macros? |
19:06:44 | Araq | bluenote, I think it's missing |
19:11:11 | bluenote | I looked into how mNGetType is implemented (the inverse function), but couldn't really see what it would require to add it |
19:12:33 | bluenote | and do you think the typedesc forwarding problem is hard to fix? https://github.com/nim-lang/Nim/issues/6784 |
19:15:18 | Araq | bluenote, it's something I wanted to look into anyway |
19:15:38 | Araq | there is a special casing in overloading resolution for templates and macros and that's not documented |
19:15:46 | Araq | and ideally can simply be removed |
19:17:13 | bluenote | cool, then I think the string interpolation idea from @dom96 could work nicely without giving up type safety |
19:22:36 | * | laas joined #nim |
19:23:24 | laas | What exactly does this error mean? Error: cannot use symbol of kind 'let' as a 'var' |
19:23:46 | laas | I'm trying to use var instead of let in a template, and it says this |
19:26:33 | Araq | laas, you use macros.gensym incorrectly? |
19:27:23 | * | Sentreen quit (Ping timeout: 250 seconds) |
19:30:18 | laas | this is actually in a template |
19:30:24 | laas | and I want it to have a specific name |
19:32:57 | laas | oh this is weird |
19:33:05 | laas | I only have this problem when I'm generating the template inside another template |
19:40:32 | * | Sentreen joined #nim |
19:52:13 | * | endragor quit (Remote host closed the connection) |
19:54:13 | * | endragor joined #nim |
19:55:45 | FromGitter | <mratsim> @sendell it’s zengine from zacharycarter |
19:55:56 | FromGitter | <mratsim> it uses emscripten |
19:58:35 | * | endragor quit (Ping timeout: 250 seconds) |
19:58:47 | * | kier quit (Ping timeout: 260 seconds) |
20:01:21 | * | Trustable quit (Remote host closed the connection) |
20:06:13 | sendell | thx mrasim i'll look at it :) |
20:06:55 | * | endragor joined #nim |
20:08:08 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
20:09:50 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
20:11:11 | * | endragor quit (Ping timeout: 248 seconds) |
20:14:33 | crem | For nimble package, it's not correct to put sources into src/ subdir, is it? |
20:15:41 | laas | as far as I understand, no |
20:15:47 | laas | it gave me warnings when I did |
20:16:13 | laas | about my previous problem, here is the code: https://hastebin.com/icipunotug.cs |
20:16:25 | laas | the first set of templates work, but the second set doesn't |
20:16:56 | laas | I get an error like "meta.nim(23, 17) Error: expression 'self128055' has no type (or is ambiguous)" in the first set of templates |
20:17:13 | laas | I really don't understand why, even when I make them completely equal |
20:20:25 | * | TjYoco joined #nim |
20:21:39 | dom96 | srcDir = "src" |
20:21:41 | dom96 | It is valid |
20:21:46 | dom96 | And it is recommended |
20:22:30 | crem | Thanks. |
20:24:02 | * | MJCaley quit (Quit: MJCaley) |
20:24:10 | Arrrr | !eval bool is enum |
20:24:11 | NimBot | Compile failed: ???(???, 0) Error: expression 'false' is of type 'bool' and has to be discarded |
20:24:23 | Arrrr | !eval echo(bool is enum) |
20:24:25 | NimBot | false |
20:26:26 | FromGitter | <alehander42> what is the "dom96 interpolation idea" |
20:26:30 | * | xkapastel joined #nim |
20:27:08 | FromGitter | <alehander42> string interpolation would be great |
20:27:18 | dom96 | https://github.com/nim-lang/Nim/pull/6507#issuecomment-345071140 |
20:28:16 | * | ofelas joined #nim |
20:38:10 | * | vlad1777d joined #nim |
20:43:01 | * | rbrt quit (Quit: Oíche mhaith) |
20:43:15 | * | TjYoco quit (Quit: Leaving) |
20:44:10 | Arrrr | laas i was having your issue with another template. |
20:54:40 | * | SenasOzys_ quit (Read error: Connection reset by peer) |
20:56:54 | * | Arrrr quit (Read error: Connection reset by peer) |
20:57:16 | * | SenasOzys_ joined #nim |
21:08:49 | * | ofelas quit (Quit: shutdown -h now) |
21:08:50 | * | rbrt joined #nim |
21:18:06 | skrylar | well, the cobweb experiment only has ~2 parts left |
21:18:21 | skrylar | writing the adapter macro now :\ |
21:22:04 | * | Vladar quit (Quit: Leaving) |
21:24:10 | laas | Arrrr: so you don't know how to fix it? :/ |
21:31:39 | Araq | laas, gist the code and you'll be helped |
21:34:02 | * | SenasOzys__ joined #nim |
21:36:31 | * | SenasOzys_ quit (Ping timeout: 250 seconds) |
21:37:23 | FromGitter | <zetashift> https://www.reddit.com/r/nim/comments/7ebnr6/this_just_gave_me_the_flu/ whats the problem here? |
21:37:36 | FromGitter | <zetashift> my Nim-fu i still weak so i cant help him |
21:37:44 | * | d10n-work quit (Quit: Connection closed for inactivity) |
21:50:47 | * | nsf joined #nim |
21:55:33 | * | ShalokShalom quit (Remote host closed the connection) |
21:58:02 | sendell | how can nim-glm require "nim >= 0.17.3" ? does that mean nightly? |
22:01:28 | skrylar | possibly |
22:01:29 | bluenote | yes, just checkout the devel branch and re-run ./koch -d:release boot |
22:01:42 | skrylar | glm is the math lib right? |
22:01:57 | skrylar | seems a little fey for a math lib to require nightly |
22:03:06 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:03:07 | bluenote | it's not unusual to depend on devel, Nim is moving quickly |
22:03:19 | * | skrylar targets the latest stable |
22:05:27 | sendell | thx bluenote |
22:05:40 | sendell | is nightly stable enough? |
22:05:56 | skrylar | eeh |
22:06:36 | skrylar | I don't think Araq would tolerate a build being broken for too long, but the nature of nightlies is they are by definition not stable :) |
22:08:06 | Araq | nightly is stable enough but I will make it more stable |
22:08:31 | Araq | someone needs to give me some hook "CI green --> merge into master" |
22:09:03 | Araq | then everybody can use the master branch, right now master reflects the releases which isn't all that useful since we have git tagging for that |
22:10:25 | FromGitter | <techate> @zetashift , he wants to know how to use cstrings safely, without them getting garbage-collected while they aren't garbage. the answer is probably A) use those functions, or B) keep them on the stack, or C) ensure they're always referenced by something the GC does care about. (it's also possible that he thinks that the term 'conservative GC' is spooky.) |
22:11:17 | sendell | i'll try installing it with choosenim :) |
22:12:20 | skrylar | Araq, debian testing bot? lol |
22:14:56 | skrylar | something like that can probably be done with buildbot |
22:15:29 | * | gokr quit (Remote host closed the connection) |
22:21:50 | FromGitter | <mratsim> I understand why GLM would want to depend on nightly / master |
22:22:46 | sendell | why? |
22:22:58 | FromGitter | <mratsim> I have this code to deal with the BackwardsIndex changes: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ !eval echo “Please release 0.18 ASAP" [https://gitter.im/nim-lang/Nim?at=5a1355c2df09362e67326eb4] |
22:23:47 | skrylar | bleh. grsec has committed harikiri |
22:23:53 | FromGitter | <mratsim> every lib that do a[index] must introduce something similar if they want to be backward compatible |
22:26:14 | * | laas quit (Quit: WeeChat 1.9.1) |
22:28:47 | Araq | new blog post has arrived: https://nim-lang.org/araq/karax.html |
22:29:02 | skrylar | wonder if anyone is running nim on fbsd |
22:29:10 | skrylar | don't see why it wouldn't work |
22:29:52 | * | ryanhowe joined #nim |
22:30:26 | FromGitter | <mratsim> @Araq: I pre-quote @dom96’s “I see what you did there” regarding "Unfortunately the nimble package does not install the examples so to tinker with; git clone is an alternative" |
22:30:45 | skrylar | Araq, i would probably break that up in to several pages but seems neat |
22:31:15 | Araq | skrylar, boy you have no idea, initially it was twice as long |
22:31:17 | Araq | :D |
22:33:21 | skrylar | have contemplated if it would be worthwhile to try to process docbook with nim :p |
22:33:29 | skrylar | probably easier to figure out how to get texinfo to use a stylesheet though |
22:34:34 | Araq | I use 'nim rst2hml x.rst' for my blog with a custom config |
22:35:17 | skrylar | eh well. |
22:35:29 | skrylar | you saw the docs i did for firebird. its more book than doc page. lol |
22:36:05 | FromGitter | <mratsim> that’s so alien to everything in the manual documentation "include karax / prelude”. I got stuck there, and then: ⏎ ⏎ ```nim c tools/karun ⏎ tools/karun -r helloworld.nim``` [https://gitter.im/nim-lang/Nim?at=5a1358d5540c78242d2a96ba] |
22:36:19 | Araq | I haven't, can you send me the link again, skrylar ? |
22:36:46 | FromGitter | <mratsim> tools/karun is? |
22:37:15 | Araq | a tool? |
22:37:21 | Araq | what do you mean? |
22:37:27 | skrylar | Araq, https://www.dropbox.com/s/p7vu32jdemfz2fy/firebird3.pdf?dl=0 |
22:38:02 | FromGitter | <mratsim> the blog post doesn’t say that the tiny build tool is called karun. |
22:39:37 | Araq | now it does |
22:40:26 | FromGitter | <mratsim> :D |
22:41:15 | Araq | skrylar, do you like LaTeX? |
22:41:42 | skrylar | Araq, i dunno, texinfo made that pdf |
22:43:06 | skrylar | its just hard to show the html version since i don't 'have a web host anymore |
22:43:13 | skrylar | could have done the single page bulk export |
22:45:03 | * | nhywyll quit (Quit: nhywyll) |
22:46:16 | skrylar | From a wide search, it seems that the most reliable form of delivering help for desktop linux apps is.. a pdf. |
22:47:15 | skrylar | though now that many distros have a "sensible-exec" type script, though theres maybe 7 different names for it, html inside /usr/share seems to be possible |
22:49:56 | FromGitter | <techate> last I heard xdg-open was the winner, adopted by BSD and Linux distro alike. There might also be some old names surviving alongside it |
22:50:40 | skrylar | i saw a sensible-something name in xfce4 a few days ago |
22:51:17 | FromGitter | <techate> yep, I've got that as well. but I also have xdg-open |
22:51:28 | skrylar | BSD is just going to adopt whatever linux has. They're kinda non-factors in desktop space, but their work ethic is vastly more commendable than linus |
22:52:20 | skrylar | anyway. never actually used karax |
22:52:36 | skrylar | did a little with the JS backend and found the docs were quite lacking |
22:52:54 | skrylar | had to find some weird chinese guy's gists to get basic content replacement down |
22:54:44 | * | elrood quit (Quit: Leaving) |
22:55:19 | * | marenz__ joined #nim |
22:55:49 | skrylar | after cobweb is running, it might be amusing to .. i dunno, have some macro for the immgui freaks |
22:56:02 | skrylar | that just secretly hooks up triggers to normal retained guis in the background |
22:59:58 | * | ketralnis joined #nim |
23:04:50 | * | rbrt quit (Quit: Oíche mhaith) |
23:08:09 | * | bluenote quit (Ping timeout: 260 seconds) |
23:09:21 | Araq | mratsim: instead of the version check you're supposed to check 'defined(nimNewRoof)' |
23:10:20 | * | onionhammer quit (Quit: WeeChat 1.9.1) |
23:10:41 | skrylar | and then in nim 2.6 there is nimNewRoofRly |
23:10:59 | Araq | nimNewNewRoof |
23:11:05 | * | onionhammer joined #nim |
23:11:05 | Araq | nimNewNewNewRoof |
23:11:20 | Araq | seems like a web scale solution to me |
23:11:57 | skrylar | nimQuiteTallCeiling was the best update. araq should have never iterated past that |
23:12:18 | FromGitter | <mratsim> well I don’t plan to keep backward compatibility for 10 years |
23:13:48 | FromGitter | <mratsim> I will probably move on to a new shiny language ParaSailSwiftlyWithRustyNim |
23:15:02 | Araq | we all will but it will be called 'Nim' |
23:15:20 | FromGitter | <mratsim> With true polymorphism: syntax polymorphism, you can inherit from Rust BorrowChecker, Swift reference counting, Go GC :P |
23:15:21 | Araq | you know the old joke about fortran, right? |
23:15:40 | * | skrylar rewrites mratsim in Dylan |
23:15:43 | FromGitter | <mratsim> I know the one about powerful languages reinventing Lisp ;) |
23:16:11 | Araq | "I don't know what the programming language of the year 2000 will look like, but I know it will be called FORTRAN" |
23:18:21 | sendell | So... I bootstrapped 0.17.3 using koch to satisfy glm dependecy, but now zengine wont compile because of the indexing breaking change you were talking about, i guess: "Error: type mismatch: got (HSlice[system.float, system.int])". I guess i'm stuck here :p |
23:18:49 | sendell | lib and its dep wont compile using the same nim :/ |
23:19:25 | FromGitter | <mratsim> open a ticket on zengine repo, zach is usually very fast to fix things |
23:20:10 | dom96 | Araq: Can we prevent these breakages? |
23:22:08 | Araq | I doubt it |
23:23:47 | Araq | otherwise we would be version 1, right? you all keep voting for a better language |
23:24:11 | Araq | we can make v0.18 be v1.0 though :P :P :P |
23:26:03 | dom96 | :/ |
23:26:08 | dom96 | I can't say I voted for this change |
23:26:26 | dom96 | Seems to me that it fixes some obscure issue at the expense of Nim's expressivity |
23:27:12 | Araq | big words for a library solution that was replaced by some other library solution |
23:27:45 | skrylar | is the index operator borked or something |
23:29:05 | * | Jesin quit (Quit: Leaving) |
23:29:33 | Araq | not borked, I rewrote the implementation in order to make it cleaner and fix some nasty bugs |
23:30:09 | Araq | but I think this is about the changes I made to the '..' iterator |
23:30:45 | Araq | which btw never was consistent with 'countdown' or '..<' but consistency is only an argument when you feel like it |
23:31:35 | * | arnetheduck quit (Ping timeout: 240 seconds) |
23:32:26 | skrylar | didn't know ..< was a thing |
23:32:33 | skrylar | i always did the annoying 0..(thing-1) |
23:33:14 | sendell | i guess learning nim on a nightly compiler was a bad idea anyway :p |
23:33:43 | skrylar | it kinda is |
23:43:02 | * | vlad1777d quit (Ping timeout: 255 seconds) |