00:00:01 | * | rnrwashere joined #nim |
00:00:36 | * | rnrwashe_ joined #nim |
00:04:35 | * | rnrwashere quit (Ping timeout: 250 seconds) |
00:06:46 | * | cyberjpn joined #nim |
00:17:49 | * | PrimHelios joined #nim |
00:36:15 | * | stefanos82 quit (Remote host closed the connection) |
00:48:55 | * | rockcavera joined #nim |
01:20:50 | * | cyberjpn quit (Ping timeout: 258 seconds) |
01:23:40 | * | cyberjpn joined #nim |
02:01:10 | * | banc quit (Quit: Bye) |
02:06:53 | * | stefantalpalaru quit (Quit: stefantalpalaru) |
02:23:13 | * | banc joined #nim |
02:39:25 | * | rnrwashe_ quit (Remote host closed the connection) |
03:00:27 | * | rnrwashere joined #nim |
03:07:58 | * | Hexeratops quit (Remote host closed the connection) |
03:17:34 | * | cyberjpn quit (Ping timeout: 246 seconds) |
03:18:08 | * | dddddd quit (Remote host closed the connection) |
03:22:20 | * | rnrwashere quit (Remote host closed the connection) |
03:22:26 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:33:36 | * | tiorock joined #nim |
03:33:36 | * | rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services))) |
03:33:36 | * | tiorock is now known as rockcavera |
03:33:36 | * | rockcavera quit (Changing host) |
03:33:36 | * | rockcavera joined #nim |
04:03:29 | leorize | Araq: will there be any plans to add destructors to stdlib? |
04:13:56 | * | cyberjpn joined #nim |
04:18:27 | * | mwbrown quit (Ping timeout: 252 seconds) |
04:21:10 | * | mwbrown joined #nim |
04:23:22 | * | theelous3 quit (Ping timeout: 246 seconds) |
04:23:39 | * | nsf joined #nim |
04:41:49 | * | kapilp joined #nim |
04:57:35 | * | NimBot joined #nim |
05:18:53 | * | leorize quit (Quit: WeeChat 2.3) |
05:19:47 | * | vlad1777d_ quit (Remote host closed the connection) |
05:22:56 | * | narimiran joined #nim |
05:30:06 | * | vlad1777d joined #nim |
05:54:31 | * | leorize joined #nim |
05:54:55 | * | cyberjpn quit (Ping timeout: 258 seconds) |
06:05:01 | * | cyberjpn joined #nim |
06:07:18 | * | solitudesf joined #nim |
06:11:02 | Araq | leorize: if you mean to close files automatically and stuff, yes |
06:11:29 | leorize[m] | nice :D |
06:12:43 | leorize | Araq: is there any more information about the revert to `=move`? I'm having a destructor-based lib here and I'd like to update it for the `=move` change |
06:14:53 | Araq | I'll gist an example, stay tuned |
06:40:04 | * | jasper__ joined #nim |
06:46:26 | * | jjido joined #nim |
06:50:42 | * | kapilp quit (Quit: Connection closed for inactivity) |
06:51:48 | * | cyberjpn quit (Remote host closed the connection) |
06:52:04 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:53:20 | * | cyberjpn joined #nim |
06:56:32 | Araq | leorize: https://gist.github.com/Araq/d7771b542ec759d664f2be65b107d4ec |
06:57:21 | Araq | is the idea, notice how we'll define nimOpMove when this change landed into devel |
06:58:20 | leorize | nice, thanks! |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:03:13 | Araq | it's all your fault btw :P |
07:03:32 | Araq | most people don't self-assign ;-) |
07:04:27 | * | leorize quit (Ping timeout: 256 seconds) |
07:04:30 | * | gmpreussner joined #nim |
07:05:25 | Zevv | they say you can go blind from that |
07:07:28 | * | leorize joined #nim |
07:08:56 | narimiran | Zevv: watch your mouth, we might have a minor here! (until leorize shows us his birth certificate) |
07:09:13 | Zevv | I suspect he's at least 56 |
07:09:21 | narimiran | kilograms? |
07:09:31 | Zevv | hehe |
07:10:02 | leorize | did I miss smt? :p |
07:10:28 | narimiran | well lots of things happenend in '90s |
07:10:44 | * | krux02 joined #nim |
07:11:44 | Zevv | oooh |
07:12:25 | * | solitudesf quit (Ping timeout: 244 seconds) |
07:17:46 | leorize | anw, how has the new indent script work for you, narimiran Zevv? |
07:17:54 | * | PMunch joined #nim |
07:18:18 | leorize | I'm done w the school stuff and fixed all the bugs that I found |
07:18:58 | leorize | if there aren't any bugs I'd consider merging it to master |
07:19:01 | narimiran | leorize: quite well. i know there were some things that work better now than before, regarding pressing enter and then being at wrong/right indentation level |
07:19:31 | narimiran | especially when you have a proc definition spanning multiple lines, and then starting proc body |
07:20:28 | leorize | yea :) that's the motivation behind this change |
07:21:55 | * | jjido joined #nim |
07:24:09 | Zevv | leorize: fine for me, when I remember to update all my machines :) |
07:24:34 | leorize | great! I'm gonna merge this then |
07:24:42 | leorize | don't know if I should create a new demo :p |
07:25:12 | leorize | I need to know what VSC plugin can do regarding indent :p |
07:25:39 | Zevv | I'm very happy that the indending also works for good-ol'e-vim |
07:26:15 | leorize | only the nimsuggest part of the plugin is neovim-only :) |
07:28:05 | * | cyberjpn quit (Ping timeout: 258 seconds) |
07:28:07 | leorize | maybe in the future I'd consider writing an adapter layer for vim support |
07:28:38 | leorize | but then I can't do semantic highlighting |
07:28:53 | leorize | and code will be mostly black & white |
07:30:29 | Zevv | I'd be happy as a toddler with a robust jump-to-definition |
07:30:41 | Zevv | and I don't do syntax highlighting anyway :) |
07:31:03 | narimiran | Zevv: jump to definition works in neovim just fine :) |
07:31:08 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:31:49 | Zevv | Yeah I know. I tried to switch to neovim a few times, but its a pain because of the number of different machines and distros I run on |
07:31:50 | * | leorize quit (Remote host closed the connection) |
07:32:08 | Zevv | I'm stuck with gnu screen and vim and bash for the rest of my days |
07:32:20 | Zevv | no termux and neovim and zsh for me :( |
07:33:53 | leorize[m] | a major problem with providing vim support is the huge degree of compile-time customization in vim |
07:34:05 | leorize[m] | littering my code with if has() is not a fun thing |
07:34:27 | Zevv | Yeah I know, i made some plugins once, and its a terrible environment anyway. Nimscript is hilarious |
07:34:42 | Zevv | Ooops. Vimscript :) |
07:34:59 | * | leorize joined #nim |
07:34:59 | leorize[m] | you mean vimscript :p |
07:48:27 | PMunch | Is there a way to have a template accept varargs, then handle the first specially and pass the rest to a procedure? |
07:49:59 | leorize | template can't iterate through varargs iirc |
07:50:49 | PMunch | Hmm, I guess I could do it with a macro.. |
07:51:07 | PMunch | Or maybe I can't.. |
07:51:25 | PMunch | Basically what I'm trying to do is create some practical aliases for the karax DSL |
07:52:19 | PMunch | I've created one named "cdiv" which just takes a string and creates a "tdiv(class=<the string>)" so that I can do "cool classes".cdiv |
07:52:24 | PMunch | Makes it a bit easier to read |
07:52:44 | PMunch | But I would love to be able to do "cool classes".cdiv(id="myID") |
07:53:01 | PMunch | ie. be able to pass more arguments that would get added to the tdiv call |
08:05:40 | * | floppydh joined #nim |
08:13:35 | * | hoijui joined #nim |
08:15:01 | * | cyberjpn joined #nim |
08:15:22 | * | jasper__ quit (Quit: Page closed) |
08:26:48 | PMunch | Hmm, I'm really not sure how to sideload the CodeMirror code editor into a Karax application.. |
08:28:01 | * | narimiran quit (Ping timeout: 246 seconds) |
08:28:32 | leorize | PMunch: https://github.com/pragmagic/karax/blob/1ccd8b1c16a9be7277e28d15103695352feb5a4f/experiments/echartstest.nim |
08:28:46 | leorize | and https://github.com/pragmagic/karax/blob/master/experiments/nativenodes.nim |
08:28:55 | * | narimiran joined #nim |
08:33:20 | PMunch | Oooh interesting |
08:34:33 | * | leorize quit (Ping timeout: 256 seconds) |
08:37:21 | FromGitter | <alehander42> ohh i tried to do this with monaco |
08:37:32 | FromGitter | <alehander42> but have to see what did i do finaly |
08:37:41 | * | leorize joined #nim |
08:38:02 | FromGitter | <alehander42> i think the interesting question is how to hook updates to it to the normal redraw mechanism |
08:38:35 | FromGitter | <alehander42> i just used normal imperative updates on the editor element invoked from my VNode procs |
08:38:41 | FromGitter | <alehander42> but not sure if this was the best way |
08:40:58 | FromGitter | <alehander42> stefanpalaru: you can run this test under rr if you use linux |
08:41:32 | FromGitter | <alehander42> this way you can replay the same program run under gdb interface how many times you need |
08:43:26 | FromGitter | <mratsim> @deech: thoughts on https://github.com/nim-lang/Nim/pull/11235#issuecomment-492145712? I think your let exportc fix fixes #9366 not #9365 |
08:45:30 | * | cyberjpn quit (Ping timeout: 258 seconds) |
08:52:23 | PMunch | Hmm, I'm having some trouble creating a JS object to pass to an imported procedure |
08:53:13 | PMunch | The call I want to do is something like this: http://ix.io/1J0m/javascript |
08:53:29 | PMunch | (Note that it's a JavaScript object, and not a JSON object) |
08:54:19 | leorize | isn't json just javascript way of writing object? :p |
08:54:32 | FromGitter | <alehander42> ohh you need to just use `js{}` |
08:54:55 | FromGitter | <alehander42> you're entering my world PMunch |
08:55:23 | FromGitter | <alehander42> js backend is fun again |
08:55:54 | leorize | iiuc, the vnodeToDom() is used to avoid the need of `getElementById` |
08:56:02 | leorize | but I might be wrong :p |
08:56:33 | Araq | vnodeToDom() is only because karax's DSL creates VNodes |
08:56:48 | Araq | the important thing is the dthunk() call |
08:57:23 | * | dddddd joined #nim |
08:57:47 | leorize | iiuc, the idea is that you'll get a dom object that could be passed directly to some external code for manipulation, right? |
08:58:19 | FromGitter | <alehander42> PMunch, i i am trying to load monaco editor in a browser page and i have some different issues: do you load codemirror just by a script tag, or do you use amd loading etc |
08:59:08 | PMunch | alehander42, take a look at play.nim-lang.org that's what I'm trying to do |
08:59:49 | FromGitter | <alehander42> i know, what i am wondering is if you had to solve the same issue |
09:00:05 | FromGitter | <alehander42> hm yeah i can take a look at the current hml |
09:01:40 | FromGitter | <alehander42> yeah it seems you directly paste it in a script tag, i cant do that with monaco |
09:03:22 | Araq | leorize: it is also a (virtual) node that karax doesn't even attempt to mess with |
09:03:36 | Araq | which really helps if that node has some state in it |
09:04:20 | PMunch | Hmm, got it almost working. I had imported the call wrong, so it didn't add all my arguments -_- |
09:08:59 | PMunch | Got it now, was just missing some .kstring |
09:10:09 | leorize | do you know that karax has a `&` operator for cstring conversion? :p |
09:10:34 | leorize | for my project I change it into `$!` though |
09:14:05 | Araq | interesting |
09:14:09 | Araq | might adopt that |
09:18:47 | PMunch | Hmm, some of this broke my cdiv template though.. |
09:19:01 | PMunch | leorize, I did not know that |
09:19:13 | PMunch | Strange choice seeing how & is string concatenation |
09:19:28 | leorize | and it conflicts with strformat if you use it |
09:19:29 | PMunch | $! is better IMO (albeit a bit more typing of strange characters) |
09:19:43 | Araq | it predates strformat |
09:20:06 | narimiran | and don't import hashes if you want to use `$!` ;) |
09:20:14 | Araq | but you can easily do import jstrutils except `&` |
09:21:17 | leorize | I never have to do so though |
09:21:25 | PMunch | Ah, it appears that it is the import of kdom that does it.. |
09:21:28 | leorize | narimiran: I thought hashes was `!$`? |
09:21:55 | narimiran | leorize: and you're right :) |
09:23:15 | PMunch | The error I get: http://ix.io/1J0u/ |
09:23:37 | PMunch | vs. the template I try to use http://ix.io/1J0v/Nim |
09:25:49 | Araq | the 'hashes' operators are stupid tbh |
09:26:59 | PMunch | Rather annoying, as it turns this: http://ix.io/1J0w/Nim into this: http://ix.io/1J0x/Nim which is quite an improvement |
09:33:33 | PMunch | Nothing a little macro magic can't fix http://ix.io/1J0y/Nim and now it adds extra arguments as well :) |
09:35:10 | leorize | I wonder if you could just emit tdiv as nnkIndent and omit buildHtml |
09:46:13 | * | ng0 joined #nim |
10:05:24 | FromGitter | <mratsim> I agree, why did we need operators for that? can't we deprecate those and use "mix" instead |
10:07:36 | Araq | sure but we can also work on making closures with the new runtime |
10:08:18 | Araq | but ok, somebody from #nim should do it, we can fight over the names in the PR process |
10:08:53 | Araq | https://github.com/nim-lang/Nim/issues/7301 so ... I can use my package manager (brew) to install gcc 4.1.2 to investigate this problem, right? |
10:09:13 | Araq | whom am I kidding... I won't even try |
10:13:41 | FromGitter | <jrfondren> even CentOS6 has 4.4.7 as the standard gcc. |
10:14:23 | FromGitter | <jrfondren> CentOS5 end-of-life was in 2007 |
10:19:22 | leorize | shashlick: when `{.header.}` is used in nimterop, can you make it add `{.importc.}` to structures as well? |
10:27:55 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
10:28:04 | * | leorize quit (Quit: WeeChat 2.3) |
10:35:26 | PMunch | leorize, it seems to rewrite something before the macro is called, so not entirely sure |
10:38:30 | * | hoijui quit (Ping timeout: 252 seconds) |
10:47:45 | FromGitter | <alehander42> pmunch its a bit werid |
10:47:50 | FromGitter | <alehander42> your dsl |
10:47:57 | FromGitter | <alehander42> because usually `.name` is the class name |
10:48:02 | FromGitter | <alehander42> and here they are reversed |
10:48:50 | FromGitter | <alehander42> i wonder if you can do e.g. cdiv.a.b.(id="c") |
10:49:03 | FromGitter | <alehander42> similar to haml |
10:49:37 | FromGitter | <alehander42> if one can do * |
10:50:28 | FromGitter | <alehander42> or even something like .a.b, but the last one is probably invalid syntax |
10:54:47 | Araq | yes |
10:57:40 | PMunch | alehander42, yeah I was thinking about something like that |
10:57:59 | PMunch | But as a quick and dirty thing this works fine |
10:58:47 | FromGitter | <alehander42> hm, for my backend i've managed to make a karax-based static template loader |
10:59:03 | PMunch | The thing is that "div" doesn't actually carry any information. They're so heavily styled these days that one div can behave completely different from another. By flipping the classes first and just postfixing it with "make this a div" it's much easier to see what actually matters, the class. |
10:59:32 | FromGitter | <alehander42> it reads local variables from the action automatically and its read froma file on build time, i wonder if thats an usual approach |
11:00:04 | FromGitter | <jrfondren> aye, in Mithril a bare `m(".someclass", ...)` creates a `<div class=someclass>...</div>` |
11:00:18 | FromGitter | <alehander42> yes, i guess that's why in haml you usually can directly `.<name> etc`, but on the other hand if you do use a different tag, this has to show intent |
11:00:28 | FromGitter | <alehander42> so it's still good to make it first in those cases |
11:00:40 | FromGitter | <alehander42> so that's why i find haml's api very good |
11:00:53 | FromGitter | <alehander42> but you might be right, it's subjective |
11:01:33 | FromGitter | <alehander42> you can even make tdiv#id in nim if you process the comments in the macro |
11:01:35 | FromGitter | <alehander42> :P |
11:02:22 | Araq | you can't do that, the "comment in the AST" changes have been abandoned |
11:02:28 | FromGitter | <alehander42> ahh |
11:02:30 | Araq | too much effort for too little gain |
11:02:38 | Araq | maybe for Nim v2 |
11:02:40 | Araq | bbl |
11:03:20 | FromGitter | <alehander42> yeah, makes sense |
11:03:29 | FromGitter | <jrfondren> what I really liked about mithril is that the vDOM constructor uses CSS syntax. so `m("span.someclass", ...)` for `<span class=someclass>...</span>`, no harder even though div is the default. or `m("input[type='checkbox']")` |
11:04:45 | FromGitter | <alehander42> that's exactly what haml does as wel |
11:04:56 | FromGitter | <alehander42> but without need for `m(..)` |
11:05:05 | FromGitter | <alehander42> not sure about input[type=..] tho |
11:05:54 | PMunch | Hmm, that is actually pretty cool |
11:06:18 | PMunch | Makes it super easy to match your code to your CSS at least |
11:08:29 | * | hoijui joined #nim |
11:10:46 | FromGitter | <alehander42> another point where pmunch solution is better is dynamic classes |
11:11:21 | FromGitter | <alehander42> but you can still tdiv.a.cl("bdfgdfg").c: but |
11:11:31 | FromGitter | <alehander42> i guess it's less clean that the pure string thing |
11:11:53 | FromGitter | <alehander42> i like `.a` compared to "a" because it seems like a class "literal" tho, not just a string literal |
11:11:59 | FromGitter | <alehander42> but this is bikeshedding |
11:15:27 | * | hoijui quit (Ping timeout: 258 seconds) |
11:23:05 | FromGitter | <alehander42> Araq, btw |
11:23:14 | FromGitter | <alehander42> top level if: .. proc require(..) |
11:23:32 | PMunch | Working with this I feel like there is the possibility to make some cool library for generating this HTML |
11:23:52 | FromGitter | <alehander42> does this makes sense in the js backend |
11:24:00 | FromGitter | <alehander42> in the js backend generates directly function require |
11:24:32 | FromGitter | <alehander42> PMunch the easy thing is to use different symbols, which can work as infix and prefix symbols both |
11:24:50 | FromGitter | <alehander42> so it would be easy to have @id[typ=..] etc |
11:25:03 | FromGitter | <alehander42> but it would be hard to reuse # and . |
11:27:07 | FromGitter | <jrfondren> @alehander42 it wouldn't matter to JS if the function bodies were put in the if(){} vs. placed ahead of them in the output, since if(){} doesn't introduce a new scope in JS (without `let` anyway) |
11:27:22 | FromGitter | <alehander42> ah ok |
11:27:31 | FromGitter | <alehander42> yeah i am gonna just use something else |
11:28:07 | FromGitter | <jrfondren> if you've seen older style JS it's all anonymous functions that are immediately invoked, just to get a scope. (function() { ... })() |
11:29:12 | * | cyberjpn joined #nim |
11:35:41 | * | laaron- quit (Remote host closed the connection) |
11:37:02 | * | laaron joined #nim |
11:49:16 | FromGitter | <alehander42> yeah, i think i've seen that, but not really thinking a lot about it |
11:54:46 | * | stefanos82 joined #nim |
11:56:02 | * | hoijui joined #nim |
12:00:12 | * | Cthalupa quit (Ping timeout: 268 seconds) |
12:01:04 | * | hoijui quit (Ping timeout: 258 seconds) |
12:02:38 | * | Cthalupa joined #nim |
12:08:51 | * | clyybber joined #nim |
12:22:37 | * | xet7 joined #nim |
12:24:24 | shashlick | @leorize nimterop should always be adding importc |
12:26:45 | leorize[m] | the kmod wrapper only have bycopy attached actually |
12:30:08 | PMunch | Hmm, doesn't kajax work? "../karax/karax/kajax.nim(47, 35) Error: undeclared identifier: 'File'" |
12:37:05 | * | Snircle joined #nim |
12:41:17 | shashlick | I think I skip for simple struct |
12:41:39 | * | hoijui joined #nim |
12:45:45 | PMunch | Hmm, the devel version I had lying about worked |
12:45:48 | PMunch | But not 0.19.6 |
12:45:54 | PMunch | Even though it was older |
12:46:01 | PMunch | Trying to update devel now |
12:46:50 | Araq | ouch, apparently only Nim devel has dom.File |
12:47:38 | PMunch | Yeah, devel still works |
12:51:40 | * | gangstacat quit (Ping timeout: 258 seconds) |
12:51:55 | PMunch | Is there a way to add a class no a VNode in Karax? |
12:52:10 | PMunch | I have a callback on a button, and I want to add a class to that button |
12:55:08 | Araq | there is not "that button", it's re-created when you click on the button. the VNodes are stateless |
12:56:52 | FromGitter | <alehander42> so basically you just have to change your state in the callback |
12:57:42 | FromGitter | <alehander42> araq, what do you think of "lifetime hooks", e.g. onInit, beforeRender, afterRender, onRemove etc in karax |
12:58:01 | FromGitter | <alehander42> those are usually parts of components and i usually use just functions generating VNode |
12:58:14 | FromGitter | <alehander42> so not sure if they can be a good fit |
13:00:27 | PMunch | Yeah I realized |
13:00:53 | * | hoijui quit (Ping timeout: 245 seconds) |
13:01:02 | FromGitter | <alehander42> sorry, i was also trying to reword it for myself, as i still forget the idea |
13:01:28 | FromGitter | <alehander42> hm, has anybody used mjs modules |
13:12:57 | PMunch | !eval echo NimVersion |
13:12:58 | NimBot | 0.19.6 |
13:13:03 | PMunch | Just FYI |
13:13:08 | narimiran | PMunch: nice :) |
13:13:32 | PMunch | Hmm, I should really make that a cron-job.. |
13:13:43 | FromGitter | <alehander42> did it get released? |
13:13:51 | FromGitter | <alehander42> hm i didnt see a post |
13:14:05 | PMunch | https://nim-lang.org/blog/2019/05/13/version-0196-released.html |
13:14:16 | federico3 | ooh |
13:15:09 | FromGitter | <alehander42> nice |
13:19:19 | PMunch | There, now it should try to update at 3AM every day to the docker image tagged latest |
13:19:54 | FromGitter | <alehander42> where are the docker images hosted |
13:20:01 | FromGitter | <alehander42> the official ones? |
13:21:47 | PMunch | https://hub.docker.com/r/nimlang/nim |
13:53:43 | * | sacredfrog joined #nim |
13:54:13 | PMunch | Hmm, is there a way to use the JavaScript replace method with a regex from Nim? |
13:54:55 | PMunch | Basically need to do this in Nim: http://ix.io/1J1t/Nim |
13:56:45 | FromGitter | <alehander42> you can just split it maybe |
13:56:56 | FromGitter | <alehander42> but otherwise i think i just wrap the javascript regexp |
13:57:06 | FromGitter | <alehander42> `proc regex*(a: cstring): js {.importcpp: "new RegExp(#, 'g')", noSideEffect.}` |
13:57:29 | * | cyberjpn quit (Ping timeout: 244 seconds) |
13:58:54 | FromGitter | <alehander42> i think this should work but it might have escape problems |
14:00:20 | * | vivus joined #nim |
14:02:21 | vivus | @jrfondren hello. Is it possible to index through the parsecsv rows without running a loop through all of them? |
14:07:30 | PMunch | Hmm, text in karax seems to escape html, can I add html from a string? |
14:08:45 | FromGitter | <alehander42> verbatim ? |
14:08:48 | FromGitter | <alehander42> or something like that |
14:09:21 | FromGitter | <jrfondren> @vivus, not without creating the index yourself, or using something other than a csv. each row is indefinite-length after all. |
14:10:14 | FromGitter | <jrfondren> @vivus, and rather than create an index, I'd think seriously about just shoving the csv into a sqlite database. |
14:10:49 | vivus | @jrfondren based on the amount of loops I have to do between 2 CSV files, I am thinking that might be the best solution |
14:11:44 | FromGitter | <jrfondren> if it's about avoiding lots of iterations instead of avoiding a single iteration, another thing you could do is just slurp the csv's rows into an array. |
14:12:06 | PMunch | alehander42, ah sweet |
14:12:12 | PMunch | That works :) |
14:12:17 | vivus | how big would a 600MB file become in an array? @jrfondren |
14:12:24 | FromGitter | <jrfondren> whatever path you take the first step is going to be to change your data structure. |
14:12:41 | * | theelous3 joined #nim |
14:12:51 | FromGitter | <jrfondren> @vivus, the overhead'd depend on how many lines are in the file. |
14:13:00 | FromGitter | <jrfondren> @vivus, if you have a few gigs, just read it and see |
14:13:52 | FromGitter | <jrfondren> what operation are you trying to do with those two CSV files? |
14:14:05 | livcd | PMunch: what are you writing ? I am super interested in your adventure with karax |
14:14:46 | * | nsf quit (Quit: WeeChat 2.4) |
14:14:51 | PMunch | livcd, I'm rewriting the playground front-end in karax :) |
14:15:04 | PMunch | Mostly to teach me how to use it, I'm going to use it for some work stuff as well |
14:15:05 | vivus | @jrfondren the first CSV file has each line containing: ID, language, string ... the second CSV has: ID1, ID2 (which maps each translation to the other) |
14:15:26 | PMunch | And when the playground frontend is done I'll write a blog post about my experiences with Karax |
14:15:30 | narimiran | PMunch: make that a blogpost/article and you'll teach others too |
14:15:34 | narimiran | ha, ahead of me |
14:15:43 | FromGitter | <jrfondren> @vivus, so that second CSV would probably make a pretty small table |
14:16:11 | vivus | @jrfondren that CSV file is is 240MB |
14:16:13 | PMunch | narimiran, yeah I've been taking mental notes all day :) |
14:16:37 | PMunch | But I'm off now |
14:16:44 | PMunch | Got a puzzle pint to catch |
14:16:45 | * | PMunch quit (Remote host closed the connection) |
14:16:49 | FromGitter | <jrfondren> @vivus, numbers tend take up more space in ASCII than they do in memory though. |
14:16:57 | FromGitter | <jrfondren> depends on the range of your IDs. |
14:17:01 | livcd | cool |
14:17:30 | FromGitter | <jrfondren> anyway that's another option: transform the second csv so that you can go iterate a single pass through the first csv. |
14:17:44 | vivus | @jrfondren so I should put everything from the 2nd CSV into an array? |
14:18:20 | FromGitter | <jrfondren> if you need to look up ID1s at random to get ID2s, a table would probably be better |
14:18:56 | FromGitter | <jrfondren> https://nim-lang.github.io/Nim/tables.html <- one of these |
14:21:26 | clyybber | Araq: https://github.com/nim-lang/Nim/pull/11248 =sink -> =move is up |
14:22:07 | * | gangstacat joined #nim |
14:22:09 | FromGitter | <gogolxdong> How do you use verbatim? |
14:24:41 | clyybber | PMunch: Thank you for setting up the devel docker images, finally the days of building in CI are gone. Thanks \o/ |
14:27:07 | * | gangstacat quit (Ping timeout: 252 seconds) |
14:28:27 | shashlick | Is that the latest tag? How often is it updated? |
14:28:37 | shashlick | I plan on adding nightlies to choosenim |
14:29:12 | * | gangstacat joined #nim |
14:30:56 | * | laaron quit (Remote host closed the connection) |
14:31:11 | FromGitter | <gogolxdong> verbatim works on js backend, needs tuned for static html generating. |
14:31:54 | * | laaron joined #nim |
14:37:43 | FromGitter | <alehander42> hmm doesnt it work for static html? |
14:39:29 | FromGitter | <gogolxdong> It doesn't based on my limited experience. |
14:41:36 | FromGitter | <gogolxdong> ```let content = buildHtml(tdiv): ⏎ verbatim "https://www.google.com" ⏎ echo $content``` ⏎ ⏎ <div><#verbatim /></div> [https://gitter.im/nim-lang/Nim?at=5cdad3a0da34620ff93e1288] |
14:50:40 | FromGitter | <alehander42> seems like a bug indeed |
14:52:44 | FromGitter | <alehander42> ahh yeah i have a patch in my karax |
14:52:49 | FromGitter | <alehander42> in vdom toString |
14:53:07 | FromGitter | <alehander42> after if n.kind == .. ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5cdad652f52a2375162ede52] |
14:53:19 | FromGitter | <alehander42> somebody should open a PR |
14:53:28 | * | floppydh quit (Quit: WeeChat 2.4) |
14:54:12 | FromGitter | <alehander42> for vdom.nim |
14:54:28 | FromGitter | <gogolxdong> good, you can open a PR |
14:55:02 | FromGitter | <alehander42> yeah, i ll try to do that later |
14:55:31 | FromGitter | <alehander42> trying to fix my app yet |
14:57:56 | federico3 | https://mastodon.social/@nimbot/102094986038781379 |
14:59:36 | dom96 | !eval echo("That's my name!") |
14:59:38 | NimBot | That's my name! |
15:02:47 | FromGitter | <gogolxdong> at line 383, ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cdad8970824230a7733bccd] |
15:08:35 | * | poopBot1 joined #nim |
15:08:40 | * | poopBot1 quit (Client Quit) |
15:09:04 | * | poopBot joined #nim |
15:12:25 | * | rnrwashere joined #nim |
15:14:07 | dom96 | So the forum is on HN front page |
15:14:08 | dom96 | And it's running beautifully |
15:19:55 | livcd | dom96: wait what which one ? |
15:20:02 | narimiran | https://news.ycombinator.com/item?id=19897044 |
15:20:07 | livcd | ahh |
15:22:03 | livcd | dom96: aahh i finally got the connection |
15:22:07 | livcd | jesus i am so slow |
15:22:08 | dom96 | also, big thanks to the HN mods for reviving this |
15:22:24 | FromGitter | <jrfondren> reviving it? |
15:22:37 | livcd | you were just saying that it can withstand HN's hug of death |
15:22:39 | FromGitter | <jrfondren> ah it's 10 hours old. |
15:25:08 | * | hoijui joined #nim |
15:26:36 | * | hoijui quit (Remote host closed the connection) |
15:27:24 | Zevv | reviving? |
15:27:57 | livcd | maybe reviewing ? |
15:28:37 | Zevv | Maybe it didnt make it to the front page and they nudget it a bit |
15:28:47 | Zevv | how much did you pay for that dom96 |
15:28:49 | poopBot | could not load: libssl.so(.45|.1.1|.38|.39|.41|.43|.10|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|) |
15:28:49 | poopBot | compile with -d:nimDebugDlOpen for more information |
15:28:50 | poopBot | [me@pc ~]$ xbps-query -R -s libssl |
15:28:50 | poopBot | [*] libssl46-2.8.3_2 Version of the TLS/crypto stack forked from OpenSSL - SSL/TLS library |
15:28:50 | poopBot | [-] libssl47-2.9.1_1 Version of the TLS/crypto stack forked from OpenSSL - SSL/TLS library |
15:28:57 | poopBot | noooOOOOOOOOOOOOOOOOOOo |
15:29:20 | dom96 | Zevv: that is indeed what they did |
15:29:33 | dom96 | Nothing. They do that to posts they think should get to the front page :) |
15:29:39 | dom96 | or maybe the author of the post contacted them |
15:30:23 | dom96 | poopBot: lol |
15:30:49 | poopBot | can i just ln it and hope it dosent notice diffrence betwin 46 and 45 |
15:34:01 | poopBot | it worked |
15:36:19 | FromDiscord | <treeform> poopBot, what did you do? I hate these libssl issues. |
15:36:45 | FromGitter | <jrfondren> he altered his OS to pretend to have a .45 version of the libssl.so locally |
15:36:59 | poopBot | sudo ln -s libssl.so.46 libssl.so.45 just simobolic linked it |
15:37:09 | FromGitter | <jrfondren> you could go the other way and edit the library to refer to the versions that are available |
15:37:16 | federico3 | we need to add .46 |
15:37:52 | poopBot | ok so to get latest version of nim |
15:38:09 | poopBot | choosenim #head /home/me/Documents/Apps/Nim devel << dosent wokr |
15:38:30 | poopBot | Usage: choosenim <version/path/channel> |
15:38:38 | FromGitter | <jrfondren> that's because you ran 'choosenim' with no arguments |
15:38:46 | FromGitter | <jrfondren> because # starts a comment |
15:38:55 | FromGitter | <jrfondren> try '#head' or \#head |
15:39:12 | poopBot | yep its writed sorry :( |
15:39:46 | FromDiscord | <treeform> There might be a reason we don't support libssl.45... |
15:41:11 | FromDiscord | <treeform> what even is 45? https://en.wikipedia.org/wiki/OpenSSL its not listed here. |
15:41:22 | FromDiscord | <treeform> Pre 1998? |
15:41:29 | FromGitter | <jrfondren> it's 0.46 that you don't support. |
15:41:33 | FromGitter | <jrfondren> you do suppot 0.45 |
15:41:53 | FromGitter | <jrfondren> or just so dot 45 |
15:41:53 | FromGitter | <liquid600pgm> is there a way of using nimsuggest with the new runtime? |
15:41:54 | narimiran | poopBot: to get the latest nim: `choosenim devel`, `choosenim update devel` |
15:42:10 | poopBot | i did head hope it works |
15:42:28 | FromGitter | <liquid600pgm> narimiran: `choosenim update devel` is enough, `update` switches to the version you choose iirc |
15:43:12 | narimiran | liquid600pgm i didn't know that, last time i used choosenim (more than 6 months ago) that was not the case IIRC |
15:44:02 | FromDiscord | <treeform> poobBot can you `strings libssl.45.so | grep "^OpenSSL` |
15:44:16 | FromDiscord | <treeform> I would like to know what "real" version is the .45 version? |
15:44:38 | FromDiscord | <treeform> https://stackoverflow.com/a/47829613 |
15:44:51 | poopBot | i have 46 but can check |
15:44:59 | FromDiscord | <treeform> sorry 46 |
15:45:21 | * | Cthalupa quit (Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in) |
15:45:38 | FromDiscord | <treeform> I assumed 46 versions would have been before 1.0.0, but it looks like different OSes use different versioning schemes for libssl. |
15:46:43 | poopBot | i am on voidlinux i think it uses libressl and some magic xD |
15:46:57 | poopBot | anyway how to use this strings it just shoots me a new line with > |
15:47:28 | FromDiscord | <treeform> can you try "^LibreSSL" ? |
15:47:54 | FromDiscord | <treeform> can you send me your so? |
15:48:40 | poopBot | sure |
15:48:51 | poopBot | just sec am trying to igure out this string thingy |
15:49:25 | FromGitter | <liquid600pgm> narimiran: actually, it doesn't, I guess choosenim just gave me a misleading message "Already on #devel" when I was updating devel |
15:49:38 | FromGitter | <liquid600pgm> that's what made me think that |
15:50:24 | poopBot | @treeform: its cuz its packages as libssl.so.45 on my distro thats why i was getting and > line |
15:50:55 | poopBot | LibreSSL 2.8.3 |
15:51:08 | FromDiscord | <treeform> neat thanks! |
15:51:27 | poopBot | OpenSSLDie << this gives when i grep with OpenSSL |
15:51:47 | FromDiscord | <treeform> yeah that's one of the messages it can give you. |
15:51:53 | vivus | what's the quickest way to add a 2-value sequence to a table? |
15:52:04 | * | Cthalupa joined #nim |
15:52:32 | * | rnrwashere quit (Remote host closed the connection) |
15:53:44 | FromDiscord | <treeform> you need a key to add to the table. |
15:53:57 | FromDiscord | <treeform> so table[key] = @[a, b] |
15:54:06 | dom96 | liquid600pgm: That's `choosenim #devel` vs. `choosenim update #devel` |
15:54:15 | poopBot | duno i newb, hmm running choosenim '#head' /home/me/Documents/Apps/Nim devel i got empty dir wierd |
15:54:48 | poopBot | tought i think i got some output like it was pulling it form git |
15:55:12 | poopBot | hmm yep it filled /home/me/.choosenim/toolchains/nim-#head |
15:55:15 | narimiran | poopBot: why you don't use the default command? (the one i've written above) |
15:55:43 | poopBot | narimiran, cuz i runed my one before you sended me first msg |
15:56:30 | narimiran | ok, why *now* don't you run `choosenim update devel` and make your life easier? |
15:57:32 | poopBot | cuz i wanted to installi it to /Documents/Apps/Nim but form what i see it dosent cooperate anyway cuz i ended up with empty dir anyway xD |
15:57:53 | poopBot | it just dumps it in /home/me/.choosenim/toolchains |
15:58:22 | narimiran | https://github.com/dom96/choosenim#how-choosenim-works |
15:59:39 | FromGitter | <liquid600pgm> dom96: https://termbin.com/ws0x this last message is what confused me |
15:59:53 | narimiran | and if you want the latest version, in a custom directory, why not use `git clone https://github.com/nim-lang/Nim.git` ? |
16:00:47 | dom96 | poopBot you cannot tell choosenim where to put an installation like that |
16:02:04 | dom96 | liquid600pgm: oh, that's a bug. It's choosenim automatically switching to the version you've updated and not checking whether you're already on that version :) |
16:02:05 | dom96 | report plz |
16:02:13 | * | laaron quit (Remote host closed the connection) |
16:02:33 | FromGitter | <liquid600pgm> it's not a bug, it doesn't switch |
16:02:42 | FromGitter | <liquid600pgm> as you can see by nim -v |
16:02:59 | FromGitter | <liquid600pgm> it's just the last "Info" message that confused me into thinking it does |
16:04:40 | * | laaron joined #nim |
16:07:01 | poopBot | hmm so hmm, shouldi now export ./nimble/bin or /home/me/.choosenim/toolchains/devel, guess choosenim oweriteds nimble dir right when i swich versions? |
16:07:27 | * | vivus quit (Remote host closed the connection) |
16:07:44 | FromGitter | <liquid600pgm> I didn't get an answer previously, so let me repeat my question |
16:07:56 | FromGitter | <liquid600pgm> is there any way of setting up nimsuggest to use the new runtime? |
16:08:36 | poopBot | i duno :) |
16:21:57 | FromGitter | <liquid600pgm> is it *required* to disarm dangling pointers in the new runtime, or does the compiler do this automatically? |
16:37:16 | * | thomasross_ joined #nim |
16:37:16 | * | thomasross quit (Killed (orwell.freenode.net (Nickname regained by services))) |
16:37:17 | * | thomasross_ is now known as thomasross |
16:38:50 | Araq | it is required but it doesn't come up often |
16:39:08 | FromGitter | <liquid600pgm> so, when must it be done? |
16:40:12 | Araq | if the ref would otherwise outlive the owned ref |
16:40:58 | FromGitter | <liquid600pgm> aah, that makes sense. I thought all refs were required to be disarmed |
16:43:43 | dom96 | liquid600pgm: the message is the bug |
16:43:58 | FromGitter | <liquid600pgm> I |
16:44:05 | dom96 | it shouldn't be shown |
16:44:08 | FromGitter | <liquid600pgm> I'll report then |
16:46:08 | * | sacredfrog quit (Quit: WeeChat 1.9.1) |
16:46:30 | * | sacredfrog joined #nim |
16:46:38 | * | sacredfrog quit (Client Quit) |
16:47:39 | * | sacredfrog joined #nim |
16:56:04 | FromGitter | <Varriount> Araq: So far, how does the new runtime implementation differ from the RFC? |
16:57:12 | narimiran | "I think if Nim could have a usable web server in the std lib (same with Rust and D) it would be a game changer." --> dom96, do you want to address this comment? (in the HN post) |
17:05:18 | * | kapilp joined #nim |
17:05:49 | federico3 | https://lobste.rs/s/dnahfo/nim_programming_language_version_0_19_6 post on lobste.rs |
17:07:05 | FromGitter | <alehander42> Li |
17:07:12 | FromGitter | <alehander42> @gogolxdong yes |
17:07:25 | narimiran | federico3: i think https://forum.nim-lang.org/t/4840 is much bigger news than 0.19.6 |
17:07:52 | federico3 | ah finally the thread picked up speed |
17:08:05 | narimiran | ...and now i see it has already been posted: https://lobste.rs/s/w0ftft/dali_pure_nim_indie_assembler_for_android |
17:10:56 | FromGitter | <alehander42> @dom96 I am still pondering on my wannabe-a-framework dsl |
17:11:35 | FromGitter | <alehander42> Did you plan to eventually include a default orm in jester |
17:14:38 | FromGitter | <alehander42> I know I can just leave that to the user,but I feel if I can have a very definite typed schema that all other components can understand this might more expressive |
17:16:30 | dom96 | nope, that should be a separate package |
17:18:33 | Zevv | Hm, I can't seem to find any proper up to date libs or wrappers for common crypto operations like X509, signing, hashing, etc. Am I missing something? |
17:19:01 | federico3 | Zevv: libsodium? or the native openssl wrapper? |
17:20:51 | Zevv | Yes, I was missing something - I didn't realize the stdlib exposed a lot of openssl, as it's not in the docs |
17:20:54 | Zevv | thanks |
17:22:19 | Zevv | although it seems to be missing things like pkcs8 still |
17:22:47 | federico3 | yes, I'm looking at adding PKCS |
17:23:19 | Zevv | I so hate openssl, but it's still the way to go for portability |
17:23:34 | federico3 | Zevv: are you doing that for dali? |
17:23:46 | Zevv | was looking into that yeah, should be a breeze |
17:24:07 | * | nsf joined #nim |
17:24:57 | federico3 | Zevv: https://github.com/nim-lang/Nim/pull/6664/files |
17:27:53 | narimiran | federico3: what's the status of that PR? should i restart the CIs? |
17:28:23 | narimiran | is there something that remains to be done? |
17:29:28 | federico3 | narimiran: a new CI run would help! |
17:29:31 | federico3 | I'll rebase if needed |
17:31:21 | narimiran | new run under way |
17:32:45 | FromDiscord | <demotomohiro> I fixed errors in egl module and sent a PR but there is no response. |
17:32:45 | FromDiscord | <demotomohiro> https://github.com/nimious/egl/pull/3 |
17:32:45 | FromDiscord | <demotomohiro> There are many Nim libraries in nimio.us but looks like inactive now. |
17:34:31 | narimiran | demotomohiro that repo and user/organization seem quite inactive :( |
17:35:51 | FromGitter | <jrfondren> yeah, looks pretty dead. the one user is still active with other matters: https://github.com/gmpreussner , so taking over nimious might be an option if you reach out to him directly. |
17:41:49 | poopBot | Latest development version of nimsuggest (--autobind is required, you can use choosenim to install this version) |
17:43:41 | * | poopBot quit (Remote host closed the connection) |
17:47:57 | * | poopBot joined #nim |
17:48:08 | poopBot | i frogot to restart after export path |
17:50:00 | FromDiscord | <demotomohiro> nimious has Nim bindings for oculus/Leap motion/kinect/etc SDKs, but I don't have these devices. |
17:50:00 | FromDiscord | <demotomohiro> So I taking over it is not a good option. |
17:50:40 | Araq | Varriount: nothing changed. it seems to work pretty much as expected but more experiments need to be done |
17:56:50 | * | Jesin quit (Quit: Leaving) |
18:06:31 | * | Jesin joined #nim |
18:09:11 | * | Trustable joined #nim |
18:13:45 | * | al_ joined #nim |
18:17:23 | * | Jesin quit (Quit: Leaving) |
18:21:04 | * | Jesin joined #nim |
18:24:42 | * | solitudesf joined #nim |
18:36:50 | FromGitter | <jrfondren> your taking over those projects won't make them collect any more dust than they're already collecting, but alright. |
18:50:03 | * | al_ quit (Quit: al_) |
18:52:25 | dom96 | From Google analytics: "Total Events for event 'BuildSuccessEvent->choosenim stable --firstInstall->(not set)' spiked yesterday" :D |
19:08:45 | * | sacredfrog quit (Quit: WeeChat 1.9.1) |
19:09:23 | * | sacredfrog joined #nim |
19:10:23 | * | sacredfrog quit (Client Quit) |
19:14:06 | * | kapilp quit (Quit: Connection closed for inactivity) |
19:29:13 | Zevv | How do I match a file name against a wildcard pattern these days? |
19:31:52 | Zevv | - when the file is not actually on disk -. So i'd like to match 'foo/bar.baz' against 'foo/*.baz', for example |
19:36:46 | * | rnrwashere joined #nim |
19:37:07 | * | rnrwashere quit (Remote host closed the connection) |
19:37:45 | Zevv | well, nevermind, I was able to workaround with splitFile |
19:56:02 | * | nsf quit (Quit: WeeChat 2.4) |
20:05:31 | * | narimiran quit (Ping timeout: 255 seconds) |
20:07:05 | * | Trustable quit (Remote host closed the connection) |
20:26:51 | * | jjido joined #nim |
20:49:06 | * | clyybber quit (Quit: WeeChat 2.4) |
20:49:16 | * | clyybber joined #nim |
20:52:05 | * | clyybber quit (Client Quit) |
21:42:12 | * | cybj quit (Ping timeout: 258 seconds) |
21:43:33 | * | cybj joined #nim |
21:45:14 | * | krux02 quit (Remote host closed the connection) |
22:21:24 | * | solitudesf quit (Ping timeout: 252 seconds) |
22:33:23 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:02:37 | * | rnrwashere joined #nim |
23:11:13 | * | rnrwashere quit (Remote host closed the connection) |
23:20:40 | FromDiscord | <treeform> Hey dom96, I would like to use AsyncHttpClient for my websocket library, but I can't figure out how to access private member "socket". Is there a reason why its private? How can I get around that? |
23:21:13 | FromDiscord | <treeform> I have tried `import httpclient` and my code works. But if some one else `includes httpclient` it creates to versions. |
23:21:54 | FromDiscord | <treeform> The reason why I want to use AsyncHttpClient is because it does all the header, redirect routing and ssl wrapping so I don't have to worry about it. |
23:30:52 | zestyr | treeform: see https://github.com/nim-lang/Nim/pull/11233 |
23:37:02 | FromDiscord | <treeform> zestyr: WOW thanks! |
23:40:52 | FromDiscord | <treeform> 3 days ago to! |
23:58:39 | * | cyberjpn joined #nim |