00:10:51 | * | gokr quit (Ping timeout: 240 seconds) |
00:12:05 | * | SenasOzys quit (Ping timeout: 240 seconds) |
00:15:31 | * | TjYoco joined #nim |
00:16:35 | * | nsf quit (Quit: WeeChat 1.9.1) |
00:24:24 | * | elrood quit (Quit: Leaving) |
00:25:29 | * | Jesin quit (Quit: Leaving) |
00:51:45 | * | TjYoco quit (Quit: Leaving) |
01:23:41 | * | yglukhov quit (Remote host closed the connection) |
01:46:43 | * | kalkin-- joined #nim |
01:50:22 | * | kalkin--- quit (Ping timeout: 260 seconds) |
02:14:34 | * | arnetheduck joined #nim |
02:18:01 | * | skrylar joined #nim |
02:18:43 | skrylar | maybe i'll have to do a postgres wrapper later :b |
02:19:11 | skrylar | i recently learned postgres is apparently the most awesome thing that is constantly misconfigured |
02:39:31 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:52:18 | * | vivus quit (Quit: Leaving) |
02:53:36 | * | chemist69 joined #nim |
03:29:11 | * | yglukhov joined #nim |
03:30:39 | * | sz0 joined #nim |
03:31:42 | FromGitter | <Varriount> skrylar: How is it misconfigured? |
03:34:56 | FromGitter | <Varriount> @mratsim You encounter some very interesting problems, developing Arraymancer. :D |
03:37:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:39:53 | skrylar | Varriount: well i remember reading that people using red hat would evaluate postgres, then settle on mysql, because RHEL had it in low memory mode |
03:40:08 | skrylar | It turns out when you give postgres more than 8mb RAM, its performance is just fine |
03:40:50 | FromGitter | <Varriount> skylar: We use postgres. It's pretty nice. |
03:40:54 | skrylar | Was also reading some hackernews lately, where a guy was saying he needed ex. elastic search/sphinx because postgres was too slow |
03:41:04 | skrylar | it turned out he was using expression matching instead of the full text index |
03:41:10 | FromGitter | <Varriount> Oh eew |
03:41:18 | FromGitter | <Varriount> you mean LIKE expressions? |
03:41:24 | skrylar | which was followed by chortling about "yea we actually use postgres instead of elastic, its faster for all but the largest cases" |
03:41:31 | skrylar | yes, he was using LIKE |
03:41:35 | skrylar | instead of MATCH AGAINST |
03:41:50 | skrylar | Firebird however doesn't have a full text index |
03:42:25 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:42:26 | skrylar | It seems to mostly exist as a means for old interbase tech to avoid upgrading, |
03:43:06 | skrylar | from what i can tell, if you want more than sqlite then firebird seems neat. as in it would have been a better choice for ex. firefox/chrome than sqlite, because sqlite indices are anemic |
03:44:04 | skrylar | still. it seems to have a place, and delphi users might be more likely to switch to nim than ex. C |
03:44:11 | skrylar | firebird is popular with the delphi's |
03:46:25 | FromGitter | <Varriount> Forgive my ignorance, but what makes firebird different than Postgres? |
03:46:41 | skrylar | i've been trying to figure that out |
03:47:04 | skrylar | as far as i can tell, a big case for firebird would be embedding |
03:47:31 | skrylar | postgres isn't really built for that |
03:48:48 | skrylar | firebird also still targets potatos and toasters, so its good for people dealing with old old machine sites |
03:49:44 | skrylar | that being said, this joke site approves of postgres: http://howfuckedismydatabase.com/postgres/noslony.php |
03:50:28 | skrylar | wondering if i should bother installing hydras in emacs |
03:50:42 | FromGitter | <Varriount> Hydras? |
03:50:51 | skrylar | its supposed to let you make these keystroke chains |
03:51:04 | skrylar | https://github.com/abo-abo/hydra |
03:51:52 | skrylar | it looks neat. although evil-mode lets you make custom states, which are basically the same thing |
03:58:18 | skrylar | its not as fast as c2nim, but it seems making macros to translate c calls to nim defs is reliable |
04:02:37 | FromGitter | <Varriount> skrylar: I've used this before http://www.muppetlabs.com/~breadbox/software/cppp.html |
04:02:50 | FromGitter | <Varriount> It's been a big help with the Windows headers |
04:03:02 | skrylar | neat. |
04:03:06 | FromGitter | <Varriount> Specifically, by following this process: |
04:03:24 | FromGitter | <Varriount> Run a find/replace command to comment out all macros you want to keep |
04:03:25 | skrylar | yeah, yak shaving is a big reason why i didn't target a more popular UI kit |
04:03:49 | FromGitter | <Varriount> run partial C preprocessor and/or the C compiler preprocessor |
04:03:54 | FromGitter | <Varriount> uncomment macros |
04:03:57 | FromGitter | <Varriount> run c2nim |
04:04:04 | skrylar | well, we do have a partial wx implementation. does anyone actually use that? |
04:04:29 | FromGitter | <Varriount> Well, I've never been able to get it to correctly compile the Wxwidgets source code. |
04:04:34 | skrylar | balls. |
04:04:38 | FromGitter | <Varriount> It needs some of the C files, or something. |
04:04:51 | FromGitter | <Varriount> Though, I didn't try very hard |
04:05:04 | skrylar | I confirmed at least getting command buttons and a window worked in nfltk. |
04:05:20 | skrylar | events are just through normal foo(userdata) callbacks so that should be fine |
04:05:39 | * | drs joined #nim |
04:05:44 | FromGitter | <Varriount> I don't even want to think what GUI programming using the native windows API would be like. |
04:05:52 | skrylar | It's obnoxious |
04:05:59 | skrylar | I've done a little bit, and i hated it |
04:06:28 | skrylar | My least favorite thing about Godot is the C++ parts. The whole rest of the engine is great |
04:06:55 | skrylar | anyway |
04:07:14 | FromGitter | <Varriount> The only GUI framework I've used was Qt with PyQt |
04:07:22 | skrylar | Haven't quite decided on when to call nfltk done and stick the fork in it. It could maybe do with some documentation and light testing |
04:07:41 | skrylar | I threw my hands up with GTK when I couldn't get a box layout to remove and insert objects |
04:07:44 | FromGitter | <Varriount> I sorta liked the GUI editor, but wiring up everything was a pain. |
04:08:08 | skrylar | qt is okay. |
04:08:14 | FromGitter | <Varriount> skrylar: Maybe the Javascript guys have the best idea - declarative models |
04:08:17 | skrylar | they spend a lot of effort working *against* C++ |
04:08:41 | skrylar | well Cocoa just loads uis from nib files. fairly easy to deal with |
04:09:07 | skrylar | Glade and Vala are similar, you just toss event wires in glade and match them in vala with [GtkCallback] and such |
04:09:17 | FromGitter | <Varriount> I'd like to try Cocoa some time. |
04:09:27 | skrylar | It was pleasant |
04:09:28 | FromGitter | <Varriount> Any idea how we would get Nim to interface with it? |
04:09:35 | skrylar | nim has an objective c import |
04:09:44 | drs | pure Win32 is not bad. it's just not portable. |
04:09:59 | skrylar | isn't Delphi intended to have been a turbopascal version of the windows apis |
04:10:11 | skrylar | it's not bad *with an object model* but the boilerplating for C is horrid |
04:11:21 | skrylar | would like to have the generic miglayout engine working in nim. you can make basically any weird thing customers ask for in that, pretty easy |
04:11:48 | skrylar | just a slightly enhanced grid view |
04:15:23 | skrylar | am considering doing a bit of python work though. there's some stuff i need to do, that i don't think nim has libs for yet |
04:15:29 | skrylar | namely scraping web pages |
04:16:54 | FromGitter | <Varriount> skylar: Do you need web crawling? |
04:17:47 | skrylar | Varriount: no |
04:19:43 | skrylar | I had a pipeline that used scapy to read news wires to get URLs to articles, handed those to a rethinkdb, where other scripts would pull orders from the document store, do something (ex. clean out the ads, return just the text content, return to the store.) and then would go down the line to auto-summarize using pythons nltk |
04:20:08 | skrylar | so once an hour it read public news wires and put 2-3 sentence summaries in a private mattermost |
04:21:46 | skrylar | its a.. brutally efficient way to deal with news. lol |
04:21:51 | drs | i once wrote a scraper in C (using libcurl and gumbo html5 parser). fun but painful |
04:22:03 | skrylar | might have to look in to gumbo |
04:22:29 | drs | i liked gumbo because it represents the whole thing as a trer |
04:22:35 | drs | tree |
04:22:39 | FromGitter | <Varriount> Bah, why can't Cloudformation be sensible and have variables. |
04:22:50 | skrylar | aside from personal use.. that kind of pipeline does make for an interesting case study on "is nim ready yet" |
04:23:25 | FromGitter | <Varriount> skrylar: The problem with getting a programming language ready is that you need people to help make it ready. |
04:23:38 | skrylar | varriount: isn't that what i'm doing |
04:23:49 | FromGitter | <Varriount> Yeah. |
04:24:02 | FromGitter | <Varriount> I guess I was just stating the obvious. |
04:24:10 | * | jhorwitz joined #nim |
04:24:14 | jhorwitz | Evening all |
04:24:18 | skrylar | evening |
04:24:19 | FromGitter | <Varriount> Hello |
04:24:42 | skrylar | Varriount: well, AFAIK researchers seem to pick languages based around if they have a lib that does a thing they want |
04:25:01 | skrylar | it seems to be considered OK to just chain twelve scripts in to a gearman queue to avoid writing code |
04:25:19 | jhorwitz | I was curious if anyone was working on any GraphQL implementations in Nim |
04:25:30 | skrylar | haven't heard of it |
04:26:11 | FromGitter | <Varriount> https://github.com/samdmarshall/GraphQL.nim |
04:26:32 | skrylar | neat |
04:27:24 | FromGitter | <Varriount> Though, it doesn't look complete. |
04:27:37 | FromGitter | <Varriount> The main module imports a bunch of children modules, but doesn't export anything. |
04:27:48 | FromGitter | <Varriount> And it's a wrapper around a C library |
04:28:55 | FromGitter | <Varriount> Looks like someone just ran C2Nim through a bunch of header files. |
04:29:07 | * | Jesin joined #nim |
04:29:44 | FromGitter | <Varriount> jhorwitz: So the answer seems to be, Nim has 1/2 of a library |
04:29:57 | FromGitter | <Varriount> The one I found appears to be an incomplete wrapper. |
04:30:10 | * | drs left #nim (#nim) |
04:30:15 | skrylar | pedantically, is the guy still working on it? ey asked if it was being worked on, not how many there were |
04:30:36 | FromGitter | <Varriount> Well, May 26th was the last commit date. |
04:30:41 | skrylar | hm |
04:31:00 | FromGitter | <Varriount> It's within the realm of possibility that he/she may publish a huge, multi-tiered update tomorrow. :P |
04:31:32 | jhorwitz | Once I get more familiar with Nim I might start perhaps working on it |
04:31:37 | * | skrylar runs multiple regression on Varriount |
04:32:13 | FromGitter | <Varriount> skrylar: Don't make me run the fourier transform - https://xkcd.com/26/ |
04:32:30 | * | smt joined #nim |
04:32:58 | FromGitter | <data-man> For html parsing for C there is something better. ⏎ https://github.com/lexborisov/myhtml ⏎ https://github.com/lexborisov/Modest |
04:33:32 | FromGitter | <Varriount> skrylar, jhorwitz: Do you have any opinions on https://forum.nim-lang.org/t/3320/1#20936 ? |
04:34:55 | skrylar | i've never used those templates, so i have nothing to lose |
04:35:09 | skrylar | the syntax read wrong though |
04:35:11 | * | smt` quit (Ping timeout: 240 seconds) |
04:35:28 | skrylar | operator(pancakes, pancakes * 2) # wait, what is it doing to pancakes in the first argument? |
04:36:09 | FromGitter | <Varriount> I'd almost prefer some sort of dsl |
04:36:14 | skrylar | i might rather see (the macro ast might be able to handle this) "for pancakes in {expression}" |
04:37:46 | skrylar | i haven't tested to see if macros panic given that statement is incomplete, but untyped macro parameters allow a lot of incomplete things, and doathing(for x in x * 2) is more parsimonious in that you're used to for indicating variable names |
04:38:40 | FromGitter | <Varriount> jhorwitz: What do you think? |
04:40:28 | jhorwitz | I think a dsl could be a good idea |
04:41:26 | jhorwitz | Admittedly, I just starting working through Nim In Action so I am not a Nim expert by any stretch of the imagination |
04:41:32 | jhorwitz | But it definetly clicked with me |
04:44:30 | * | yglukhov joined #nim |
04:47:43 | * | dddddd quit (Remote host closed the connection) |
04:48:52 | * | yglukhov quit (Ping timeout: 260 seconds) |
04:50:03 | skrylar | i should port over those instantly trained neural nets to nim |
04:50:12 | skrylar | its actually a really short script |
04:50:58 | skrylar | its basically a self organizing map, where each 'training example' is a new definition and it finds the closest example to a give input, and interpolates between those |
04:52:05 | * | jhorwitz quit (Ping timeout: 268 seconds) |
04:53:31 | * | vlad1777d quit (Remote host closed the connection) |
04:54:28 | * | vlad1777d joined #nim |
04:58:41 | * | vlad1777d quit (Ping timeout: 248 seconds) |
05:06:55 | * | soloxdead joined #nim |
05:07:03 | * | soloxdead left #nim (#nim) |
05:14:18 | skrylar | Varriount: did you ever see _why's shooooes lib |
05:14:57 | skrylar | http://shoesrb.com/ i think its a neat way to have handled declaring UIs |
05:20:26 | FromGitter | <mratsim> @skrylar, consider at one point to replace nltk with spaCy, nltk is super slow and single threaded with lots of stale part |
05:22:38 | FromGitter | <Varriount> @mratsim Mind linking that? I can' t seem to find it on Google. |
05:22:47 | FromGitter | <Varriount> I keep getting pictures of space |
05:23:11 | skrylar | spacy.io isn't it? |
05:23:34 | skrylar | mratsim: well, i only perform sentence extraction. i suspect it could be done with a few basic heuristics. |
05:24:31 | skrylar | The summarization formula i stole from github was basically, break input to a frequency table, remove stopwords, break input to a sentence table, find first sentence with most 'important' word |
05:25:13 | skrylar | I modified it to include the next sentence in the line with the second most, and same for third, to add context. It's very effective at making news briefs. |
05:26:25 | skrylar | spacy is probably great if you want all the NLP tags and forms |
05:32:16 | * | yglukhov joined #nim |
05:34:54 | skrylar | An interesting case: Asciidoc, requires keeping a backdated python, then installing a docbook toolchain, all to make paginated html. texinfo, you probably already have makeinfo and does it directly |
05:35:13 | skrylar | as an upside, asciidoc[tor]'s default theme is pretty |
05:37:06 | * | yglukhov quit (Ping timeout: 268 seconds) |
05:39:41 | * | sz0 quit (Quit: Connection closed for inactivity) |
05:39:56 | * | qih joined #nim |
05:41:23 | qih | Afternoon |
05:42:19 | skrylar | heyo. |
05:42:34 | qih | Ey |
05:42:45 | skrylar | Varriount: a possibly interesting, though not really done thing, would be using firebird to store an undo cache |
05:42:57 | qih | I "found" Nim yesterday, am reading up on it, interesting |
05:43:40 | skrylar | i know that people have found the idea of persistent undo to be 'neat', but it's almost never done, except maybe non-daw or the now dead Soundtrack Pro |
05:43:42 | skrylar | qih, welcome to nim |
05:44:02 | * | qih bows and says thanks |
05:45:14 | qih | I develop (cough cough) on STM32Fx MCUs using a version of Forth, I've been looking for a HLL to use as a Data Visualiation and systems language. |
05:50:13 | FromGitter | <Varriount> Forth?! Wow. Talk about a blast from the past |
05:50:18 | FromGitter | <mratsim> The data visualization tools are not there |
05:50:24 | FromGitter | <mratsim> Yet* |
05:51:28 | qih | Hey thanks for the heads up, the first task is to centralise the data from the MCUs, then work out what prettyniess I *need* |
05:51:46 | FromGitter | <mratsim> Funny I was reading the "AsFastAsCee" page here yesterday which talked a lot about forth http://wiki.c2.com/?AsFastAsCee |
05:52:08 | skrylar | Factor was a neat forth |
05:52:24 | skrylar | almost made a forth interpreter or two, got stuck understanding PARSE statements |
05:53:00 | qih | Neat. I just use it, not quite good enough to extend it yet |
05:53:04 | skrylar | mratsim: do you think we should bother importing quickdraw :) |
05:53:51 | skrylar | apparently the patents expired, so anyone can do things like quickdraws old regions |
05:53:57 | FromGitter | <mratsim> Oh fun I did not know quickdraw |
05:54:21 | qih | Mecrisp-Stellaris Forth runs well on the STM32F0/3/4 etc, good tools and easy to extend words, anyway |
05:54:21 | skrylar | i'm not sure if theres a real value in aping quickdraw over wrapping cairo, dunno |
05:55:05 | qih | Has anyone successfully run Nim on an low end MCUs yet? STM32Fx or RPi2/3? |
05:55:34 | skrylar | nim the compiler or nim programs |
05:55:56 | skrylar | gcc runs on rpi2, and nim isn't nearly as complex |
05:56:37 | FromGitter | <mratsim> Way to go would be --gc:stack or --gc:none of GC:regions and cross-compilation, as long as there is a C compiler it should work (TM) |
05:56:52 | qih | Sorry, programs ... neat |
05:56:52 | FromGitter | <mratsim> Or --gc:regions* |
05:57:02 | qih | mratsim: thanks |
05:57:49 | FromGitter | <mratsim> https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems |
05:59:14 | skrylar | an rpi has 512mb memory by default, it is not that starved |
05:59:36 | skrylar | unless i'm misremembering. i thought they had 1gb split between gpu |
06:00:00 | FromGitter | <mratsim> I was reading about the STM32 |
06:00:07 | skrylar | it may have been 512 in total but even 256 is a lot for a single program computer o.o |
06:00:25 | FromGitter | <mratsim> RPI is good enough to launch Kodi / Ubuntu so :p |
06:00:44 | FromGitter | <Varriount> qih: Though, without a GC, much of the standard library will be hard to use. |
06:01:00 | FromGitter | <Varriount> I'd try running with the GC before disabling. |
06:01:15 | skrylar | the realtime gc is my choice |
06:02:05 | skrylar | GCs have never been "bad." It's just that most GC toolkits don't have deterministic collection |
06:02:25 | skrylar | So you end up paying your gc costs in java/c# at the most random inopportune times, instead of during those 30 minutes of idle time |
06:02:27 | qih | Varriount: Thanks. One of the good things about the Forth, is thatit wil run on those STM32F0 mini-clones, which are low specced, good enough for temp sensing and transitting using RF, periodically |
06:03:00 | skrylar | forth is pretty good for that yes |
06:03:15 | skrylar | it helps when your language runtime is ~100 lines of assembly code |
06:03:27 | qih | Yeah haha, indeed |
06:03:58 | FromGitter | <Varriount> qih: It's not that Nim won't run on those platforms. It's just that most of the standard library assumes that the GC is available. |
06:04:11 | qih | Yes, I understand |
06:04:42 | FromGitter | <mratsim> How much ram does a STM32F0 have? |
06:05:04 | skrylar | doesn't that depend on the board |
06:05:37 | qih | Does, but I use the STM32F0 & 3 DISCOVERY boards, the mini-ones are smaller |
06:05:52 | FromGitter | <mratsim> Never developed for embedded yet so I'm completely out of my depth. |
06:05:53 | skrylar | i have only used teensys and arduinos |
06:05:55 | qih | The MCU itself has 8Kb RAM |
06:06:15 | FromGitter | <Varriount> Ouch, that is tiny. |
06:06:19 | skrylar | i think i have a pi2 and pi3, but they received little use when i found it hard to run my TV with it |
06:06:20 | qih | Is |
06:07:13 | qih | But the Forth program for Temp sensing is about 180 Bytes I think, maybe a bit more, depends who writes it 8-) |
06:07:39 | qih | But it'd be nice to use the same language on the devices and the central "system" so to speak |
06:08:11 | qih | I was using MicroPython boards but they are overkill for any environmental monitorin, both in specs and costs |
06:08:26 | FromGitter | <Varriount> What are you monitoring? |
06:08:33 | skrylar | you'd probably want to write a minicompiler if you were doing that :\ |
06:08:39 | qih | Greenhouse |
06:08:44 | skrylar | can use the built in parseAst stuff |
06:09:06 | qih | Probably a bit beyond my ken, at this time but noted |
06:09:38 | skrylar | In the case of Naughty Dog, they like using a high level (notably Lisp/Scheme) to define logic and they have their own scripts to convert the s-exps to native assembly |
06:10:20 | qih | Makes sense, I was looking at SBCL or Smalltalk but found Nim |
06:11:27 | FromGitter | <Varriount> Can smalltalk run on a system that small? |
06:12:55 | qih | Varriount: Not that I can see or have tried. The sensors would run a Forth or hopefully Nim and the collector (a RPi 2/3 or full desktop system) would run Smalltalk/SBCL etc |
06:14:50 | FromGitter | <Varriount> qih: I know people on the forum have reported running Nim on microcontrollers, so hopefully it's possible. |
06:15:13 | qih | Ah haha => /home/qih/Git/Nim/bin <= Nimbin is the hippy drug capital of Australia 8-) |
06:15:18 | FromGitter | <mratsim> You probably want to read that https://hookrace.net/blog/nim-binary-size/ |
06:15:56 | qih | Varriount: OK good news then, will find out |
06:16:18 | qih | mratsim: Ta |
06:17:46 | qih | mratsim: That is a very interesting article. |
06:25:59 | skrylar | there is no inherent reason any language must take up a lot of space |
06:26:10 | skrylar | its just tradeoffs on speed vs memory vs human time |
06:26:11 | * | yglukhov joined #nim |
06:26:53 | skrylar | ex. if you wanted to hand code a smalltalk parser in assembly, i'm sure it would be very small. there are maybe ten types of token, and the order of operations is fixed |
06:28:12 | qih | My Forth using friend (Much better than I) uses ASM sometimes to make new functions or get code size down, so yeah doable |
06:28:13 | skrylar | Forth is doing static dispatch though, where smalltalk tends to do it dynamically all the time. Forth absolutely could just retrieve a pointer to the word and run it every time, it would just be slow |
06:28:47 | qih | Is |
06:29:09 | skrylar | i looked at forth as an interim for a compiler briefly once. i found some old weird papers on a guy optimizing forth stack operations and it looked simpler than what most compilers do |
06:29:11 | * | skrylar shrugs |
06:29:51 | qih | Well you either love or you hate it |
06:30:31 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:31:02 | skrylar | i would rather write st-80 than forth. but forth seems like an acceptable VM format |
06:32:03 | qih | It seems to be, although Forth is my first "almost to metal" language so I'm not an expert at all |
06:36:07 | skrylar | blegh. eyes are glazing over |
06:36:15 | skrylar | GNU manuals are quite long |
06:37:15 | qih | Yeah GNU Emacs manual is over 1000 pages, like wtf |
06:37:43 | * | Snircle joined #nim |
06:38:54 | skrylar | qih, i had someone tell me emacs wasn't documented last week |
06:39:08 | skrylar | the face to palm collision could be heard for miles |
06:41:24 | skrylar | Five years ago I would have said nimdoc is fairly anemic compared to doxygen. |
06:41:41 | skrylar | Today I would probably say no, it's fine. there are proper tools for manuals and nimdoc is fine for reference sheets |
06:42:15 | qih | skrylar: Hahaha |
06:43:10 | skrylar | Asciidoc for instance has a TON of special edge cases |
06:43:26 | skrylar | Texinfo has ... only one syntax unit |
06:43:32 | skrylar | hmmh. |
06:44:19 | qih | Asciidoc looks cool, I have no need for it but still |
06:44:55 | skrylar | Its really pretty |
06:45:26 | qih | K |
06:46:22 | skrylar | up to the part now talking about function indexes and things |
06:47:01 | skrylar | wonder if there will ever be a "literate nim" |
06:48:54 | qih | I'm reading the free Chapter 1 from the book and working through https://nim-by-example.github.io |
06:49:10 | qih | skrylar: re literate, NFI |
06:55:43 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
07:07:56 | * | jhorwitz joined #nim |
07:12:41 | * | jhorwitz quit (Ping timeout: 268 seconds) |
07:34:27 | * | SenasOzys joined #nim |
08:04:37 | * | Arrrr joined #nim |
08:04:44 | * | Arrrr quit (Changing host) |
08:04:44 | * | Arrrr joined #nim |
08:06:41 | * | yglukhov joined #nim |
08:11:16 | * | yglukhov quit (Ping timeout: 268 seconds) |
08:26:14 | * | smt` joined #nim |
08:29:27 | * | smt quit (Ping timeout: 250 seconds) |
08:30:13 | * | jjido joined #nim |
08:42:02 | * | jhorwitz joined #nim |
08:46:21 | * | jhorwitz quit (Ping timeout: 240 seconds) |
08:55:39 | * | nsf joined #nim |
09:03:30 | * | qih quit (Quit: leaving) |
09:09:55 | * | miran joined #nim |
09:13:57 | * | yglukhov joined #nim |
09:17:15 | * | jjido quit (Ping timeout: 268 seconds) |
09:18:18 | * | jjido joined #nim |
09:36:02 | * | jhorwitz joined #nim |
09:40:17 | * | jhorwitz quit (Ping timeout: 248 seconds) |
09:41:34 | * | Hello_there joined #nim |
09:42:22 | * | Vladar joined #nim |
09:42:55 | Hello_there | is the error beneath the password box in nim forums expected? |
09:42:59 | Hello_there | https://imgur.com/a/1ssH1 |
09:51:18 | * | claudiuinberlin joined #nim |
09:52:34 | * | Hello_there quit (Ping timeout: 260 seconds) |
10:00:34 | skrylar | hmm. i wonder if vim can be convinced to accept nim styles for help tags. |
10:01:18 | skrylar | I remember a crafty man learned he could make his own helptags files, so he could just point at ex. a function name and hit "help" and instead of the vim manual it took him to his notes on that thing |
10:10:08 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:13:42 | * | vlad1777d joined #nim |
10:20:21 | * | yglukhov quit (Read error: Connection reset by peer) |
10:20:56 | * | yglukhov joined #nim |
10:23:18 | * | ShalokShalom joined #nim |
10:26:56 | * | ShalokShalom_ quit (Ping timeout: 268 seconds) |
10:30:10 | * | jhorwitz joined #nim |
10:34:21 | * | jhorwitz quit (Ping timeout: 240 seconds) |
10:44:41 | * | enthus1ast- quit (Ping timeout: 240 seconds) |
10:56:14 | * | yglukhov quit (Remote host closed the connection) |
10:56:46 | * | yglukhov joined #nim |
11:01:28 | * | yglukhov quit (Ping timeout: 268 seconds) |
11:04:01 | * | nsf quit (Quit: WeeChat 1.9.1) |
11:07:51 | * | dddddd joined #nim |
11:15:15 | miran | what is BiggestInt and how to convert it to (regular) int? |
11:22:54 | dom96 | .int |
11:23:03 | dom96 | It's an alias to the biggest int type. |
11:23:06 | dom96 | likely int64 |
11:23:16 | miran | heh, just figured it out. tried parseInt and similar stuff before :) |
11:23:21 | miran | thanks! |
11:24:13 | * | jhorwitz joined #nim |
11:27:55 | dom96 | https://nim-lang.org/docs/system.html#BiggestInt |
11:28:06 | dom96 | You can search for this in theindex https://nim-lang.org/docs/theindex.html |
11:28:33 | * | jhorwitz quit (Ping timeout: 248 seconds) |
11:30:32 | miran | thanks dom96 |
11:30:47 | * | jjido quit (Ping timeout: 260 seconds) |
11:38:19 | * | yglukhov joined #nim |
11:39:14 | * | elrood joined #nim |
11:40:19 | * | SenasOzys quit (Ping timeout: 268 seconds) |
11:51:57 | * | SenasOzys joined #nim |
12:01:20 | * | SenasOzys quit (Remote host closed the connection) |
12:05:26 | * | SenasOzys joined #nim |
12:13:22 | * | yglukhov quit (Remote host closed the connection) |
12:14:51 | * | miran quit (Ping timeout: 268 seconds) |
12:15:36 | * | yglukhov joined #nim |
12:15:46 | * | yglukhov quit (Remote host closed the connection) |
12:15:58 | * | yglukhov joined #nim |
12:16:01 | * | yglukhov quit (Remote host closed the connection) |
12:16:17 | * | yglukhov joined #nim |
12:16:49 | * | yglukhov quit (Remote host closed the connection) |
12:17:04 | * | yglukhov joined #nim |
12:17:36 | * | yglukhov quit (Remote host closed the connection) |
12:17:52 | * | yglukhov joined #nim |
12:18:24 | * | yglukhov quit (Remote host closed the connection) |
12:18:26 | * | jhorwitz joined #nim |
12:18:42 | * | yglukhov joined #nim |
12:19:11 | * | yglukhov quit (Remote host closed the connection) |
12:19:29 | * | yglukhov joined #nim |
12:19:59 | * | yglukhov quit (Remote host closed the connection) |
12:20:17 | * | yglukhov joined #nim |
12:20:47 | * | yglukhov quit (Remote host closed the connection) |
12:21:02 | * | yglukhov joined #nim |
12:21:30 | dom96 | yglukhov: fix yo internets |
12:21:34 | * | yglukhov quit (Remote host closed the connection) |
12:21:52 | * | yglukhov joined #nim |
12:22:22 | * | yglukhov quit (Remote host closed the connection) |
12:22:31 | * | jhorwitz quit (Ping timeout: 240 seconds) |
12:22:40 | * | yglukhov joined #nim |
12:23:09 | * | yglukhov quit (Remote host closed the connection) |
12:23:59 | * | vlad1777d quit (Ping timeout: 248 seconds) |
12:24:24 | * | vlad1777d joined #nim |
12:25:02 | * | yglukhov joined #nim |
12:25:03 | * | yglukhov quit (Remote host closed the connection) |
12:25:21 | * | yglukhov joined #nim |
12:25:51 | * | yglukhov quit (Remote host closed the connection) |
12:26:09 | * | yglukhov joined #nim |
12:26:38 | * | yglukhov quit (Remote host closed the connection) |
12:28:23 | FromGitter | <data-man> @dom96: parseHex can't to parse "long" hex-string on x32 platforms. ⏎ I made PR to NimData https://github.com/bluenote10/NimData/blob/master/src/nimdata/schema_parser.nim#L42 ⏎ Maybe to add these generic procs (parseBin, parseOct, parseHex) to stdlib? |
12:28:37 | * | gokr joined #nim |
12:32:02 | * | yglukhov joined #nim |
12:32:03 | * | yglukhov quit (Remote host closed the connection) |
12:32:29 | * | yglukhov joined #nim |
12:32:50 | dom96 | data-man: yeah, sounds like a bug (?) |
12:33:00 | * | yglukhov quit (Remote host closed the connection) |
12:33:17 | * | yglukhov joined #nim |
12:33:50 | * | yglukhov quit (Remote host closed the connection) |
12:35:56 | * | yglukhov joined #nim |
12:36:00 | * | yglukhov quit (Remote host closed the connection) |
12:36:06 | FromGitter | <data-man> !eval int.sizeof |
12:36:08 | NimBot | Compile failed: in.nim(1, 4) Error: expression 'sizeof(int)' is of type 'int' and has to be discarded |
12:36:16 | * | yglukhov joined #nim |
12:36:31 | FromGitter | <data-man> !eval echo int.sizeof |
12:36:32 | NimBot | 8 |
12:36:47 | * | yglukhov quit (Remote host closed the connection) |
12:37:45 | FromGitter | <data-man> @dom96: int.sizeof on x32-platforms == 4? |
12:38:45 | dom96 | !eval echo defined(amd64) |
12:38:47 | NimBot | true |
12:40:14 | dom96 | IIRC yes |
12:41:46 | * | enthus1ast- joined #nim |
12:42:43 | FromGitter | <data-man> Or to add parseBiggestIntHex |
12:44:20 | * | vlad1777d quit (Ping timeout: 258 seconds) |
12:44:42 | * | vlad1777d joined #nim |
12:45:32 | dom96 | I think it's okay for parseHex to return BiggestInt |
12:45:54 | dom96 | although Araq might have a different opinion |
12:46:03 | dom96 | I guess in the future BiggestInt might become a BigInt |
12:50:09 | * | gokr quit (Ping timeout: 248 seconds) |
12:51:31 | * | yglukhov joined #nim |
12:51:35 | * | yglukhov quit (Remote host closed the connection) |
12:51:37 | FromGitter | <data-man> Same story with parseOct & parseOctInt |
12:51:52 | * | yglukhov joined #nim |
12:52:25 | * | yglukhov quit (Remote host closed the connection) |
13:05:36 | * | yglukhov joined #nim |
13:07:25 | * | Arrrr quit (Read error: Connection reset by peer) |
13:18:35 | * | skrylar quit (Ping timeout: 240 seconds) |
13:22:53 | * | nsf joined #nim |
13:40:43 | * | skrylar joined #nim |
13:42:53 | * | Snircle joined #nim |
13:52:01 | * | enthus1ast- quit (Ping timeout: 240 seconds) |
13:53:39 | * | enthus1ast- joined #nim |
13:55:22 | * | vlad1777d quit (Ping timeout: 268 seconds) |
13:59:04 | * | smt joined #nim |
14:02:31 | * | smt` quit (Ping timeout: 240 seconds) |
14:03:36 | * | jhorwitz joined #nim |
14:04:23 | * | Arrrr joined #nim |
14:04:44 | * | Arrrr quit (Changing host) |
14:04:44 | * | Arrrr joined #nim |
14:15:42 | * | PMunch joined #nim |
14:28:32 | * | gokr joined #nim |
14:37:41 | * | yglukhov quit (Remote host closed the connection) |
14:41:00 | * | jhorwitz quit (Ping timeout: 268 seconds) |
14:42:18 | * | yglukhov joined #nim |
14:46:02 | * | yglukhov quit (Remote host closed the connection) |
14:46:14 | * | yglukhov joined #nim |
14:46:17 | * | yglukhov quit (Remote host closed the connection) |
14:46:32 | * | yglukhov joined #nim |
14:47:05 | * | yglukhov quit (Remote host closed the connection) |
14:47:21 | * | yglukhov joined #nim |
14:47:52 | * | yglukhov quit (Remote host closed the connection) |
14:51:34 | * | yglukhov joined #nim |
14:51:36 | * | yglukhov quit (Remote host closed the connection) |
14:51:52 | * | yglukhov joined #nim |
14:52:24 | * | yglukhov quit (Remote host closed the connection) |
14:52:39 | * | yglukhov joined #nim |
14:53:32 | * | yglukhov quit (Remote host closed the connection) |
14:54:07 | * | yglukhov joined #nim |
14:54:37 | * | yglukhov quit (Remote host closed the connection) |
14:54:53 | * | yglukhov joined #nim |
14:55:25 | * | yglukhov quit (Remote host closed the connection) |
14:55:39 | * | yglukhov joined #nim |
14:56:12 | * | yglukhov quit (Remote host closed the connection) |
15:01:57 | * | gokr quit (Ping timeout: 258 seconds) |
15:20:44 | * | miran joined #nim |
15:22:28 | * | vlad1777d joined #nim |
15:39:12 | * | miran quit (Ping timeout: 248 seconds) |
15:39:12 | * | miran_ joined #nim |
15:44:32 | * | gokr joined #nim |
15:56:05 | * | Jesin quit (Ping timeout: 240 seconds) |
15:59:25 | * | smt` joined #nim |
16:03:01 | * | smt quit (Ping timeout: 268 seconds) |
16:03:41 | * | JappleAck joined #nim |
16:09:23 | * | Jesin joined #nim |
16:10:12 | * | yglukhov joined #nim |
16:21:52 | * | dddddd quit (Ping timeout: 260 seconds) |
16:24:26 | GitDisc | <treeform> Hmm so I loaded some data from a file, I would like to set seq's internal pointer to it directly and then set seq's length? Is there a way to do that? |
16:25:11 | GitDisc | <treeform> without memcpy? |
16:29:09 | GitDisc | <treeform> I guess there is thins kind of stuff ```proc rawBuffer[T](s: seq[T]): ptr T = |
16:29:10 | GitDisc | <treeform> {.emit: "result = `s`->data;".}``` |
16:29:19 | GitDisc | <treeform> but maybe that is too much |
16:29:51 | * | dddddd joined #nim |
16:38:52 | * | Trustable joined #nim |
16:51:38 | GitDisc | <treeform> Mmm, maybe I should take a step back. This is what I have now: https://gist.github.com/treeform/1536cf59d94be33a6764272401282d3e I am loading timezone bin files statically, then reading them out of program memory into program memory... How would I do this better? |
16:53:41 | GitDisc | <treeform> I want to just do some thing like |
16:53:53 | * | dddddd quit (Ping timeout: 248 seconds) |
16:54:29 | GitDisc | <treeform> var timeZones seq memory to point to staticRead("timeZones.bin") |
16:55:10 | * | dddddd joined #nim |
16:55:15 | GitDisc | <treeform> const timeZones = staticReadSeq[TimeZone]("timeZones.bin") ??? maybe |
16:58:46 | * | yglukhov quit (Remote host closed the connection) |
17:04:44 | * | xkapastel joined #nim |
17:07:55 | FromGitter | <data-man> @treeform: Convert bin file to array of uint8 and to add include "timezones.nim"? |
17:15:47 | * | dddddd quit (Ping timeout: 268 seconds) |
17:17:52 | * | dddddd joined #nim |
17:25:06 | FromGitter | <data-man> That is, do not use staticRead and to use prepared array[timeZoneCount, TimeZone]. |
17:25:53 | * | vlad1777d quit (Ping timeout: 248 seconds) |
17:26:18 | * | Guest42015 quit (Remote host closed the connection) |
17:30:07 | * | ftsf quit (Ping timeout: 260 seconds) |
17:38:56 | GitDisc | <crem> I again forgot everything. To create a toy nim project to play with, doing `nimble init` in empty directory and then `nimble build` to build it is a reasonable way to do that, right? |
17:44:01 | * | gokr quit (Ping timeout: 248 seconds) |
17:44:50 | crem | nimble can be used for packages that produce binaries rather than libraries, no? |
17:45:00 | dom96 | yes |
17:46:11 | dom96 | https://github.com/nim-lang/nimble#binary-packages |
17:46:12 | crem | found it, indeed. Thanks. |
17:47:20 | crem | Is there a way to make it output binary to some subdirectory rather than the package root dir? |
17:47:43 | dom96 | binDir |
17:47:43 | dom96 | https://github.com/nim-lang/nimble#optional |
17:48:05 | crem | Thanks! |
17:52:33 | * | miran_ quit (Ping timeout: 248 seconds) |
18:01:08 | * | nsf quit (Quit: WeeChat 1.9.1) |
18:05:37 | crem | there's no analog of "go run" in nimble, is there? |
18:15:40 | * | PMunch quit (Quit: leaving) |
18:17:33 | * | smt joined #nim |
18:21:21 | * | smt` quit (Ping timeout: 248 seconds) |
18:25:59 | FromGitter | <Varriount> crem: `nim c -r` ? |
18:26:20 | FromGitter | <Varriount> Oh, you said nimble |
18:33:31 | * | yglukhov joined #nim |
18:34:13 | dom96 | nimble c -r |
18:34:26 | crem | In nimble, there's no way to add dependency from a command line, is there? I have to edit the .nimble file, right? |
18:34:48 | * | skrylar quit (Remote host closed the connection) |
18:35:13 | crem | dom96: thanks, it works. Although it seems that it only compiles a single file. |
18:35:15 | dom96 | yep |
18:37:09 | crem | How can I find the current package version (version of sdl2, in my case), so that I can add it into dependencies into .nimble file. |
18:37:33 | GitDisc | <treeform> data-man: I have tried using includes, but it makes compile times really slow. That was my first idea. |
18:38:01 | GitDisc | <treeform> I found the staticRead to be quite fast |
18:38:09 | GitDisc | <treeform> So I want to use that instead. |
18:38:13 | dom96 | crem: nimble list -i |
18:38:35 | crem | Thanks. Sorry for basic questions. |
18:39:00 | dom96 | Be sure to give a range though, like `sdl >= 0.1.0` |
18:39:20 | dom96 | we will get lock files eventually which will solidify the version |
18:40:29 | crem | I did sdl2 >= 1.1 (where 1.1 is the current version). I don't even know what other syntax is allowed, the only line in .nimble file was nim >= 0.17.2 so I guessed >= would work :) |
18:41:16 | dom96 | everything is documented :) https://github.com/nim-lang/nimble#dependencies |
18:41:47 | crem | No time to read docs, want to see black ugly SDL window asap. :) |
18:47:52 | crem | So I did 'import sdl2' and suddenly there is 'init()' in file's scope. That feels like a polluted namespace. :-\ There's no way to make it possible only to write sdl2.init() but not init(), is there? |
18:52:29 | dom96 | from sdl2 import nil |
18:55:12 | crem | Thanks! |
18:55:23 | crem | Hm, so I need sdl2_nim not sdl2 it seems... |
18:55:53 | dom96 | Note though that Nim isn't Python |
18:56:00 | dom96 | You are meant to import everything into your namespace |
18:57:28 | * | vivus joined #nim |
18:57:31 | crem | Yeah, I remember that, it just feels wrong. But I guess I cannot complain before I actually have a problem because of that. |
19:03:13 | crem | Hm, for some reason it cannot init graphics. No black window today then. |
19:04:12 | crem | Uh, actually there's some other problem, games cannot start either. |
19:05:26 | dom96 | try running some example code |
19:06:39 | crem | No, even "import sdl2; init(INIT_VIDEO)" doesn't work, nor any SDL game. Seems like today's arch linux upgrade broke something. |
19:07:51 | crem | Reboot helped. |
19:16:20 | crem | How can I exit a program? exitnow(0)? |
19:16:57 | crem | unusual name for that.. |
19:18:30 | crem | Hm. "use getError() instead, GetError() is deprecated". I thought nim was case-agnostic! |
19:26:54 | crem | echo "SDL could not initialize! SDL_Error: %s\n" % [$(getError())] <- Does not replace %s. What am I doing wrong? :-\ |
19:29:22 | * | SenasOzys quit (Remote host closed the connection) |
19:29:24 | * | vlad1777d joined #nim |
19:32:29 | dom96 | exitnow? |
19:32:32 | dom96 | where did you get that? |
19:33:07 | dom96 | Use $1 instead of %s |
19:34:00 | * | Sentreen quit (Ping timeout: 246 seconds) |
19:35:54 | crem | I found that on https://nim-lang.org/docs/lib.html ! |
19:36:13 | crem | The most reasonable I could find related to exiting. |
19:42:09 | * | SenasOzys joined #nim |
19:45:17 | dom96 | it's quit() |
19:46:00 | dom96 | You shouldn't need to use anything in posix |
19:46:41 | federico3 | why are getEnv/existsEnv/... in ospaths instead of os? |
19:47:14 | * | Sentreen joined #nim |
19:48:17 | * | jjido joined #nim |
19:50:11 | dom96 | no idea |
19:52:59 | Arrrr | maybe because os cannot be imported by nimscript |
19:59:05 | crem | So, there is sdl2.quit() and system.quit(). When I do "import sdl2; quit()", which of those is called? |
20:02:04 | dom96 | Have you tried compiling that? |
20:02:18 | crem | Yes, it compiles. |
20:02:30 | * | miran_ joined #nim |
20:02:40 | dom96 | what's the definition of sdl2.quit? |
20:02:52 | crem | Ah, it only compiles when I pass a parameter! |
20:03:04 | crem | otherwise it's ambigous |
20:03:11 | crem | good |
20:12:26 | * | Arrrr quit (Read error: Connection reset by peer) |
20:28:29 | * | Vladar quit (Quit: Leaving) |
20:33:40 | * | jjido quit (Read error: No route to host) |
20:39:29 | * | dddddd quit (Remote host closed the connection) |
20:55:04 | * | jjido joined #nim |
20:58:59 | * | Trustable quit (Remote host closed the connection) |
20:59:54 | * | Trustable joined #nim |
21:08:16 | * | gokr joined #nim |
21:21:13 | * | gokr quit (Ping timeout: 250 seconds) |
21:23:40 | FromGitter | <citycide> @Araq: we talked about a `cascade` macro a while back - I just put up a publish to nimble for it :) |
21:24:19 | FromGitter | <citycide> if anybody would care to review it, it's at https://github.com/citycide/cascade |
21:25:49 | FromGitter | <Varriount> @citycide Cool! @gokr might like this. He's a smalltalk fan |
21:26:15 | FromGitter | <citycide> @Varriount thanks |
21:26:40 | FromGitter | <citycide> it's #MyFirstMacro |
21:28:35 | * | Jesin quit (Quit: Leaving) |
21:28:51 | FromGitter | <Varriount> @citycide I especially like the fact that "you can avoid declaring a var if you don't need to modify the target object after the fact, since it remains mutable within the cascade block." |
21:29:26 | FromGitter | <citycide> that was my primary use case also |
21:30:08 | FromGitter | <Varriount> How does it manage that? Does it generate a `var`, then a `let`? |
21:30:31 | FromGitter | <citycide> generates a temp var, you just can assign it to a `let` |
21:31:25 | FromGitter | <citycide> and each assignment and call expr is rewritten as a `DotExpr` on the object |
21:31:41 | FromGitter | <citycide> ( which is a `var` behind the scenes ) |
21:32:15 | FromGitter | <Varriount> Hm. Wouldn't introducing a temporary variable cause a copy? |
21:32:54 | FromGitter | <citycide> it might - I'm still learning nim so I'm open to those kinds of lessons |
21:33:20 | FromGitter | <Varriount> I would try using a 'let' if the original assignment is a let, otherwise use a var |
21:33:59 | FromGitter | <Varriount> Or use a let instead of a var all the time. |
21:34:19 | FromGitter | <citycide> if you use `let` then assignments won't work |
22:01:48 | dom96 | Did you know about this btw? https://nim-lang.org/docs/manual.html#overloading-resolution-automatic-self-insertions |
22:03:23 | * | miran_ quit (Quit: Konversation terminated!) |
22:06:17 | * | nsf joined #nim |
22:09:35 | * | smt quit (Ping timeout: 248 seconds) |
22:10:39 | * | smt joined #nim |
22:14:00 | gangstacat | niv, does websocket works with the current Nim version? websocket/client.nim(46, 23) Error: undeclared identifier: 'newContext' |
22:20:33 | Araq | gangstacat, compile with -d:ssl |
22:21:02 | gangstacat | that works, thank you Araq |
22:27:04 | FromGitter | <citycide> @dom96: nope didn't know about that one. pretty cool but not very useful for arbitrary names, like if I'm creating a lot of GUI elements and such |
22:28:50 | * | smt` joined #nim |
22:30:51 | * | smt` quit (Read error: Connection reset by peer) |
22:31:31 | * | smt` joined #nim |
22:31:50 | * | smt` quit (Max SendQ exceeded) |
22:32:01 | * | smt quit (Ping timeout: 248 seconds) |
22:32:23 | * | smt` joined #nim |
22:39:51 | * | jjido quit (Read error: Connection reset by peer) |
22:42:53 | * | jjido joined #nim |
22:43:41 | * | Trustable quit (Remote host closed the connection) |
22:44:21 | * | smt joined #nim |
22:44:59 | * | smt quit (Max SendQ exceeded) |
22:45:56 | * | smt joined #nim |
22:46:11 | * | smt` quit (Ping timeout: 240 seconds) |
22:49:55 | * | NimBot joined #nim |
22:51:03 | * | jjido quit (Read error: Connection reset by peer) |
22:57:13 | * | jjido joined #nim |
22:58:42 | * | jjido quit (Read error: No route to host) |
23:00:44 | * | jjido joined #nim |
23:01:35 | * | jjido quit (Read error: Connection reset by peer) |
23:01:50 | * | jjido joined #nim |
23:11:59 | * | SunDwarf is now known as class |
23:12:01 | * | class is now known as SunDwarf |
23:22:26 | * | elrood quit (Quit: Leaving) |
23:50:43 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
23:55:16 | * | jhorwitz joined #nim |