00:05:08 | * | sz0 quit (Quit: Connection closed for inactivity) |
00:07:09 | * | Jesin quit (Quit: Leaving) |
00:07:46 | * | couven92 quit (Quit: Bye) |
00:09:40 | * | TjYoco quit (Read error: Connection reset by peer) |
00:09:47 | * | endragor joined #nim |
00:14:47 | * | endragor quit (Ping timeout: 268 seconds) |
00:18:12 | bkerin | weeee got stuff transmitted from compile-time to run-time via AST |
00:18:33 | bkerin | not too bad with template and getAst |
00:19:32 | bkerin | nim is nifty I must say so many things that in other langs you think 'god why can't I just do X' and in nim there X is. once you find it |
00:24:33 | GitDisc | <treeform> Yeah its pretty cool in that way. |
01:01:26 | * | MJCaley1 quit (Quit: Bye) |
01:06:38 | * | vivus quit (Quit: Leaving) |
01:10:20 | * | Snircle quit (Ping timeout: 255 seconds) |
01:10:28 | * | Snircle_ joined #nim |
01:10:29 | * | peters_ joined #nim |
01:21:47 | * | bkerin quit (Quit: "Man who drive like hell bound to get there!") |
01:22:45 | * | craigger quit (*.net *.split) |
01:22:45 | * | rauss quit (*.net *.split) |
01:22:45 | * | tyler569 quit (*.net *.split) |
01:22:46 | * | adamchainz quit (*.net *.split) |
01:22:46 | * | derlafff quit (*.net *.split) |
01:22:46 | * | literal quit (*.net *.split) |
01:22:46 | * | GitDisc quit (*.net *.split) |
01:22:46 | * | hogeland quit (*.net *.split) |
01:22:46 | * | allan0 quit (*.net *.split) |
01:22:46 | * | mal`` quit (*.net *.split) |
01:22:46 | * | acidx quit (*.net *.split) |
01:23:27 | * | JappleAck quit (Ping timeout: 240 seconds) |
01:26:57 | * | vlad1777d_ quit (Ping timeout: 240 seconds) |
01:27:14 | * | theone joined #nim |
01:27:40 | * | theone left #nim ("WeeChat 1.9.1") |
01:28:21 | * | mal`` joined #nim |
01:28:21 | * | craigger joined #nim |
01:28:21 | * | rauss joined #nim |
01:28:21 | * | tyler569 joined #nim |
01:28:21 | * | adamchainz joined #nim |
01:28:21 | * | derlafff joined #nim |
01:28:21 | * | allan0 joined #nim |
01:28:21 | * | literal joined #nim |
01:28:21 | * | GitDisc joined #nim |
01:28:21 | * | hogeland joined #nim |
01:28:21 | * | acidx joined #nim |
01:35:56 | * | peters_ quit (Quit: Page closed) |
01:36:43 | * | JappleAck joined #nim |
01:36:47 | * | kalkin--- joined #nim |
01:40:29 | * | kalkin-- quit (Ping timeout: 255 seconds) |
01:52:01 | * | sz0 joined #nim |
01:55:55 | * | SenasOzys quit (Ping timeout: 268 seconds) |
01:56:33 | * | SenasOzys joined #nim |
02:16:32 | * | marenz__ quit (Ping timeout: 248 seconds) |
02:22:13 | FromGitter | <Varriount> @mratsim What profiling tool are you using? |
02:29:26 | * | cspar joined #nim |
02:33:00 | * | jinshil joined #nim |
02:38:32 | * | SenasOzys quit (Ping timeout: 255 seconds) |
02:43:44 | * | gokr quit (Ping timeout: 248 seconds) |
02:51:15 | * | JappleAck quit (Quit: Leaving) |
02:54:20 | * | endragor joined #nim |
02:54:40 | * | endragor quit (Remote host closed the connection) |
02:55:08 | * | endragor joined #nim |
02:57:11 | * | chemist69 quit (Disconnected by services) |
02:57:17 | * | chemist69_ joined #nim |
03:28:33 | * | willc quit (Ping timeout: 248 seconds) |
03:31:56 | * | skrylar joined #nim |
03:39:24 | skrylar | hmm. ought to do a poll. "remove the isc_ prefix from everything?" |
03:39:41 | skrylar | intuition says yes because if you really want it, you can just import as isc |
04:09:29 | * | sz0 quit (Quit: Connection closed for inactivity) |
04:25:49 | * | yglukhov joined #nim |
04:30:25 | * | yglukhov quit (Ping timeout: 248 seconds) |
04:46:37 | * | Chuang-Tzu quit (Read error: Connection reset by peer) |
04:49:45 | * | ftsf joined #nim |
05:30:32 | * | dddddd quit (Remote host closed the connection) |
05:46:41 | * | cspar quit (Ping timeout: 248 seconds) |
06:08:58 | * | cspar joined #nim |
06:11:08 | * | vlad1777d_ joined #nim |
06:19:35 | * | hogeland quit (Ping timeout: 240 seconds) |
06:20:35 | * | hogeland joined #nim |
06:32:34 | * | nsf joined #nim |
06:47:50 | FromGitter | <Varriount> skrylar: Unless it resolves *common* ambiguity (like, md5Hash and ShaHash) prefixes are just an annoyance. |
06:58:01 | Tanger | Hey guys, are there any linters available for Nim that you'd recommend?? |
06:59:10 | * | xkapastel quit (Quit: Connection closed for inactivity) |
06:59:42 | * | couven92 joined #nim |
07:04:05 | * | craigger quit (Ping timeout: 240 seconds) |
07:12:00 | * | endragor quit (Remote host closed the connection) |
07:17:27 | * | cspar quit (Ping timeout: 240 seconds) |
07:30:06 | * | SenasOzys joined #nim |
07:31:21 | FromGitter | <Varriount> Tanger: Nothing style wise. |
07:32:34 | Tanger | Rats. Thanks Varriount |
07:32:51 | FromGitter | <mratsim> @Varriount, I’m using Apple Instruments |
07:33:26 | FromGitter | <Varriount> Tanger: We do have a style guide though. |
07:35:02 | FromGitter | <mratsim> otherwise nimsuggest will show when your code doesn’t compile and the reason why |
07:36:31 | Tanger | Awesome! I'll check out nimsuggest, mratsim |
07:40:43 | FromGitter | <mratsim> if you installed nim via chosen it’s already installed by default |
07:41:10 | FromGitter | <mratsim> Normally any plugins for any code editor like Visual Studio Code willpick it up and use it |
07:42:33 | * | endragor joined #nim |
07:42:39 | * | endragor quit (Remote host closed the connection) |
07:43:12 | * | endragor joined #nim |
07:45:07 | * | SenasOzys quit (Ping timeout: 260 seconds) |
07:47:16 | skrylar | Does it? I didn't know nimsuggest had smart errors |
07:47:33 | skrylar | The amount of ambiguous errors in nim is waayyy lower than in Red |
07:53:51 | * | yglukhov joined #nim |
07:56:18 | * | Arrrr joined #nim |
07:56:18 | * | Arrrr quit (Changing host) |
07:56:18 | * | Arrrr joined #nim |
07:58:24 | * | yglukhov quit (Ping timeout: 248 seconds) |
07:59:40 | * | kobi7 joined #nim |
08:01:33 | kobi7 | question: say I have a few types, that have a var count:int, now I have a procedure that uses the count var in its body, but doesn't care beyond this. What is the nim equivalent of the most abstract argument to pass to this procedure? |
08:02:23 | kobi7 | proc isEmpty(x:{ var count:int }): bool |
08:02:33 | kobi7 | is there something similar to that? |
08:03:55 | kobi7 | any interface (concept) or type that has the required part will match and be accepted. |
08:05:45 | skrylar | concepts |
08:05:50 | kobi7 | also anonymous types if nim supports that. |
08:06:06 | skrylar | https://nim-lang.org/docs/manual.html#generics-concepts |
08:06:44 | kobi7 | skrylar: ok, but I need to create a concept specifically for that, besides can I update types (which could be 3rd party) to "tag" them to the new concept? |
08:06:49 | skrylar | anonymous types are probably a bad idea, but tuples don't have to be declared ahead of time |
08:07:35 | skrylar | i don't think a concept has to be made for a specific type, IIRC they're go-esque in that as long as something fits the spec then it fits the concept |
08:07:45 | skrylar | caveat: i have used go interfaces, i have not used nim concepts extensively |
08:07:49 | kobi7 | if I pass a "tuple description" will it match the types that supercede it? |
08:08:14 | kobi7 | supercede is not the right word. I mean that the tuple is a subset of the type |
08:09:00 | skrylar | from what i recall, generics aren't checked super strictly. you can just have a generic of type T, call functions on it, and if that would have compiled then its allowed |
08:09:20 | skrylar | ex. you don't need to say "this must have a foobar function" you just *use the foobar function* and it will error if a supplied type can't use it |
08:09:36 | kobi7 | it is a good feature, and I like this way of programming. felt like something like that was missing in nim. or perhaps I just don't realize how to do it idiomatically |
08:09:44 | kobi7 | skrylar: does this happen in compile time? |
08:09:59 | skrylar | generics are resolved at compile time |
08:10:18 | skrylar | i think concepts can be used to make go interfaces but that's getting in to dom96 or Araq 's territory |
08:10:57 | kobi7 | so it's not like a dynamic language, but also not like a contract/interface sort of thing. |
08:11:04 | kobi7 | What would be the type in the example I gave? |
08:11:22 | kobi7 | I'd have to know all the future types to use my proc |
08:11:54 | skrylar | eeh. what i do is just `proc foo[T](somet: var T) = somet.explode` |
08:12:18 | skrylar | whenever you call foo(thing) it will (at compile time) try to resolve the types and look up the calls, no forward declaring needed |
08:12:29 | kobi7 | oh, so it's basically checked in the body, not the signature... |
08:12:57 | skrylar | it's not really 'checked' so much as it tries to compile it as though it wasn't a generic |
08:13:29 | skrylar | concepts are probably better because i think those give more sane errors, whereas the way i do it doesn't really tell you that a given type is invalid, just that some function didn't exist |
08:13:41 | kobi7 | I am so used to the way of interface, to specify what can come in. but you're saying take this off your mind, it'll be checked for me. |
08:13:59 | skrylar | it *can* be. as i said, haven't used concepts much |
08:14:32 | kobi7 | do you know if a concept can do what I want, without "connecting" the types to the concept? |
08:14:48 | skrylar | but yes. nim generics don't follow some hardass haskell type rule where all must be known ahead of time, you can just make them and it will try its best to make them work :) |
08:14:51 | kobi7 | I mean, there is no need to declare, this type implements this concept, like in oop |
08:15:01 | skrylar | thats the point of concepts |
08:15:11 | skrylar | you just say what the type must have, the type doesn't have to say it complies |
08:15:23 | kobi7 | oh cool. Thanks a lot for clarifying this to me. |
08:15:31 | skrylar | similar to say Go's interfaces. if something has the behaviors defined in the concept, its a member of the concept, it doesn't have to know that it is one |
08:16:05 | kobi7 | bonus question: can concepts be "extended" or "inherited", to combine the fields of one, with the other? |
08:16:19 | skrylar | The reason other languages require you to specify that something has an interface, is because they create optimized virtual tables for those. Whereas we have to (as Go does) do things like this https://nim-lang.org/docs/manual.html#generics-vtable-types |
08:16:21 | kobi7 | appended together, whatever u wanna call it |
08:17:01 | skrylar | maybe? |
08:17:11 | skrylar | I don't compile with the experimental flag (yet) :\ |
08:17:32 | kobi7 | I think the description is a bit too technical for me... i'll figure out later :-) |
08:18:56 | skrylar | short version: just use generics and assume the behaviors you want exist. concepts are still in testing. but they don't require types to "support" them, they just let you be more explicit about what you expect it to do |
08:19:32 | kobi7 | u know, I like it. nim solves the issue differently. just needed to understand the different way to work in. I heard many newcomers ask about interfaces. |
08:19:41 | kobi7 | Where is the wiki to add your explanation to? ;-) |
08:20:00 | skrylar | i think you're expected to buy dom's book, not sure |
08:20:09 | kobi7 | I did. |
08:20:24 | skrylar | hmm |
08:20:42 | kobi7 | it's just previous knowledge and assumptions |
08:21:30 | kobi7 | I'll experiment with them more, to see what's possible. Thanks again! |
08:22:45 | * | claudiuinberlin joined #nim |
08:22:59 | FromGitter | <alehander42> @dom96 / araq, I prepared a script for creating issues for needed-libraries from the survey results (I tried to cleanup some repeated wishes, but still got around 60) ⏎ should I a go ahead and create them ? (or maybe create them from some kind of "bot" account, so people don't get confused and think they're my own issues?) |
08:23:54 | kobi7 | alehander42, what survey results? |
08:24:30 | FromGitter | <alehander42> https://nim-lang.org/blog/2017/10/01/community-survey-results-2017.html#what-critical-libraries-are-missing-in-the-nim-ecosystem |
08:28:19 | kobi7 | thanks, interesting. |
08:28:25 | * | kobi7 quit (Quit: Leaving) |
08:29:42 | * | salewski joined #nim |
08:30:32 | salewski | Do we have a round() proc rounding float to integer? Or do we not need it? |
08:30:45 | * | craigger joined #nim |
08:32:37 | * | floppydh joined #nim |
08:34:51 | * | PMunch joined #nim |
08:35:17 | * | salewski quit (Quit: WeeChat 1.9.1) |
08:47:06 | FromGitter | <mratsim> @kobi7 if you want inheritance look at ref objects + methods, that would be OO inheritance |
08:47:31 | FromGitter | <Varriount> Someday we'll get those vtref types |
08:48:20 | FromGitter | <Varriount> Which seem like a good replacement for methods and procedural members |
08:49:28 | FromGitter | <Varriount> @mratsim Although, with the whole "new runtime" thing, I guess we'll bed a "vtobj" type? |
08:57:20 | FromGitter | <Varriount> With the vtable types and new runtime planned, all Nim needs now is a multithreading system to rival Go, Elixer, or Rust |
09:02:02 | euantor | `Better redis client` - I wonder what's lacking in the current redis library at https://github.com/nim-lang/redis |
09:02:28 | * | yglukhov joined #nim |
09:02:38 | FromGitter | <mratsim> Methods use dispatch trees and are probably faster than VTable due to cache locality. |
09:03:47 | FromGitter | <mratsim> @Varriount multithreading or coroutines? |
09:05:02 | * | kier quit (Ping timeout: 260 seconds) |
09:06:00 | FromGitter | <Varriount> @mratsim However they can't be extended easily at runtime |
09:07:26 | FromGitter | <Varriount> @mratsim Well, coroutines seem to be single threaded usually |
09:07:58 | skrylar | To be fair, I did solve the UI one. |
09:08:45 | FromGitter | <Varriount> skrylar: UI one? |
09:09:04 | skrylar | Varriount: that survey of what libs people need, "simple UI" shows up several times |
09:09:09 | * | oom joined #nim |
09:11:05 | FromGitter | <Varriount> Yeah, but isn't your nfltk library mostly a wrapper? |
09:11:26 | skrylar | People were asking for wxwidgets and qt, those would be wrappers too :) |
09:11:52 | livcd | why not electrong ? :FF |
09:12:11 | skrylar | livcd, no. |
09:12:32 | * | craigger quit (Ping timeout: 240 seconds) |
09:12:51 | skrylar | admittedly, libcef probably useful |
09:13:44 | skrylar | the trouble with UIs is that they are almost always going to be wrappers. To an extent, Delphi is a TurboPascal wrapper over win apis. |
09:13:47 | FromGitter | <Varriount> Yes, but I think people generally want something that doesn't require using ptr types and C-like APIs |
09:14:10 | skrylar | maybe. i haven't had much time to test/do cleanup |
09:14:21 | FromGitter | <mratsim> I like the "yield from" coroutine syntax from Python to interleave iterators. |
09:14:30 | skrylar | The biggest lose is that it isn't GC aware, although like most libs it does clean up children when the window is deleted |
09:15:15 | * | jinshil quit (Quit: Good-bye!) |
09:15:23 | * | craigger joined #nim |
09:15:36 | FromGitter | <mratsim> And Varroiount what is lacking with threadpool? Too low-level? |
09:15:52 | FromGitter | <mratsim> Varriount* |
09:16:06 | skrylar | It's probably possible to work backwards getting a nim-native fltk, but there are some crinkles: needing enough X bindings and the like to create windows, and also a canvas lib |
09:16:21 | FromGitter | <Varriount> @mratsim Mainly the whole memory sharing restrictions. |
09:17:41 | FromGitter | <Varriount> I'll admit, part of my agitation is due to https://news.ycombinator.com/item?id=15701238 |
09:17:48 | skrylar | I'm not certain if ex. QuickDraw, which was proven a long time ago, or HTML5 canvas, which is new but mostly taken from existing APIs, is a better base for ex. a canvas |
09:17:50 | FromGitter | <mratsim> Ah I see, I think stdlib could use high quality concurrent implementations of main data structures (concurrent queues, trees, etc) |
09:18:47 | skrylar | "Rust: Front-loading the pain so the rest is relatively easy." lol |
09:20:23 | skrylar | oh, nevermind. <canvas> is apparently loosely related to quickday |
09:20:27 | skrylar | *quickdraw |
09:20:44 | FromGitter | <mratsim> The comments are gold "Error: expected String got str" |
09:21:10 | FromGitter | <mratsim> Maybe we'll get that with the proposed Views ;) |
09:21:16 | skrylar | will probably try to finish a miglayout in nim before worrying about nimizing ftlk more though |
09:21:34 | skrylar | i find it more important that interesting work can be done, than interesting work can be done using no external deps |
09:21:57 | livcd | skrylar: just the existence of electron proves that making a multiplatform UI library / framework is an impossible task for everyone :D |
09:22:22 | skrylar | livcd, electron is a symptom of an age where your computer doesn't boot to a BASIC prompt |
09:22:31 | livcd | haha |
09:22:49 | livcd | What is the opinion of sciter.com ? |
09:22:51 | skrylar | i'm only half joking. a lot of these hacks think that CSS is programming |
09:22:57 | FromGitter | <Varriount> Ugh. I need to stop reading Hacker News before I throw my phone against the wall |
09:23:23 | skrylar | yea i stopped reading news |
09:23:26 | skrylar | of any kind |
09:23:35 | skrylar | except a newsletter that goes to new whitepapers on AI |
09:23:49 | FromGitter | <mratsim> I think it's because GUI is the Apex of bikeshedding wars so it includes every single thing, and a GUI framework quickly becomes gigantic and unmaintainable. |
09:24:17 | skrylar | well |
09:24:30 | FromGitter | <alehander42> skylar: ok, so now you can e.g. update some UI issue in https://github.com/nim-lang/needed-libraries/issues if you think you have a solution, so people can know where to look |
09:24:31 | skrylar | GUI frameworks involve a lot of non-glorious yak shaving that most people aren't interested in doing for rfee |
09:25:00 | FromGitter | <alehander42> I really hope issue creation doesn't trigger an email for the watchers because they'd hate me now |
09:25:25 | FromGitter | <mratsim> @Varriount lurk in Reddit learnprogramming and convert newbies :p |
09:25:33 | FromGitter | <matrixbot> `frogEye` Anbody using libui with nim-lang/ui wrapper |
09:25:57 | FromGitter | <matrixbot> `frogEye` I am facing some dependencies issue when using libui |
09:27:03 | skrylar | araq wrote a libui wrapper, i also did, but libui sucks |
09:27:15 | Araq | :-) |
09:27:26 | FromGitter | <mratsim> https://www.reddit.com/r/learnprogramming/comments/7d2fdw/new_language_for_an_intermediate_programmer/ this guy needs to know about Nim no? |
09:27:29 | FromGitter | <matrixbot> `frogEye` I have a driver in nim |
09:27:50 | FromGitter | <matrixbot> `frogEye` I want to make a UI tool for configuring it |
09:27:58 | FromGitter | <matrixbot> `frogEye` So i need a quick solution |
09:28:23 | FromGitter | <matrixbot> `frogEye` Running ui examples have become a pain |
09:28:24 | skrylar | I suppose we could just "not" do a canvas lib, and rely on whatever the OS has |
09:28:35 | skrylar | that is what FLTK does |
09:28:37 | FromGitter | <matrixbot> `frogEye` But sample UI looks fine to me |
09:29:22 | FromGitter | <matrixbot> `frogEye` UI sample UI gives u native feel |
09:29:46 | skrylar | native feels are overrated. |
09:30:02 | skrylar | people are happily using electron apps that are bloated to hell, not native, and not complaining |
09:30:20 | livcd | skrylar: in Go i use a warapper around win32 apis on Windows for basic types of apps. If I would ever want to have a mor eye pleasing experience for the user and would still want to write in GO i would probably look at Electron or sciter |
09:30:31 | livcd | skrylar: yes but electrong apps pretty much look good and feel "native" |
09:30:51 | skrylar | Watching atom's menu bars draw slowly on a 2.5ghz is not feeling native at all |
09:30:56 | skrylar | Raytracers are faster than Atom |
09:31:30 | FromGitter | <matrixbot> `frogEye` Guys I need one help and want to try libui in nim first |
09:31:31 | livcd | sure but VScode opens almost instantly |
09:31:41 | * | yglukhov quit (Ping timeout: 250 seconds) |
09:32:19 | FromGitter | <mratsim> @skrylar here is your AI fix for today: opensource implementation of AlphaGo Zero (trivia: Leela is a very high quality bot made by the author of music app foobar2000) |
09:32:23 | Arrrr | javascript was a mistake http://i0.kym-cdn.com/photos/images/facebook/000/916/071/aa6.jpg |
09:32:23 | FromGitter | <mratsim> https://github.com/gcp/leela-zero |
09:32:25 | skrylar | to be more direct: i am not against native-looking UIs. i am however, not interested in binding GTK3 which will just break again in six months when they decide its "GTK4: Now With More Bloat And Nothing Else" |
09:33:38 | skrylar | Going with ex. wx is fine, that's mostly a stable target, but its again a wrapper. |
09:34:09 | FromGitter | <matrixbot> `frogEye` Andreas Rumpf (Gitter): libui.dll is part of the nim bin do we still need to add it to the nimui wrapper to use it? |
09:34:47 | * | vlad1777d_ quit (Ping timeout: 255 seconds) |
09:35:04 | skrylar | mratsim: interesting. i read the deepmind DQN paper, and i saw one or two on A3C. I think they've moved beyong A3C though |
09:36:55 | FromGitter | <Varriount> skrylar: Could you help frogeye? I need to get to bed. |
09:37:07 | skrylar | Varriount: I don't know how to use araq's version of libui |
09:38:32 | Araq | matrixbot: my libui is fine for this |
09:38:49 | skrylar | i think he's asking how to set it up? |
09:38:59 | skrylar | i would have figured it was just install and import |
09:40:04 | * | oom quit (Quit: Page closed) |
09:40:11 | FromGitter | <matrixbot> `frogEye` cd ui ⏎ cd .. # ensure libui is a sibling of your ui directory ⏎ git clone https://github.com/araq/libui ⏎ cd ui ⏎ nim c -r examples/controllgallery2.nim [https://gitter.im/nim-lang/Nim?at=5a0d5cfbcc1d527f6b790471] |
09:40:29 | FromGitter | <matrixbot> `frogEye` this is instruction for the running it |
09:40:55 | * | SenasOzys joined #nim |
09:41:05 | FromGitter | <matrixbot> `frogEye` I saw that libui.dll exist in the nim\bin |
09:41:30 | FromGitter | <matrixbot> `frogEye` So do we still need libui source to the nim-lang ui |
09:41:33 | Araq | if you have the DLL already there is little to setup |
09:41:47 | FromGitter | <matrixbot> `frogEye` Yes |
09:41:50 | FromGitter | <matrixbot> `frogEye` even I thought so |
09:42:03 | FromGitter | <matrixbot> `frogEye` but it aint able to resolve the dependencies |
09:44:00 | skrylar | mratsim: ah i see you're tackling trying to make tensor math easier |
09:44:21 | skrylar | i was wondering about a macro for that; figuring out how to allocate the scratch tensors for certain formulas |
09:48:02 | * | Vladar joined #nim |
09:49:00 | FromGitter | <mratsim> I'm doing a whole deep learning/machine learning lib. Hopefully I will get to sparse neural networks, probabilistic/bayesian neural nets and graph neural nets (one can dream) |
09:50:23 | skrylar | i have some torch-esque simple networks.. would like to work on those again sometime |
09:50:31 | FromGitter | <mratsim> In the coming month I want to finish 2d convolution on CuDNN (forward is done), add CSV and json loading/exporting, add serialization, and MNIST. |
09:50:56 | skrylar | is json the right format for this kind of data though? it's mostly going to be floats |
09:51:15 | skrylar | i would have said bson, msgpack, maybe HDF or ebml |
09:51:55 | skrylar | i saw the nothings guy also has a format http://nothings.org/computer/sbox/sbox.html |
09:53:06 | skrylar | Thought about doing a module for sbox; it looks pretty basic |
09:53:38 | FromGitter | <mratsim> For serialization probably not, but I will get data as CSV and json anyway. |
09:53:52 | skrylar | well yea, data input. for storing neural nets, not sure |
09:53:58 | skrylar | tensorflow turns it all in to protobufs iirc |
09:54:21 | * | gokr joined #nim |
09:54:31 | FromGitter | <mratsim> Have to check how PyTorch does it. Caffe uses protobuf as well. |
09:54:56 | skrylar | it would be pretty sweet to have a DevonThink equivalent on linux. then i could stop abusing zotero for these things xd |
09:55:31 | skrylar | i mean.. zotero is okay-ish? starts getting long in the tooth for storing *all* of the papers you've read |
09:58:21 | skrylar | ouch |
09:58:32 | skrylar | Apparently some more well known mac apps are going the way of adobe |
09:58:41 | * | kier joined #nim |
09:58:45 | skrylar | "pay us a subscription OR ELSE" for a ... desktop app that is effectively complete |
09:59:00 | skrylar | https://welcometosherwood.wordpress.com/2017/08/11/to-subscribe-or-not-to-scubscribe/ |
09:59:01 | * | yglukhov joined #nim |
10:00:55 | Araq | frogEye: what's the problem with libui? |
10:01:33 | skrylar | he was having problems with it not resolving dependencies (or something}) |
10:03:00 | FromGitter | <mratsim> @skrylar My wife used Mendeley + Nitro PDF + Latex to manage bibliography + references + annotations on Windows |
10:10:36 | couven92 | Araq, I saw your contribution to `asArray` yesterday... It doesn't work: https://github.com/nim-lang/Nim/pull/6640#discussion_r151334787 |
10:14:05 | FromGitter | <mratsim> Interesting lib: (wannabe) safe parser in C for images, audio, video from Google (to deal with malicious files): https://github.com/google/puffs. From the readme "as fast as C, as safe as Rust". |
10:14:06 | Araq | couven92: I know, will fix later |
10:14:39 | couven92 | Araq, but I have fixed and simplified testament HTML for you :) |
10:15:10 | Arrrr | will trigger a lot of rust users |
10:16:04 | skrylar | mratsim: i don't really do academic writing; it's mostly that i need to store papers that i want to keep around or links to pages i might need to pull out again later when someone challenges me on it |
10:17:13 | skrylar | devothink interacts with some macos services, so you just sorta pile everything there and then spotlight search pdfs later |
10:17:44 | FromGitter | <mratsim> Actually Google Puffs is a lang that compiles to C ^o) |
10:18:12 | skrylar | theres always symbolic execution :) |
10:18:49 | skrylar | well. klee is overboard i think. trying to symbolicly execute whole programs -- combinatorial explosions. but i think maybe if you did it for a single function, then cached the results, you could maybe do it in pieces |
10:19:16 | skrylar | i mean thats what mathematicians do; they make proofs and domains over one thing, and then just rely on that. whereas klee tries to "solve physics" in one shot |
10:24:06 | Araq | mratsim: good ideas in there but it's in development and I've been there, done that |
10:24:25 | Araq | it get complex *really* quickly |
10:24:35 | Araq | with tons of cases to consider |
10:25:10 | Araq | and programmers are smart, they know lots of rules and when the compiler doesn't know all of these too, it becomes annoying |
10:25:39 | FromGitter | <matrixbot> `frogEye` > <Araq> frogEye: what's the problem with libui? ⏎ ⏎ ui_ui.obj : error LNK2019: unresolved external symbol uiControlShow referenced in function show_afaoaEIZ8zbiWjbHA9cszXg_2 |
10:25:54 | FromGitter | <matrixbot> `frogEye` these type of statements i can see |
10:25:57 | skrylar | it sounds like puffs could be done as a sadistic macro |
10:26:02 | Araq | frogEye the DLL was built for GCC |
10:26:20 | FromGitter | <matrixbot> `frogEye` Ohk |
10:26:30 | FromGitter | <matrixbot> `frogEye` and I m trying to run it with vcc |
10:26:37 | FromGitter | <matrixbot> `frogEye` idiot me |
10:26:49 | skrylar | i remember his libui having comments about not working with msvc, or some bugs |
10:26:57 | skrylar | never actually knew why |
10:27:58 | Araq | skrylar: I eventually got it to work with vcc and gcc and it was much more painful with gcc |
10:28:43 | FromGitter | <matrixbot> `frogEye` Araq building wid gcc will have any issue |
10:28:59 | FromGitter | <matrixbot> `frogEye` as in git u have mentioned in windows we should use vcc? |
10:29:25 | skrylar | setting up tdm-mingw and using gcc on windows can be.. interesting |
10:29:49 | * | skrylar has successfully used clang on msys on windows and managed to break Urho doing so once |
10:31:37 | Araq | tdm-mingw? use Nim's Mingw version, that has been extensively tested and doesn't install a ton of bloat |
10:35:32 | dom96 | matrixbot? What is this? |
10:36:05 | dom96 | matrix connects to IRC directly, why is there a matrixbot on Gitter? |
10:36:21 | skrylar | Araq, or just throw windows in the garbage :^) |
10:40:28 | Araq | mratsim: also I find this "Provable arithmetic within bounds" overkill, just use saturated arithmetic instead |
10:40:43 | Araq | solves the problem in a much more elegant fashion IMO |
10:44:10 | federico3 | dom96: gitter has its own protocol |
10:44:33 | FromGitter | <Varriount> Anyone have concrete/factual data that a GC can perform on par with destructor-based memory management? |
10:45:07 | Araq | huh? it's obviously true :P |
10:45:17 | FromGitter | <Varriount> This comment is begging for a reply: https://news.ycombinator.com/reply?id=15711525&goto=item%3Fid%3D15710021%2315711525 |
10:45:43 | skrylar | Varriount: i used to but it was a while ago |
10:45:49 | FromGitter | <mratsim> Implementing trees data structure with destructors is probably painful. |
10:45:50 | skrylar | you'd have to ask the ocaml guys |
10:45:53 | Araq | to clean up the most recent generation in a copying allocator, reset the bump pointer |
10:46:06 | skrylar | some ocaml doods were claiming to have better performance than boost pointers |
10:46:12 | FromGitter | <mratsim> Concurrent trees* |
10:47:11 | FromGitter | <matrixbot> `frogEye` I checked out libui and build the whole workspace with vcc |
10:47:18 | FromGitter | <matrixbot> `frogEye` the prlm still persists |
10:51:49 | * | marenz__ joined #nim |
10:52:14 | FromGitter | <Varriount> What error do you get? |
10:52:38 | FromGitter | <matrixbot> `frogEye` its linking error |
10:52:51 | FromGitter | <matrixbot> `frogEye` SOme references are not getting resolved |
10:53:05 | FromGitter | <matrixbot> `frogEye` ui_ui.obj : error LNK2019: unresolved external symbol uiControlShow referenced in function show_afaoaEIZ8zbiWjbHA9cszXg_2 |
10:53:26 | FromGitter | <matrixbot> `frogEye` like this there are other symbols are der too |
10:54:41 | * | wishi quit (Ping timeout: 240 seconds) |
10:57:04 | FromGitter | <Varriount> Araq: ^ |
10:59:08 | FromGitter | <matrixbot> `frogEye` Tats complete log |
11:00:41 | * | wishi joined #nim |
11:00:57 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
11:01:56 | skrylar | so i have this ebook on random decision trees. it looks like it's just.. BSP tree splitting? |
11:02:03 | * | claudiuinberlin joined #nim |
11:03:11 | federico3 | where is the testament's HTML output being published? |
11:08:20 | * | SenasOzys quit (Remote host closed the connection) |
11:09:27 | FromGitter | <Varriount> frogEye: You might try using one of the other libraries. Nimx for example. |
11:12:16 | FromGitter | <matrixbot> `frogEye` But I want to figure out what is the prlm wid this |
11:15:53 | FromGitter | <Varriount> You're using gcc? What does your Nim code look like? |
11:16:44 | skrylar | he's using vcc |
11:18:30 | couven92 | federico3, as of no it isn't... But when running the testsuite, testament will create a json file for each category and with the `testament html` command, it will generate a nice HTML page with testresults |
11:19:04 | couven92 | with expandable panels, colour coding, nice expected and gotten output, all the good stuff |
11:19:32 | couven92 | (sorry, I designed it, take it with a grain of salt! :P ) |
11:19:55 | federico3 | couven92: the json file is not being served by travis ci, am I right? |
11:20:25 | couven92 | no, though I asked Araq if we should maybe do it, but he said there'd be no sense in doing that |
11:21:02 | couven92 | In AppVeyor you already have a nice interface for tests that are populated by testament |
11:21:06 | federico3 | a dashboard to show pr failures would help |
11:21:12 | couven92 | I agree |
11:21:34 | FromGitter | <Varriount> frogEye: It might be worth it to post your problem to the forum. More like still see it and be able to offer solutions. |
11:25:21 | Araq | varriount: destructors are actually a pretty shitty way to do memory management but they play nice file handles etc |
11:25:56 | Araq | they are excellent for interop IMO |
11:28:55 | couven92 | Araq, something is funny with both TravisCI tests again, during the `bin/nim rst2html` step I get `ioselectors.nim(82, 47) Error: undeclared identifier: 'SocketHandle'` ref.: https://travis-ci.org/nim-lang/Nim/jobs/302940494#L4948 |
11:33:40 | * | derlafff quit (Quit: No Ping reply in 180 seconds.) |
11:35:14 | skrylar | mratsim: do you think arraymancer would work for a clickbait detector =p |
11:39:07 | * | derlafff joined #nim |
11:48:39 | * | derlafff quit (Quit: No Ping reply in 180 seconds.) |
11:51:19 | * | derlafff joined #nim |
11:52:29 | * | chemist69_ quit (Ping timeout: 255 seconds) |
11:52:53 | * | chemist69 joined #nim |
11:59:29 | * | derlafff quit (Ping timeout: 248 seconds) |
11:59:40 | * | endragor quit (Remote host closed the connection) |
12:01:51 | * | derlafff joined #nim |
12:03:53 | * | JappleAck joined #nim |
12:07:14 | * | dddddd joined #nim |
12:11:00 | couven92 | federico3, I just did a test-run. here's how the HTML looks like: http://uit-no-fra006.azurewebsites.net/testresults.html |
12:11:18 | * | derlafff quit (Quit: No Ping reply in 180 seconds.) |
12:14:29 | * | derlafff joined #nim |
12:24:14 | * | elrood joined #nim |
12:25:05 | * | derlafff quit (Quit: No Ping reply in 180 seconds.) |
12:29:13 | FromGitter | <matrixbot> `frogEye` > frogEye: It might be worth it to post your problem to the forum. More like still see it and be able to offer solutions. ⏎ ⏎ Thanks |
12:30:42 | * | derlafff joined #nim |
12:31:09 | * | SenasOzys joined #nim |
12:33:35 | * | Angela_ joined #nim |
12:34:09 | hohlerde | mhm, matrixbot |
12:34:11 | skrylar | blegh. just finished reading about and wrapping event triggers in firebird |
12:34:26 | federico3 | couven92: nice - I could publish something similar at https://nimble.directory:4453/pr/6740 |
12:35:00 | * | Angela_ quit (Client Quit) |
12:35:09 | couven92 | federico3, where did that come from? |
12:35:11 | * | endragor joined #nim |
12:35:37 | federico3 | couven92: just hacked it together - it gets the travis build and run numbers from GH |
12:37:04 | couven92 | I see... yeah, I envisioned something like that as well... we could for example generate the html in Travis and then output the testresults.html file as a build artifact or directly upload it to somewhere |
12:37:24 | federico3 | unfortunately travis ci still does not host the artifacts |
12:37:29 | * | derlafff quit (Quit: No Ping reply in 180 seconds.) |
12:38:12 | couven92 | Ah, okay... well then we'd need a little upload tool deployed together with the Travis Build and invoke that from the .travis.yml |
12:38:50 | federico3 | it can push stuff into S3 IIRC |
12:39:37 | couven92 | federico3, how did you do yours? read and parsed the output of the running-tests-step? |
12:39:50 | federico3 | couven92: the show/hide buttons are a bit odd. You could have an All/successful/skipped/failed radio button |
12:40:26 | couven92 | hmmm... yeah mayebe |
12:40:28 | federico3 | couven92: the only available output is the raw log from travis |
12:40:56 | * | derlafff joined #nim |
12:40:58 | couven92 | yeah, we could add a step in travis where it outputs all the json, and then read that :P |
12:43:10 | federico3 | yes that would help! |
12:43:35 | couven92 | although pushing the json data directly into S3 sound more foolproof |
12:44:13 | federico3 | how so? also you need to handle S3 credentials and pay for the bucket |
12:45:02 | couven92 | true... Hmm, I can branch off my testament-branch and create a sample with json output... so that you can have a look? |
12:46:51 | Araq | I just look at the appveyor results instead |
12:47:08 | Araq | very often they agree on the test failures |
12:47:27 | Araq | and if not, I search for "failure" in travis' log |
12:47:44 | Araq | I don't really care that much how ugly it is, I don't read it |
12:48:05 | couven92 | Araq, it would still be nice to have a nice visual representation, since testament can do it now |
12:48:56 | couven92 | and it's much easier to find **all** failing tests if you can just filter out the noise... |
12:49:45 | * | arnetheduck joined #nim |
12:49:47 | couven92 | (That's why I did the HTML stuff, I need some overview when I did the Android stuff, there were quite a few fails across different categories) |
12:51:23 | * | derlafff quit (Ping timeout: 258 seconds) |
12:52:21 | * | claudiuinberlin quit (Max SendQ exceeded) |
12:56:11 | * | Arrrr quit (Quit: Leaving.) |
12:56:21 | * | derlafff joined #nim |
12:56:49 | Araq | sure ok, but don't make it more fragile |
12:57:19 | Araq | the tests which have race conditions on windows because 'echo' is broken are already bad enough |
12:57:20 | federico3 | same here, I have to click through pr -> CI tool -> logs -> search for failures there |
12:57:21 | FromGitter | <mratsim> @skrylar you can probably do "clickbait title generation" once RNNs are done ;) |
12:57:26 | Araq | or the http tests |
13:05:19 | * | derlafff quit (Ping timeout: 250 seconds) |
13:06:46 | * | derlafff joined #nim |
13:15:26 | * | loongw joined #nim |
13:20:03 | * | loongw quit (Quit: Mutter: www.mutterirc.com) |
13:21:19 | * | loongw joined #nim |
13:23:39 | * | loongw quit (Client Quit) |
13:28:47 | FromGitter | <alehander42> how can I stop Nim from optimizing out a helper function which is not called ? |
13:29:01 | * | sz0 joined #nim |
13:30:08 | FromGitter | <alehander42> {.deadcodeElim: off.} |
13:30:15 | FromGitter | <alehander42> on top of file doesn't seem to help |
13:31:37 | FromGitter | <alehander42> `{.used.}` also doesn't affect this |
13:32:05 | skrylar | mratsim: eeh. i'll probably just experiment with word/paragraph vectors sometime. might have enough coded to do that |
13:32:32 | skrylar | kind of want what transhumanists call a muse more than the usual RSS readers. basically one that filters out garbaage articles that aren't interesting ::> |
13:33:03 | skrylar | paragraph vectors seem to be the current experimental thingy for finding the meaning of articles |
13:33:31 | FromGitter | <mratsim> I use news360.com for that, used to use prismatic before it was bought and shutdown by Flipboard |
13:33:35 | FromGitter | <matrixbot> `frogEye` > frogEye: You might try using one of the other libraries. Nimx for example. ⏎ ⏎ Varriount (Gitter) nimx i have tried before its sad |
13:33:54 | FromGitter | <matrixbot> `frogEye` it doesnt look good |
13:34:19 | FromGitter | <matrixbot> `frogEye` Can u suggest any UI framework from which I can acces nim code |
13:34:30 | * | aziz joined #nim |
13:37:34 | FromGitter | <mratsim> "The sad state of UI" could be written for any language :/, QT, GTK or Electron, pick your pain. |
13:39:19 | FromGitter | <matrixbot> `frogEye` I wanted to write UI in nim only and wanted to avoid QT |
13:39:43 | FromGitter | <matrixbot> `frogEye` but ryt now I am not able to find any other solution |
13:40:22 | dom96 | alehander42: if you'd like I can give you the raw data from the survey btw |
13:42:15 | FromGitter | <alehander42> @dom96 I already populated the initial issues, but that would be great if there's more stuff that can be added to some of the descriptions(or even new issues) |
13:43:26 | FromGitter | <alehander42> Also, currently my script can't label them, can I get access to the needed-libraries repo ?(or is there another way to add labels to the issues) |
13:46:15 | dom96 | sure |
13:54:45 | * | dexterk joined #nim |
13:57:46 | * | dexterk quit (Client Quit) |
13:58:21 | * | dexterk joined #nim |
14:00:25 | skrylar | mratsim: eeh yeah but i'm trying :f |
14:00:36 | skrylar | even if i don't have that cool Morphic-esque thing in nim |
14:03:57 | * | gokr quit (Ping timeout: 240 seconds) |
14:07:50 | FromGitter | <mratsim> A good cross-platform UI lib that does not require learning behemoth-like QT, GTK, Electron would probably be a killer app |
14:08:29 | FromGitter | <mratsim> Documenting that though .... |
14:10:56 | skrylar | Well, no. Behemoth amounts of learning is sort of part and parcel |
14:11:25 | skrylar | wx and fltk are probably the 'simplest' |
14:11:36 | skrylar | Shoooooes was kinda cute though |
14:12:34 | dom96 | Surely Electron doesn't need that much learning |
14:13:12 | dom96 | I think a stripped down implementation of HTML/CSS specifically designed for GUIs would be brilliant. |
14:13:29 | skrylar | so basically shooooes. |
14:14:08 | Araq | frogEye: well you can always build the DLL on your own, I documented how to do this |
14:14:17 | dom96 | Why are you writing so many Os? |
14:14:19 | skrylar | dom96, http://shoesrb.com/ or rebol/red's VID is basically what you're asking for |
14:14:35 | skrylar | dom96, because when _why originally published it, it was named shoooooes with many o's. |
14:14:47 | skrylar | the new maintainers trimmed it |
14:14:49 | Araq | btw Karax's DSL can be used independently of the browser DOM to create HTML code |
14:15:14 | dom96 | skrylar: Don't see any HTML/CSS there, just a DSL |
14:15:46 | Araq | libui is lacking too many features and wx has too many features |
14:15:55 | skrylar | what's wrong with a dsl? html is not a GUI markup |
14:16:15 | Araq | PMunch has a nice DSL for UI construction |
14:16:31 | Araq | it can build wx UIs and karax UIs iirc |
14:16:43 | dom96 | nothing wrong |
14:16:43 | skrylar | libRocket did use a variant of html and css |
14:16:50 | dom96 | HTML and CSS is more familiar |
14:20:16 | dom96 | alehander42: https://gist.github.com/dom96/18476ae2d4366c1f82878c12a8837b7e |
14:20:52 | FromGitter | <data-man> My vote go to IUP |
14:21:05 | dom96 | alehander42: added you as a collaborator as well |
14:21:36 | skrylar | wx is okay, i think. |
14:22:13 | skrylar | its difficult to 'just' be a GUI. there's so much anemia in C++ that you end up having to be an application framework in the end |
14:24:10 | skrylar | i'm having a hard time finding a list of quickdraw functions. was curious about that, because it seems to have been beloved in its day, although i'm not sure it was that different from "just bind cairo" |
14:28:00 | skrylar | it would probably also help GUI code to look in to Lisp's Cells project |
14:29:30 | * | skrylar wonders if one should be concerned about "hundreds of function calls" for an event, or if that time has long past in 2017 |
14:30:01 | Araq | you should be, because debugging takes the most time in development |
14:30:15 | PMunch | Araq, I'm still working on the DSL for the new genui |
14:30:40 | PMunch | But I have written the old genui for Gtk 2/3, wxWidgets, and NiGui |
14:30:49 | FromGitter | <alehander42> dom96 thanks, I'll add some more issues from the raw data |
14:31:18 | skrylar | Araq, well in a way its not easily avoided. a very complex app is going to have possibly hundreds of menu items / toolbar buttons in total, and the enabled state for those can change on arbitrary conditions |
14:31:25 | PMunch | I'm still a bit stuck on how to provide custom widgets for my new system, and until I have figured that out I don't want to create a DSL for it |
14:31:45 | skrylar | ex. "cut" is disabled if there is no text selected in the front-most text field |
14:33:16 | skrylar | Cells is kind of interesting because AFAICT you just sorta define conditions / a formula, and then it works out the DAG for variables going in, so you just say "there is no text selected" and it works out the calll graph to get the UX up to date |
14:33:31 | skrylar | but its generic so it works for everything |
14:35:19 | skrylar | i think the hundred something function calls is probably unavoidable, because that's just the nature of retained-mode scene graphs :/ |
14:35:44 | Araq | yeah, retained-mode sucks |
14:35:58 | Araq | use immediate-mode UIs. |
14:36:04 | skrylar | immediate mode is even more wasteful |
14:36:17 | skrylar | you're still doing those hundreds of calls; one for each menu item :) |
14:36:34 | skrylar | might have to look in to it, dunno. |
14:36:37 | Araq | the JS guys learned it the hard way and invented React |
14:36:52 | skrylar | they also have bacon.js |
14:37:15 | skrylar | Oh. |
14:37:26 | PMunch | Well the new genui is made in a way that hides a lot of it. You provide a variable and then it will match it's type to a widget and create all the callbacks you need. |
14:37:38 | Araq | I wrote nimedit with SDL2 as an immediate-mode UI. it doesn't take me hundreds of nested function calls |
14:37:40 | skrylar | Yes, react looks like the revenge of Greenspun's Law |
14:38:24 | skrylar | "A Lisper did this in 1/10th of the SLOC twenty years ago, but now that <some AAA tech firm> spent thousands doing it all over again, we care now." |
14:38:54 | Araq | immediate-mode simply works (TM) because you don't have state that can get out-of-sync |
14:39:47 | skrylar | eeeh. there are some massive problems with immediate mode. but it's code reads nicer |
14:40:31 | skrylar | tried doing some research on imm v. retained and some people were evangelizing immediate mode pretty hard, but then conceding that theres a lot of caching that goes in to the more scalable immguis |
14:41:17 | FromGitter | <Jipok> Can I do something like this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a0da38d982ea2653f88c6f6] |
14:41:35 | Araq | which problems? what "caching"? every game out there works in immediate mode unless the devs bolted on some misguided OO crap :P |
14:41:51 | FromGitter | <mratsim> Having easy to read code makes for easier bug spotting, attracting contributors, learning, and maintenance. (All other things being equal, can't compare dynamic typed with static typed I guess) |
14:42:01 | Araq | (which is "very often" these days) |
14:43:18 | skrylar | consider some of the things you have to deal with in a "civilized" desktop environment: identifying text of widgets to the OS, so screen readers know whats going on. identifying text regions for IME systems. accessibility systems |
14:43:18 | FromGitter | <mratsim> @jipok tmp[].c is not a seq[float] |
14:43:48 | skrylar | GTK/ATK actually supports setting up positional navigation so a hypothetical accessibliity system would allow you to say "left" and go left a widget |
14:44:07 | FromGitter | <Jipok> @mratsim but is there a way to get it? |
14:44:42 | FromGitter | <mratsim> @skrylar worse is better: http://minnie.tuhs.org/pipermail/tuhs/2017-May/009935.html |
14:44:57 | skrylar | i haven't seen if fltk does anything stupid regarding ex. japanese IMEs |
14:44:58 | Araq | screen readers should use OCR techniques, meh |
14:46:19 | skrylar | mratsim: meh. lispers are just too cheeky for their own good |
14:46:34 | skrylar | they can defmacro anything.. just not a native compiler |
14:46:46 | FromGitter | <mratsim> @jipok I don't really understand what you want to do. Pass a float to a proc which wants a seq[float] ? You can use a varargs or float | seq[float] |
14:47:28 | * | skrylar was with some lisp/sbcl'ers and they were genuinely upset that i suggested an 80mb runtime might not be appropriate |
14:48:36 | * | aziz quit (Ping timeout: 268 seconds) |
14:48:45 | FromGitter | <Jipok> @mratsim I want to get seq with all tmp[i].c |
14:49:19 | FromGitter | <mratsim> The article was how BSD took their time to implement the correct thing (TM) but lost 2 years because it was irrelevant for the bulk of the market, while Linux delivered "poor" thing but compensated with good debug/recovery tools. |
14:49:39 | FromGitter | <mratsim> Example from filesystem and wifi driver's |
14:50:02 | * | hikarino joined #nim |
14:50:12 | skrylar | mratsim i would still rather use a BSD |
14:50:20 | FromGitter | <mratsim> @jipok use map/mapIt |
14:51:02 | FromGitter | <Jipok> @mratsim ⏎ ⏎ ```var tmp2 = newSeq[float]() ⏎ for i in tmp: ⏎ tmp2.add i ⏎ foo(tmp2)``` ⏎ ⏎ but make it shorter and more beautiful [https://gitter.im/nim-lang/Nim?at=5a0da5d6f257ad9109a1ebf4] |
14:51:07 | FromGitter | <mratsim> mapIt(it.c).foo |
14:52:10 | skrylar | bad designs tend to live forever because they aren't bad enough that people riot over but they suffer daily because of it |
14:52:43 | FromGitter | <mratsim> Isn't that called technical debt? |
14:52:48 | skrylar | it can be, yea |
14:52:57 | skrylar | but there are some perverse things going on too |
14:53:06 | avsej | so, nim has been accepted in fedora! https://src.fedoraproject.org/rpms/nim, it will reach repositories on the next week. If you have any suggestions or issues, don't hesitate contacting me. |
14:53:17 | skrylar | like the more suffering you endure to learn to cope with the design the more you become addicted to the sunk cost of loosing that knowledge |
14:53:41 | FromGitter | <mratsim> Excel: Death by a thousand spreadsheets. |
14:54:03 | skrylar | people like excel though :> |
14:54:19 | FromGitter | <mratsim> Or SAP. |
14:54:28 | skrylar | not familiar with that one |
14:54:37 | skrylar | is that SPSS' competitor? |
14:55:07 | FromGitter | <mratsim> It powers half of the biggest companies of the world for their accounting, delivery, finance, etc stuff |
14:55:22 | FromGitter | <mratsim> SAP projects are multi year long |
14:55:32 | skrylar | knew this one guy who kept whining about database issues. "why do they keep querying from excel" and whatnot. my answer was always the same: because excel lets you do what you need to do |
14:55:38 | FromGitter | <mratsim> And often cost millions more than planned |
14:56:02 | FromGitter | <Jipok> @mratsim thx |
14:56:12 | skrylar | lotus agenda, ecco pro and excel are like.. you just, do the thing you need |
14:56:14 | skrylar | ._. |
14:56:45 | FromGitter | <mratsim> And when done, they are outdated, too inflexible, too painful to use. SAP is the bane of everyone (look at the biggest project failure page on Wikipedia) |
14:57:38 | * | hikarino quit (Quit: hikarino) |
14:58:22 | FromGitter | <mratsim> SAP is probably one (or the?) biggest German company in the world |
14:58:34 | skrylar | Dunno. I don't even *want* to deal with megaproject management |
14:58:47 | skrylar | humans are built to operate in tribes. working groups should stay that way |
14:59:50 | skrylar | i mean hypercard was basically killed for being too effective |
15:00:02 | FromGitter | <mratsim> Excel is fine when people don't try to run trading on Excel and complains about time to refresh 100k rows of financial instruments + real-time pricing (been there done that) |
15:00:03 | skrylar | bigger companies were getting choked out of that easy database CRUD money |
15:01:06 | * | aziz joined #nim |
15:02:24 | skrylar | It would be kind of cute to see Smalltalk-80 or some Scratch-like thing used as scripting for a modern hypercard, then shove it on all the debian boxes or something |
15:03:55 | skrylar | kill the cloud by bringing back people being able to do their own shit |
15:04:15 | FromGitter | <mratsim> Also Excel tends to choke when files get in the 10~50 MB size. |
15:04:40 | skrylar | yea its not a cureall. but its the most approachable thing we have |
15:04:59 | skrylar | that's why i'm looking at the wikipedia page for toposorts and wondering how to bring Cells over to nim |
15:05:56 | skrylar | it basically works just like the spreadsheet triggers/formulas everybody likes |
15:06:48 | skrylar | probably spammed the chat enough for a while. dunno. |
15:08:13 | FromGitter | <mratsim> --> #nim-offtopic |
15:18:09 | FromGitter | <krux02> I have a weird error |
15:18:26 | FromGitter | <krux02> ``lib/system.nim(2382, 10) Error: '==' can only be used in compile-time context`` |
15:18:38 | FromGitter | <krux02> without information about the context |
15:19:56 | FromGitter | <krux02> skrylar: there is no cloud, there is only someone else computer |
15:20:30 | skrylar | mratsim: https://gist.github.com/Skrylar/a123e61419ada6e1ecf4243a186e8f1c |
15:26:20 | FromGitter | <mratsim> @skrylar lol, is that even valid Nim syntax *_* |
15:27:17 | skrylar | for macros it is |
15:27:24 | FromGitter | <krux02> @mratism it is, I used that syntax, too |
15:27:52 | FromGitter | <krux02> but the do is interesting |
15:28:10 | skrylar | its already highlighted |
15:29:20 | skrylar | it is simplest to have the 'in:' block to define variables coming out of the cobweb, otherwise you have to do some cheeky things scanning the AST to infer what the user is doing. which would probably be the preferred thing, but i dunno. liable to break with macros |
15:29:51 | skrylar | with the in block, you can just cram "let monies = <get the value here>" and leave the out block mostly pristine, and templates/macro hell works just fine |
15:30:10 | FromGitter | <krux02> ``in`` is a call, ``out`` is a call, but ``do`` is not a call, it is part of the previous call |
15:31:03 | skrylar | usually, yea |
15:33:42 | skrylar | interesting |
15:33:50 | skrylar | nim actually throws a fit about the keyword 'in' being there |
15:34:07 | skrylar | It normally allows all kinds of nonsense in untyped macro parameters |
15:34:33 | * | gokr joined #nim |
15:34:41 | FromGitter | <krux02> yea, i think nim has too many keywords |
15:34:58 | skrylar | I expected it to allow it but just tell me there was a keyword there |
15:35:20 | skrylar | if i replace them with nonkeywords, it just gives me the AST for a zero parameter function call |
15:36:19 | skrylar | well anyway you get the idea |
15:36:51 | skrylar | if `in`s are listed, and you cannot write to an input, then you cannot make a non-DAG, so its a simple toposort and what, linear scan on updates? |
15:40:29 | Araq | krux02: the number of keywords was reduced though :P |
15:40:55 | Araq | I could accept removing 'div', 'mod', 'shr' and 'shl' keywords, but 'in' is too sexy |
15:41:32 | GitDisc | <treeform> Araq: I agree with you Immidate UI is the way to go. |
15:42:27 | Araq | "asm" should have been a pragma statement |
15:42:31 | * | endragor quit (Remote host closed the connection) |
15:43:59 | skrylar | https://gist.github.com/Skrylar/a123e61419ada6e1ecf4243a186e8f1c this version is now valid as of 0.17 |
15:46:22 | Araq | Nim has 68 keywords, C++ has 91 |
15:46:43 | Araq | surprising that Nim's number is still so high :-) |
15:47:04 | Araq | keywords.txt looks harmless |
15:47:37 | * | endragor joined #nim |
15:48:42 | FromGitter | <alehander42> skrylar: does cobweb has something to do with cobol :O |
15:48:56 | FromGitter | <alehander42> (just the only ref I found on google for this name) |
15:49:08 | skrylar | alehander42: no, i just thought it would be an amusing name given what dataflow deals with |
15:49:21 | skrylar | you replace spaghetti code with a cobweb. lol |
15:49:31 | FromGitter | <alehander42> :D ah nice |
15:49:44 | skrylar | also cute spider emojis (probably) |
15:52:02 | skrylar | I suppose a cobweb could be used both ways, well two of them. have an ORM read from a database to a struct, cobweb from the struct to your GUI, second cobweb from the GUI back to the ORM |
15:52:09 | * | endragor quit (Ping timeout: 250 seconds) |
15:52:10 | GitDisc | <treeform> I am thinking of making a lib which you can give text too, and it would call OS native text functions to load the font and layout the text for win, osx, and gtk. Then return a bitmap of the text. Sort of like freetype+harfbuzz. But making it fit to the platform. Is there anything like this? Do you think it would work? |
15:53:14 | FromGitter | <krux02> addr, bind, cast, defer could all be functions, no keyword needed |
15:53:28 | skrylar | well i'm sure it would *work*, you would just be replacing which lib does the glyph extraction treeform |
15:53:55 | GitDisc | <treeform> glyph is not that hard. Its placing them that is harder. |
15:54:16 | FromGitter | <krux02> end is a keyword I wanted to use often as an identifier |
15:54:39 | FromGitter | <mratsim> Or for a range. |
15:54:41 | FromGitter | <krux02> I don't know what the keyword end is good for or planned to be used for |
15:55:15 | skrylar | begin/end pairs are common in some code. GUI code especially |
15:55:32 | skrylar | nfltk has an extra ending letter in collisions; typee, endd |
15:56:04 | FromGitter | <krux02> isnot, notin really unnecessary keywords for special cases |
15:57:16 | Araq | "asm", "atomic" and "generic" need to die |
15:57:18 | * | miran joined #nim |
15:57:36 | Araq | isnot is for "consistency" with "notin", "notin" is quite useful |
15:57:59 | FromGitter | <krux02> yea could be useful |
15:58:31 | FromGitter | <krux02> but there is a general usefulness to have the "not" somewhere else than at the beginning of the statement |
15:58:57 | * | arnetheduck quit (Ping timeout: 240 seconds) |
15:58:58 | FromGitter | <krux02> ``a notin b `` is better to read than ``not a in b`` |
16:00:25 | Araq | krux02: you mean they could be builtin templates? |
16:00:27 | FromGitter | <krux02> but I don't like the idea to add a lot of functions or keywords to address this issue |
16:00:43 | Araq | well we have added 2. |
16:01:04 | FromGitter | <krux02> well when you make them a template, they still need to be operators, don't they? |
16:01:28 | Araq | I was refering to defer et al |
16:01:33 | FromGitter | <krux02> template `notin`(a,b): untyped = not a in b |
16:01:35 | * | TjYoco joined #nim |
16:01:47 | FromGitter | <krux02> ah, yea |
16:01:48 | FromGitter | <krux02> yes |
16:02:12 | FromGitter | <krux02> and when defer is actually a template, it would also work more consistently |
16:02:56 | FromGitter | <krux02> I can call ``if ...: foo(bar)`` in one line, but ``defer: foo(bar)`` doesn't work |
16:03:28 | FromGitter | <krux02> the defere statement needs a new line |
16:03:40 | Araq | what? o.O |
16:03:53 | Araq | that's just a bug |
16:04:06 | Araq | an embarrassing one, in fact |
16:05:18 | FromGitter | <krux02> I just tested it |
16:05:25 | * | endragor joined #nim |
16:05:27 | FromGitter | <krux02> I think it might have been fixed by now |
16:05:28 | FromGitter | <krux02> hmm |
16:06:02 | Araq | btw I dislike 'defer' |
16:06:18 | Araq | solves no problem for me and makes the 'try finally' harder to see |
16:06:28 | * | d10n-work joined #nim |
16:06:45 | Araq | especially since the 'try' introduces a new freaking scope |
16:06:53 | FromGitter | <krux02> well I don't love it, but at least it is a workaround for the time destructors are not ready yet |
16:06:54 | Araq | and 'defer' doesn't |
16:07:13 | FromGitter | <krux02> well, no |
16:07:14 | Araq | once destructors work reliably we should remove 'defer' again ... :-) |
16:07:20 | FromGitter | <krux02> I don.t like try finally at all |
16:07:51 | Araq | ever tried to use a top level 'defer' statement? |
16:07:53 | FromGitter | <krux02> well, no, not that I love defer, I also don't dislike it |
16:07:58 | FromGitter | <krux02> yes I did |
16:08:21 | FromGitter | <krux02> and I even mentioned to you that it doesn't work |
16:08:37 | FromGitter | <krux02> and you told me to just use a main proc |
16:09:16 | Araq | you make it sound like its unclear syntax is my fault |
16:09:41 | FromGitter | <krux02> maybe the top level dever could be implemented with the atexit callback function |
16:09:54 | FromGitter | <krux02> but I haven't thought deeply about it it is just an idea |
16:10:13 | FromGitter | <krux02> what unclear syntax? |
16:10:39 | Araq | well it's disallowed because it's unclear what it should mean |
16:10:49 | Araq | and it's unclear because of its syntax |
16:11:08 | Araq | it's really a 'try finally' that throws away valuable information |
16:11:16 | FromGitter | <krux02> well you create the language, you can define what it should mean |
16:11:28 | FromGitter | <krux02> what does it throw away? |
16:11:54 | Araq | the part which describes the steps to 'try' before doing the 'defer' |
16:12:05 | FromGitter | <krux02> I actually prefer defer over try catch finally |
16:12:34 | Araq | yes, but 'defer' is an inferior notation |
16:13:37 | FromGitter | <krux02> well if it is inferior or not is not somethign I spent a lot of thoughts. All I thought about is if it is harder to write bugs with defer or with try/catch/finally |
16:13:55 | FromGitter | <krux02> and I came to the conclusion that defer is less error prone |
16:14:15 | FromGitter | <krux02> and it allows me to write the code where I want to code to be |
16:14:30 | FromGitter | <krux02> I prefer to have the cleanup code at the same place where I create the "mess" |
16:15:13 | FromGitter | <krux02> ``var mess = createMess(); defer: cleanup(mess);`` |
16:15:29 | FromGitter | <krux02> when I have a few objects like mess |
16:19:38 | FromGitter | <mratsim> @varriount you might find your study there:https://www.reddit.com/r/programming/comments/1p1pui/why_garbage_collection_and_vms_can_improve/ there is at least a paper linked with GC vs malloc |
16:20:02 | * | PMunch quit (Quit: Leaving) |
16:20:47 | * | yglukhov quit (Remote host closed the connection) |
16:21:03 | FromGitter | <mratsim> http://people.cs.umass.edu/%7Eemery/pubs/gcvsmalloc.pdf |
16:22:48 | FromGitter | <mratsim> And Herb Sutter experimental GC for C++ https://www.reddit.com/r/programming/comments/54xnbg/herb_sutters_experimental_deferred_and_unordered/ |
16:22:55 | FromGitter | <krux02> Araq: https://gist.github.com/krux02/1b60effaee5e8225cd16c5e22f836c19 |
16:23:26 | * | yglukhov joined #nim |
16:23:38 | FromGitter | <krux02> I just think that main1 with the defer statements is much cleaner than the try finally version |
16:26:44 | * | floppydh quit (Quit: WeeChat 1.9.1) |
16:27:45 | * | yglukhov quit (Ping timeout: 248 seconds) |
16:29:18 | skrylar | wonder if wrapping the gearman client would be considered useful |
16:29:40 | skrylar | worker processes seem to be one area people are willing to use wierd languages in |
16:30:34 | FromGitter | <krux02> well modern languages are not really great when it is about using modern parallel hardware |
16:30:56 | FromGitter | <krux02> or better said modern parallel distributed hardware |
16:32:42 | skrylar | work queues are also natural glue points, as are hadoop's map reduce clients |
16:33:12 | skrylar | theres a surprising amount of ruby on rails people that toss things on to work queues for java |
16:36:22 | FromGitter | <mratsim> I've looked from far into mapReduce, I thought it was doing something clever to fuse map and reduce/fold but actually it does not. It's all about scheduling workers on clusters. |
16:39:40 | FromGitter | <krux02> do you guys know about the forgotten parallelism? |
16:40:44 | FromGitter | <krux02> there is a lot of potential performance gain in that area and it doesn't need threads and coworkers and all this stuff that has not yet been fully integrated into programming languages. |
16:41:21 | * | Trustable joined #nim |
16:42:48 | * | hikarinotomadoi joined #nim |
16:46:51 | * | hikarinotomadoi quit (Client Quit) |
16:47:24 | FromGitter | <mratsim> Link? |
16:51:27 | * | Jesin joined #nim |
16:54:10 | FromGitter | <mratsim> Google gives me completely junk results for forgotten parallelism |
16:57:34 | FromGitter | <mratsim> I've read this: https://cppandbeyond.wordpress.com/2012/07/01/the-forgotten-parallelism/ Isn't that SIMT ? Single instruction Multiple Thread (i.e. GPU computing)? |
17:01:05 | Araq | I dunno what krux02 means, but cache vs main memory is easily a factor of 30 |
17:01:16 | FromGitter | <brentp> hey all. I wrote a simple library for doing interval overlaps (like an interval tree without a tree). gave me a chance to try out concepts. any feedback welcome. https://github.com/brentp/nim-lapper |
17:02:01 | Araq | a factor of 30 is not something we should ignore. in contrast when I multi thread my code on the machine I'm writing on I would get a speedup of a factor of 4 |
17:02:46 | Araq | and using less memory is often much easier than introducing multi-threading |
17:03:43 | Araq | that said, the Nim compiler itself seems impossible to either use the caches more effectively or to multi-thread XD |
17:04:17 | Araq | the benefits of this great "common wisdom" programming model that's full of indirections |
17:07:28 | * | TjYoco quit (Quit: Leaving) |
17:18:32 | * | gokr quit (Ping timeout: 260 seconds) |
17:25:55 | * | jjido joined #nim |
17:46:10 | * | cspar joined #nim |
17:47:10 | * | elrood quit (Quit: Leaving) |
17:48:00 | FromGitter | <Varriount> Araq: Program in Forth. :P |
17:50:30 | FromGitter | <Varriount> Wtf, how did someone downvote my comments on hacker news. I thought you could only ever get upvoted |
17:51:12 | * | endragor quit (Remote host closed the connection) |
17:51:25 | skrylar | Varriount: you disobeyed the groupthink. |
17:51:45 | skrylar | disobeying group think + being intelligent = get banned :) |
17:54:09 | federico3 | Varriount: your comments on Rust? Never rock the boat on HN |
17:54:41 | Araq | varriount: Forth is pretty poor at everything the last time I checked |
17:59:59 | dom96 | omg, trying to draw a simple vertical line on a matplotlib chart in Python 3.6. Getting an obscure error. |
18:01:55 | FromGitter | <Varriount> dom96: Welcome to matplotlib |
18:02:24 | FromGitter | <Varriount> Here's a rope, you might find a good use for it after a while |
18:02:40 | dom96 | This is such basic shit though |
18:03:17 | * | sz0 quit (Quit: Connection closed for inactivity) |
18:04:40 | * | nsf quit (Quit: WeeChat 1.9.1) |
18:05:41 | * | beatmox joined #nim |
18:09:07 | FromGitter | <Varriount> skrylar, federico3: I just get fed up with people thinking that Rust is some sort of glorious panacea |
18:12:24 | federico3 | Varriount: it's not just Rust, it's any other buzzword of the year |
18:19:29 | * | cspar quit (Ping timeout: 255 seconds) |
18:19:59 | * | yglukhov joined #nim |
18:20:38 | dom96 | Varriount: link? |
18:21:20 | FromGitter | <Varriount> https://news.ycombinator.com/threads?id=Varriount |
18:22:24 | * | yglukhov_ joined #nim |
18:24:26 | * | yglukhov quit (Ping timeout: 255 seconds) |
18:26:27 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
18:27:34 | Araq | dom96: I ended drawing my plots with SDL's putPixel |
18:28:59 | dom96 | Araq: lol |
18:29:27 | dom96 | Varriount: yeah, that shouldn't have been downvoted |
18:29:43 | dom96 | some douche must have done it |
18:33:02 | dom96 | So of course the reason matplotlib was failing was because my index column was a string |
18:33:06 | dom96 | when I thought it was a date |
18:33:07 | dom96 | *Sigh* |
18:33:43 | dom96 | Gotta love dynamic typing |
18:33:44 | federico3 | dom96: HN is becoming a downvotefest |
18:34:09 | dom96 | I tend to not get downvoted strangely |
18:35:14 | GitDisc | <treeform> I upvoted you guys back. |
18:38:00 | * | gokr joined #nim |
18:41:55 | FromGitter | <ephja> dom96: you're supposed to keep track of things yourself :p |
18:41:59 | * | aziz quit (Ping timeout: 255 seconds) |
18:42:16 | dom96 | huh? |
18:42:35 | FromGitter | <ephja> types |
18:42:46 | FromGitter | <mratsim> @dom96 you can also try plotly for plotting |
18:43:11 | dom96 | I am already using it |
18:43:28 | dom96 | oh no wait, that's a different thing |
18:43:33 | dom96 | never mind :) |
18:45:21 | dom96 | is that easier to use? |
18:53:57 | Calinou | matplotlib has an xkcd mode, that makes it cool |
18:54:13 | Calinou | http://matplotlib.org/examples/showcase/xkcd.html |
18:55:21 | * | aziz joined #nim |
18:57:26 | FromGitter | <mratsim> It's different and the new cool thing among data scientist. At least you can do interactive plots in jupyter with it |
19:00:28 | miran | dom96: " trying to draw a simple vertical line on a matplotlib chart" -> have you tried `axvline`? |
19:00:42 | dom96 | I've already solved the problem |
19:01:08 | dom96 | and after restarting my jupyter kernel I get an error, fun |
19:02:27 | miran | dom96: "is [plotly] easier to use?" - well, it is *different* than matplotlib. the less you know MPL, the easier plotly will be :) |
19:02:48 | dom96 | I've worked with matplotlib a lot |
19:03:01 | dom96 | and it's still a PITA |
19:03:36 | miran | it is because MPL tries to satisfy both (ex) matlab users and... normal people :) |
19:04:03 | dom96 | and axvline started working randomly again |
19:04:15 | dom96 | IIRC matplotlib has a stupid amount of global state |
19:04:44 | miran | i hope you use object-oriented version of commands |
19:05:11 | miran | e.g. ax.plot(x, y), not plt.plot(x, y) |
19:05:27 | dom96 | lol nope |
19:06:26 | dom96 | It's a quick and dirty script |
19:06:39 | dom96 | But that's amazing |
19:06:41 | miran | ...with surprising bugs |
19:06:55 | dom96 | I restart the kernel |
19:07:04 | dom96 | run my code: I get an error on the axvline |
19:07:08 | dom96 | I comment it out: run again, works fine |
19:07:17 | dom96 | Then I remove the comment and it works |
19:07:48 | miran | OO-style will still have some stupid/illogical MPL stuff, but you'll shoot yourself in a foot much less than when using this matlab/global style |
19:08:23 | dom96 | we need a nice pandas/matplotlib alternative for Nim |
19:08:32 | miran | +1 |
19:08:54 | miran | we need matplotlib alternative for python too :D |
19:12:52 | miran | dom96: btw, don't know what you're ploting, but maybe seaborn would be useful to you - it uses MPL in background, but has much saner API |
19:13:14 | dom96 | Isn't seaborn even worse when it comes to using global state? |
19:14:15 | miran | i had only positive experiences with it |
19:14:23 | * | gokr quit (Ping timeout: 268 seconds) |
19:14:58 | * | yglukhov joined #nim |
19:16:00 | dom96 | I'm currently only using it to make the chart look prettier :) |
19:16:54 | miran | well, now with nicer defaults in MPL 2.0, i use seaborn much less than before :) (for the reasons you just mentioned) |
19:19:51 | skrylar | i mostly use gnuplot, but matplotlib wasn't terrible the one time i tried it :b |
19:20:30 | skrylar | if you want charts in nim you still have to pick what you want our canvas lib to be lol |
19:20:43 | miran | MPL is nice when it doesn't make problems for you |
19:21:24 | miran | today i had (and i have still) a problem where i decided to put legend below some subplots. all looks fine in jupyter notebook. |
19:21:37 | miran | and then i export it and - there is no legend |
19:22:23 | miran | and don't let me start about functions with docstring like this: func_name(*args, **kwargs) |
19:22:44 | miran | well, thank you very much for making it impossible to use! |
19:23:24 | miran | oh and btw, sometimes is func_name, sometimes is funcname, because - consistency is for losers, i guess |
19:25:29 | * | jjido quit (Ping timeout: 268 seconds) |
19:28:30 | Araq | we only need putPixel and savePng |
19:29:33 | Araq | writing the logic to draw the bars is less work than figuring out how matplotlib works and you're in full control over everything |
19:30:11 | Araq | in fact, it was suprisingly easy, even added some scale factors etc |
19:30:37 | Araq | took 3 hours to get the plots I required after fighting 3 days with matplotlib |
19:31:37 | * | gokr joined #nim |
19:33:44 | Araq | oh yeah, you also get to adapt the position of the legend |
19:34:19 | Araq | thinking about it ... it's comparable to latex vs paint. |
19:35:35 | Araq | latex -- "we have this program here that lacks any kind of vision but we trust it to render things in some pleasing fashion automatically". yeah well, it doesn't. automatic layouting is super hard. |
19:37:27 | skrylar | I wasn't going to bind matplotlib :b |
19:37:51 | skrylar | but we do need a canvasy thing for normal GUIs (which happens to also help with other people's future plot/graphing in nim) |
19:37:56 | skrylar | reading the postscript docs at the moment |
19:43:28 | * | aziz quit (Ping timeout: 248 seconds) |
19:43:58 | arecaceae | trying to #define something and then #ifndef it in a file I use via compile-pragma, tired emitting: #define foo, didnt work, any pointers? |
19:45:42 | * | claudiuinberlin joined #nim |
19:49:02 | * | aziz joined #nim |
19:51:18 | Araq | learn how #define works? |
19:53:25 | * | yglukhov quit (Remote host closed the connection) |
19:53:57 | * | yglukhov joined #nim |
19:54:34 | arecaceae | sounds like an idea |
19:54:42 | arecaceae | oh, I thought compile just includes |
19:54:45 | arecaceae | I guess it doesnt |
19:55:02 | arecaceae | is there a builtin for toStringing cstrings? |
19:55:12 | arecaceae | s/builtin/stdlib proc |
19:55:32 | Araq | $ |
19:55:35 | arecaceae | ofc |
19:55:40 | arecaceae | thanks |
19:58:25 | * | yglukhov quit (Ping timeout: 258 seconds) |
20:03:45 | * | endragor joined #nim |
20:09:02 | arecaceae | does tostringing cstrings copy it or will the string stop working when I dealloc the cstring? |
20:12:12 | * | SenasOzys quit (Ping timeout: 240 seconds) |
20:14:20 | Araq | it copies |
20:14:43 | * | SenasOzys joined #nim |
20:14:50 | * | xkapastel joined #nim |
20:16:25 | * | aziz quit (Remote host closed the connection) |
20:16:53 | arecaceae | thanks, can I easily get a cstring out of a WideCString ? |
20:20:30 | Araq | not sure, you can use $ on WideCString though and convert to cstring(x) but watch out that it's not freed too early |
20:22:32 | arecaceae | Araq: thanks |
20:26:16 | * | nsf joined #nim |
20:28:04 | arecaceae | hmmmmm... how do I get the len of a widecstring? just len()? |
20:28:42 | arecaceae | because I newWideCstring with 25 and then len()ing it yields 18 |
20:30:31 | arecaceae | okay I should read more, I think that len is probably for utf16chars |
20:33:02 | arecaceae | perfect, works now |
20:37:04 | * | couven92 quit (Quit: Client disconnecting) |
20:44:18 | * | yglukhov joined #nim |
21:02:43 | * | cspar joined #nim |
21:05:02 | skrylar | i am way too tired to understand some of this drawing code |
21:05:13 | skrylar | this guy is using physics equations to draw arcs |
21:11:45 | * | Vladar quit (Quit: Leaving) |
21:13:40 | FromGitter | <mratsim> arraymancer-vision uses Facebook visdom to display images in a browser |
21:14:02 | FromGitter | <mratsim> https://github.com/facebookresearch/visdom |
21:16:49 | FromGitter | <mratsim> It does scientific plot as well (via Plot.ly apparently) |
21:17:13 | * | vlad1777d_ joined #nim |
21:18:17 | FromGitter | <mratsim> the code seems short and easy to port as well ;) |
21:19:45 | FromGitter | <mratsim> License is creative common :?? |
21:27:35 | * | miran quit (Ping timeout: 268 seconds) |
21:29:42 | GitDisc | <treeform> wow this thing blew up: https://github.com/nim-lang/needed-libraries/issues |
21:30:36 | GitDisc | <treeform> skrylar: submitted a tiny PR to you. |
21:35:14 | FromGitter | <mratsim> wow poor @alehander42 If you need some help triaging, especially the scientific part you can ask @andreaferretti @bluenote10 or me. There are a lot of duplicate |
21:37:28 | FromGitter | <alehander42> @mratsim absolutely, I tried to mostly just parse and post automatically most of the survey contents as issues |
21:38:33 | FromGitter | <alehander42> then I labeled some of them quickly but not very carefully, so improving labels and adding info about the current state/closing duplicates would be amazing |
21:46:05 | * | rauss quit (Ping timeout: 240 seconds) |
21:46:50 | * | rauss joined #nim |
21:47:14 | FromGitter | <mratsim> Will do it during lunch tomorrow. @dom96/@Araq Can I have labelling/closing/editing rights on the needed-library pro? My plan for the scientific part is to have a main “siencitific nim” issue and that reference the individual issues/discussion if needed (like geospatial, image, plotting) |
21:47:28 | FromGitter | <mratsim> repo* |
21:48:43 | dom96 | sure |
21:48:44 | dom96 | added you |
21:49:09 | dom96 | Nice to see so much activity on this repo already, thanks guy (in particular alehander42 :)) |
21:49:13 | dom96 | *guys |
21:50:38 | FromGitter | <alehander42> @dom96 thanks |
21:51:02 | FromGitter | <alehander42> also, some people seem to work on stuff related to issues and I wanted to assign them , but it seems I have to add them as colaboratos too |
21:51:18 | FromGitter | <alehander42> should we do this, or linking their projects in the comments is ok enough |
21:51:30 | dom96 | That seems like a GitHub limitation |
21:51:51 | dom96 | I think just linking the projects is fine |
21:51:53 | FromGitter | <alehander42> yep :( |
21:52:02 | dom96 | You can add a label called "already exists" |
21:52:05 | dom96 | or "in progress" |
21:52:06 | dom96 | or something |
21:52:19 | FromGitter | <alehander42> yeah, I have in progress currently |
21:52:25 | FromGitter | <mratsim> In progress exists :p |
21:54:15 | FromGitter | <alehander42> and eventually if enough libraries appear, we can graduate them to awesome-nim too :D |
22:00:47 | FromGitter | <mratsim> Btw @alehander42 completely unrelated, I learned Haskell through Project Euler (and Nim too) and I loved their wiki dedicated to it with all their approaches and comparing it to mine. I think for zero_functional that would make some great examples: https://wiki.haskell.org/Euler_problems/1_to_10. (And lots of people are looking for the first few) |
22:02:31 | FromGitter | <mratsim> For example this Nim code for problematic unfortunately uses "costly" closures: https://github.com/mratsim/nim-projecteuler/blob/master/src/pe002_even_fibonacci_numbers.nim |
22:10:25 | * | Trustable quit (Remote host closed the connection) |
22:11:24 | arecaceae | I guess dealloc'ing cstrings malloced by c-code is not legit? |
22:13:54 | arecaceae | this indeed was my problem |
22:14:30 | FromGitter | <ephja> it depends on whether or not it should be freed by the user |
22:15:11 | FromGitter | <alehander42> @mratsim oh that's great indeed, it would be an excellent demonstration |
22:16:19 | FromGitter | <alehander42> I don't have much time through the week, but I have a parallel chain macro in the works and after this I'll add more examples and functions |
22:16:27 | FromGitter | <mratsim> @treeform Regarding your Green Thread request, do you know more about green threads vs fibres vs coroutines? When is one better than the other? |
22:16:28 | arecaceae | ephja, yeah it does sadly |
22:29:01 | dom96 | arecaceae: are you using Nim's dealloc? |
22:29:12 | dom96 | if so then you likely shouldn't |
22:31:12 | * | jaccarmac joined #nim |
22:33:43 | * | salewski joined #nim |
22:34:33 | salewski | Yesterday Araq wrote in IRC: the paradigm of system.nim is generally, operator: T * T -> T |
22:35:07 | salewski | Well a * b seems to work fine when a is int 32 and b is int64. |
22:35:50 | salewski | So I still have the feeling that it should also work when one is float and other is int. |
22:36:22 | jaccarmac | int32 is a subset of int64, the same is not necessarily true for floats and ints (at least not ints of the 32/64-bit variety) |
22:36:26 | salewski | With result float of course. But as I told yesterday, it is not a real problem for me. |
22:36:30 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
22:38:18 | salewski | Yes. But then we may regard int32 as subset of float, so float * int32 may be fine at least? |
22:39:07 | * | kier quit (Remote host closed the connection) |
22:39:11 | jaccarmac | double * int32 not float |
22:39:18 | jaccarmac | Not sure how floats work inside Nim |
22:39:30 | jaccarmac | Regular old single precision floats only have 23 bits of integer precision though |
22:40:09 | salewski | float is always 64 bin in current Nim, so same a double in C. |
22:40:32 | * | kier joined #nim |
22:40:39 | jaccarmac | I see |
22:41:00 | jaccarmac | Sounds like a question for Araq then, perhaps there are more... philosophical reasons for the operators |
22:42:00 | salewski | Yes, indeed I posted this for Araq. Not too important for me. Bye. |
22:43:19 | dom96 | Araq wants this strictness by default |
22:43:21 | Araq | jaccarmac: ok, the paradigm is T * T -> T |
22:43:28 | dom96 | There is a PR to add a lenient module |
22:43:31 | Araq | plus the conversion relation |
22:43:35 | dom96 | which makes things more ... lenient :) |
22:43:52 | Araq | which is "conversion allowed if no information is lost" |
22:44:17 | Araq | int can be 64 bits, float is 64 bits, loss of information is inherent |
22:44:23 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:44:51 | jaccarmac | Of course |
22:45:40 | jaccarmac | int/int32/int64 should be treated as distinct |
22:46:07 | jaccarmac | I'm not implying all ints have a lossless 64 bit float value |
22:46:11 | jaccarmac | Only the int32 ones |
22:48:58 | Araq | dom96: speaking of which, do we want lenient_ops? |
22:49:17 | dom96 | sure, why not. |
22:49:48 | * | yglukhov quit (Remote host closed the connection) |
22:51:39 | FromGitter | <mratsim> What was supposed to be in "sugar" by the way? |
22:52:12 | FromGitter | <mratsim> Or syntactic-sugar |
22:54:38 | salewski | Araq, I am sure at least here in Germany some people will not like when we have to write i.float * f |
22:54:57 | salewski | But I do understand your argumentation. |
22:55:32 | Araq | salewski: import lenient_ops seems a really good way to do it |
22:55:41 | * | couven92 joined #nim |
22:55:44 | Araq | once it's in system.nim, there is no way of disabling it |
22:55:57 | Araq | but an explicit import is nice |
22:56:13 | salewski | Yes, would be nice! |
22:56:21 | Araq | and I can see the need for "I don't care, I need to get work done here" ;-) |
22:57:26 | salewski | Bye. |
22:57:29 | * | salewski quit (Quit: WeeChat 1.9.1) |
22:57:33 | dom96 | I only dislike the underscore in the name :) |
23:00:00 | Araq | yeah, lenientops feels more Nim'ish |
23:02:40 | * | Calinou quit (Remote host closed the connection) |
23:06:01 | * | jaccarmac quit (Quit: ERC (IRC client for Emacs 27.0.50)) |
23:26:08 | * | Calinou joined #nim |
23:30:55 | * | gokr quit (Ping timeout: 268 seconds) |